Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix CI issue running integration tests #640

Merged
merged 2 commits into from
Nov 2, 2023
Merged

Fix CI issue running integration tests #640

merged 2 commits into from
Nov 2, 2023

Conversation

tatiana
Copy link
Collaborator

@tatiana tatiana commented Nov 2, 2023

At the moment, all PRs are failing due to issues with integration tests not being able to run. An example of error message:

FAILED tests/test_example_dags.py::test_example_dag[extract_dag] - assert not {'/home/runner/work/astronomer-cosmos/astronomer-cosmos/dev/dags/example_cosmos_python_models.py': 'Traceback (most recent call last):\n  File "/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/selectors.py", line 416, in select\n    fd_event_list = self._selector.poll(timeout)\n  File "/home/runner/.local/share/hatch/env/virtual/astronomer-cosmos/Za_bFbg4/tests.py3.9-2.4/lib/python3.9/site-packages/airflow/utils/timeout.py", line 69, in handle_timeout\n    raise AirflowTaskTimeout(self.error_message)\nairflow.exceptions.AirflowTaskTimeout: DagBag import timeout for /home/runner/work/astronomer-cosmos/astronomer-cosmos/dev/dags/example_cosmos_python_models.py after 30.0s.\nPlease take a look at these docs to improve your DAG import time:\n* https://airflow.apache.org/docs/apache-airflow/2.4.0/best-practices.html#top-level-python-code\n* https://airflow.apache.org/docs/apache-airflow/2.4.0/best-practices.html#reducing-dag-complexity, PID: 2558\n'}

This issue relates to #520 - something we'll be soon working on.

In the meantime, we're increasing the DAG Parsing time in the CI - so our tests can run again.

We should also review how we run the integration tests - we probably do not need to run all DAGs against the Python x Airflow matrix, and we could parallelise some of those.

@tatiana tatiana requested a review from a team as a code owner November 2, 2023 10:37
@tatiana tatiana requested a review from a team November 2, 2023 10:37
Copy link

netlify bot commented Nov 2, 2023

👷 Deploy Preview for amazing-pothos-a3bca0 processing.

Name Link
🔨 Latest commit 32c7323
🔍 Latest deploy log https://app.netlify.com/sites/amazing-pothos-a3bca0/deploys/65438691e27c0d00080a75ec

@tatiana tatiana temporarily deployed to internal November 2, 2023 10:37 — with GitHub Actions Inactive
@tatiana tatiana temporarily deployed to internal November 2, 2023 11:23 — with GitHub Actions Inactive
@tatiana
Copy link
Collaborator Author

tatiana commented Nov 2, 2023

This change will probably only take effect once merged into the main branch, as seen in:
https://github.com/astronomer/astronomer-cosmos/actions/runs/6731407674/job/18296010566

Since it does not affect the Cosmos code-base, I'm bypassing branch protections to merge it.

@tatiana tatiana merged commit 358f4b0 into main Nov 2, 2023
24 of 39 checks passed
@tatiana tatiana deleted the fix-ci branch November 2, 2023 11:23
tatiana added a commit that referenced this pull request Nov 6, 2023
At the moment, all PRs are failing due to issues with integration tests
not being able to run. An example of error message:
```
FAILED tests/test_example_dags.py::test_example_dag[extract_dag] - assert not {'/home/runner/work/astronomer-cosmos/astronomer-cosmos/dev/dags/example_cosmos_python_models.py': 'Traceback (most recent call last):\n  File "/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/selectors.py", line 416, in select\n    fd_event_list = self._selector.poll(timeout)\n  File "/home/runner/.local/share/hatch/env/virtual/astronomer-cosmos/Za_bFbg4/tests.py3.9-2.4/lib/python3.9/site-packages/airflow/utils/timeout.py", line 69, in handle_timeout\n    raise AirflowTaskTimeout(self.error_message)\nairflow.exceptions.AirflowTaskTimeout: DagBag import timeout for /home/runner/work/astronomer-cosmos/astronomer-cosmos/dev/dags/example_cosmos_python_models.py after 30.0s.\nPlease take a look at these docs to improve your DAG import time:\n* https://airflow.apache.org/docs/apache-airflow/2.4.0/best-practices.html#top-level-python-code\n* https://airflow.apache.org/docs/apache-airflow/2.4.0/best-practices.html#reducing-dag-complexity, PID: 2558\n'}
```
This issue relates to #520 - something we'll be soon working on.

In the meantime, we're increasing the DAG Parsing time in the CI - so
our tests can run again.

