You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to test the compatibility of my DAGs before upgrading astronomer runtime to 11.7.0 using the following astro cli command astro dev upgrade-test --runtime-version 11.7.0
In one of my DAGs I am using Basehook.get_connections() to retrieve the connection details from AWS Secrets manager
I receive the below error during the integrity test. The same error appears regardless of the runtime-version param.
============================= test session starts ==============================
platform linux -- Python 3.11.9, pytest-7.4.4, pluggy-1.5.0
rootdir: /usr/local/airflow
plugins: metadata-3.1.1, html-4.1.1, time-machine-2.14.1, anyio-4.4.0
collected 30 items
.astro/test_dag_integrity_default.py F............................. [100%]
=================================== FAILURES ===================================
_____________ test_file_imports[dags/negative_balance_emailer.py] ______________
rel_path = 'dags/negative_balance_emailer.py'
rv = 'Traceback (most recent call last):\n File "/usr/local/lib/python3.11/site-packages/airflow/models/dag.py", line 4074...^^^^^^^^^^^^^^^^^^^^\nTypeError: basehook_get_connection_monkeypatch() missing 1 required positional argument: \'key\''
@pytest.mark.parametrize(
"rel_path, rv", get_import_errors(), ids=[x[0] for x in get_import_errors()]
)
def test_file_imports(rel_path, rv):
"""Test for import errors on a file"""
if rv != "No import errors":
# If rv is not "No import errors," consider it a failed test
> raise Exception(f"{rel_path} failed to import with message \n {rv}")
E Exception: dags/negative_balance_emailer.py failed to import with message
E Traceback (most recent call last):
E File "/usr/local/lib/python3.11/site-packages/airflow/models/dag.py", line 4074, in factory
E f(**f_kwargs)
E File "/usr/local/airflow/dags/negative_balance_emailer.py", line 31, in negative_balance_emailer
E redshift_conn = BaseHook.get_connection(conn_id="test")
E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
E TypeError: basehook_get_connection_monkeypatch() missing 1 required positional argument: 'key'
.astro/test_dag_integrity_default.py:134: Exception
---- Generated html report: file:///usr/local/airflow/dag-test-report.html -----
=========================== short test summary info ============================
FAILED .astro/test_dag_integrity_default.py::test_file_imports[dags/negative_balance_emailer.py]
========================= 1 failed, 29 passed in 2.65s =========================
See above for errors detected in your DAGs
What CLI Version did you experience this bug?
Astro CLI Version: 1.28.1
This CLI bug is related to which Astronomer Platform?
Astro
Software
None/Unknown
What Operating System is the above CLI installed on?
Mac
🪜 Steps To Reproduce
Create a DAG that uses Basehook.get_connection()
Run the following cli command astro dev upgrade-test --runtime-version 11.7.0
See error
The text was updated successfully, but these errors were encountered:
Describe the bug
I am trying to test the compatibility of my DAGs before upgrading astronomer runtime to 11.7.0 using the following astro cli command
astro dev upgrade-test --runtime-version 11.7.0
In one of my DAGs I am using
Basehook.get_connections()
to retrieve the connection details from AWS Secrets managerI receive the below error during the integrity test. The same error appears regardless of the runtime-version param.
What CLI Version did you experience this bug?
Astro CLI Version: 1.28.1
This CLI bug is related to which Astronomer Platform?
What Operating System is the above CLI installed on?
Mac
🪜 Steps To Reproduce
astro dev upgrade-test --runtime-version 11.7.0
The text was updated successfully, but these errors were encountered: