[Review] Fix main branch failing tests#1
Open
govambam wants to merge 1 commit into
Open
Conversation
Minimal changes on astronomer#2261 to see tests passing without changing the original branch I also created a PR on the @YourRoyalLinus PR: YourRoyalLinus#1 This is a summary of the main issues: (1) Some integration tests were failing with: ``` ERROR tests/test_example_dags.py - AssertionError: assert not {'/home/runner/work/astronomer-cosmos/astronomer-cosmos/dev/dags/cosmos_manifest_selectors_example.py': 'Traceback (mo...he required Object Storage feature is unavailable in Airflow version 2.7.0. Please upgrade to Airflow 2.8 or later.\n'} + where {'/home/runner/work/astronomer-cosmos/astronomer-cosmos/dev/dags/cosmos_manifest_selectors_example.py': 'Traceback (mo...he required Object Storage feature is unavailable in Airflow version 2.7.0. Please upgrade to Airflow 2.8 or later.\n'} = <airflow.models.dagbag.DagBag object at 0x7fa3c6e724d0>.import_errors ERROR tests/test_example_dags_no_connections.py - AssertionError: assert not {'/home/runner/work/astronomer-cosmos/astronomer-cosmos/dev/dags/cosmos_manifest_selectors_example.py': 'Traceback (mo...he required Object Storage feature is unavailable in Airflow version 2.7.0. Please upgrade to Airflow 2.8 or later.\n'} + where {'/home/runner/work/astronomer-cosmos/astronomer-cosmos/dev/dags/cosmos_manifest_selectors_example.py': 'Traceback (mo...he required Object Storage feature is unavailable in Airflow version 2.7.0. Please upgrade to Airflow 2.8 or later.\n'} = <airflow.models.dagbag.DagBag object at 0x7fa3be1d89d0>.import_errors ``` The reason is "Object Storage feature is unavailable in Airflow version 2.7.0. Please upgrade to Airflow 2.8 or later". This is how you can fix it: astronomer@424a9a1 (2) dbt Fusion tests stopped working because the YAML selector file defined a default selector, which did not select any nodes in the `jaffle_shop` dbt project. There were dbt Fusion tests that referenced the dbt project `jaffle_shop` that were changed and would actually run the DAG and check the DAG topology - including which nodes were rendered. Since we set the default selector to not match any nodes, this behaviour changed: ``` =========================== short test summary info ============================ FAILED tests/test_dbtf.py::test_dbt_dag_with_dbt_fusion - assert 0 == 23 + where 0 = len({}) + where {} = <cosmos.dbt.graph.DbtGraph object at 0x7f0b68bb80d0>.filtered_nodes + where <cosmos.dbt.graph.DbtGraph object at 0x7f0b68bb80d0> = <DAG: snowflake_dbt_fusion_dag>.dbt_graph ``` I moved the changes originally done to `dev/dags/dbt/jaffle_shop` to `dev/dags/dbt/altered_jaffle_shop`. I also removed the default selector definition. (3) The DAG `cosmos_manifest_selectors_examples.py` failed to run in a clean database because it would attempt to run the dbt model `customers`, without having run its upstream tasks. This can be observed in https://github.com/astronomer/astronomer-cosmos/actions/runs/21476188465/job/61860709231?pr=2296 (4) The DAG `example_cosmos_cleanup_dag.py` is not compatible with Airflow 3. I logged a follow-up ticket for us to check this: astronomer#2300. This issue was not introduced by your PR. For now, it is skipped in AF3.
Fix failing main tests by switching example DAGs to the
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Recreated from astronomer#2296 for Macroscope review.
Original PR: astronomer#2296 by @tatiana
Status: closed (merged)
Recreated using squash merge commit - exact merged state preserved.
Original PR: astronomer#2296