We should also review how we run the integration tests - we probably do
not need to run all DAGs against the Python x Airflow matrix, and we
could parallelise some of those.

(cherry picked from commit 358f4b0)
tatiana added a commit that referenced this pull request Nov 6, 2023
Bug fixes

* Support ProjectConfig.dbt_project_path = None & different paths for Rendering and Execution by @MrBones757 in #634
* Fix adding test nodes to DAGs built using LoadMethod.DBT_MANIFEST and LoadMethod.CUSTOM by @edgga in #615

Others

* Add pre-commit hook for McCabe max complexity check and fix errors by @jbandoro in #629
* Update contributing docs for running integration tests by @jbandoro in #638
* Fix CI issue running integration tests by @tatiana in #640 and #644
* pre-commit updates in #637
@tatiana tatiana mentioned this pull request Nov 6, 2023
tatiana added a commit that referenced this pull request Nov 6, 2023
At the moment, all PRs are failing due to issues with integration tests
not being able to run. An example of error message:
```
FAILED tests/test_example_dags.py::test_example_dag[extract_dag] - assert not {'/home/runner/work/astronomer-cosmos/astronomer-cosmos/dev/dags/example_cosmos_python_models.py': 'Traceback (most recent call last):\n  File "/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/selectors.py", line 416, in select\n    fd_event_list = self._selector.poll(timeout)\n  File "/home/runner/.local/share/hatch/env/virtual/astronomer-cosmos/Za_bFbg4/tests.py3.9-2.4/lib/python3.9/site-packages/airflow/utils/timeout.py", line 69, in handle_timeout\n    raise AirflowTaskTimeout(self.error_message)\nairflow.exceptions.AirflowTaskTimeout: DagBag import timeout for /home/runner/work/astronomer-cosmos/astronomer-cosmos/dev/dags/example_cosmos_python_models.py after 30.0s.\nPlease take a look at these docs to improve your DAG import time:\n* https://airflow.apache.org/docs/apache-airflow/2.4.0/best-practices.html#top-level-python-code\n* https://airflow.apache.org/docs/apache-airflow/2.4.0/best-practices.html#reducing-dag-complexity, PID: 2558\n'}
```
This issue relates to #520 - something we'll be soon working on.

In the meantime, we're increasing the DAG Parsing time in the CI - so
our tests can run again.

We should also review how we run the integration tests - we probably do
not need to run all DAGs against the Python x Airflow matrix, and we
could parallelise some of those.

(cherry picked from commit 358f4b0)
tatiana added a commit that referenced this pull request Nov 6, 2023
Bug fixes

* Support ProjectConfig.dbt_project_path = None & different paths for Rendering and Execution by @MrBones757 in #634
* Fix adding test nodes to DAGs built using LoadMethod.DBT_MANIFEST and LoadMethod.CUSTOM by @edgga in #615

Others

* Add pre-commit hook for McCabe max complexity check and fix errors by @jbandoro in #629
* Update contributing docs for running integration tests by @jbandoro in #638
* Fix CI issue running integration tests by @tatiana in #640 and #644
* pre-commit updates in #637
@tatiana tatiana added this to the 1.2.2 milestone Nov 7, 2023
tatiana added a commit that referenced this pull request Nov 7, 2023
Bug fixes

* Support ProjectConfig.dbt_project_path = None & different paths for Rendering and Execution by @MrBones757 in #634
* Fix adding test nodes to DAGs built using LoadMethod.DBT_MANIFEST and LoadMethod.CUSTOM by @edgga in #615

Others

* Add pre-commit hook for McCabe max complexity check and fix errors by @jbandoro in #629
* Update contributing docs for running integration tests by @jbandoro in #638
* Fix CI issue running integration tests by @tatiana in #640 and #644
* pre-commit updates in #637

(cherry picked from commit fa0620a)
arojasb3 pushed a commit to arojasb3/astronomer-cosmos that referenced this pull request Jul 14, 2024
Bug fixes

* Support ProjectConfig.dbt_project_path = None & different paths for Rendering and Execution by @MrBones757 in astronomer#634
* Fix adding test nodes to DAGs built using LoadMethod.DBT_MANIFEST and LoadMethod.CUSTOM by @edgga in astronomer#615

Others

* Add pre-commit hook for McCabe max complexity check and fix errors by @jbandoro in astronomer#629
* Update contributing docs for running integration tests by @jbandoro in astronomer#638
* Fix CI issue running integration tests by @tatiana in astronomer#640 and astronomer#644
* pre-commit updates in astronomer#637

(cherry picked from commit fa0620a)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant