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(main): fix ImportError on examples dags #37571

Merged
merged 6 commits into from Feb 23, 2024

Conversation

xionams
Copy link
Contributor

@xionams xionams commented Feb 20, 2024

this pull request is related to: apache/airflow-site#945
closes: apache/airflow-site#945

the solution of "skipped" on the dag-loading when the virtualenv is not installed
is wrap the dag loading with try-except and return None either
using this logic will guarantee the ImportError exception will not stored in the DB
and not thrown on the homepage as an error.
so if virtualenv is not installed the examples are not loaded and the exception will not thrown

tested on Ubuntu WSL2


Copy link

boring-cyborg bot commented Feb 20, 2024

Congratulations on your first Pull Request and welcome to the Apache Airflow community! If you have any issues or are unsure about any anything please check our Contributors' Guide (https://github.com/apache/airflow/blob/main/contributing-docs/README.rst)
Here are some useful points:

  • Pay attention to the quality of your code (ruff, mypy and type annotations). Our pre-commits will help you with that.
  • In case of a new feature add useful documentation (in docstrings or in docs/ directory). Adding a new operator? Check this short guide Consider adding an example DAG that shows how users should use it.
  • Consider using Breeze environment for testing locally, it's a heavy docker but it ships with a working Airflow and a lot of integrations.
  • Be patient and persistent. It might take some time to get a review or get the final approval from Committers.
  • Please follow ASF Code of Conduct for all communication including (but not limited to) comments on Pull Requests, Mailing list and Slack.
  • Be sure to read the Airflow Coding style.
  • Always keep your Pull Requests rebased, otherwise your build might fail due to changes not related to your commits.
    Apache Airflow is a community-driven project and together we are making it better 🚀.
    In case of doubts contact the developers at:
    Mailing List: dev@airflow.apache.org
    Slack: https://s.apache.org/airflow-slack

@potiuk
Copy link
Member

potiuk commented Feb 22, 2024

Just one static check to fix

@xionams xionams requested a review from kaxil as a code owner February 22, 2024 21:43
tests/system/README.md Outdated Show resolved Hide resolved
dev/PROJECT_GUIDELINES.md Outdated Show resolved Hide resolved
@eladkal
Copy link
Contributor

eladkal commented Feb 23, 2024

i submitted fixes for the static checks. It should pass now

@eladkal eladkal merged commit e0fc803 into apache:main Feb 23, 2024
59 checks passed
Copy link

boring-cyborg bot commented Feb 23, 2024

Awesome work, congrats on your first merged pull request! You are invited to check our Issue Tracker for additional contributions.

@eladkal eladkal added this to the Airflow 2.8.3 milestone Feb 23, 2024
@eladkal eladkal added the type:doc-only Changelog: Doc Only label Feb 23, 2024
@xionams xionams deleted the fix_virtualenv_dependency branch February 25, 2024 10:43
abhishekbhakat pushed a commit to abhishekbhakat/my_airflow that referenced this pull request Mar 5, 2024
* fix(main): fix ImportError on examples dags

* thanks @eladkal

* @Taragolis thanks for the review, you absoultly right. bad styling, overthinking.

* Fix static check failure

* Update tests/system/README.md

* Update dev/PROJECT_GUIDELINES.md

---------

Co-authored-by: Elad Kalif <45845474+eladkal@users.noreply.github.com>
ephraimbuddy pushed a commit that referenced this pull request Mar 6, 2024
* fix(main): fix ImportError on examples dags

* thanks @eladkal

* @Taragolis thanks for the review, you absoultly right. bad styling, overthinking.

* Fix static check failure

* Update tests/system/README.md

* Update dev/PROJECT_GUIDELINES.md

---------

Co-authored-by: Elad Kalif <45845474+eladkal@users.noreply.github.com>
(cherry picked from commit e0fc803)
ephraimbuddy pushed a commit that referenced this pull request Mar 6, 2024
* fix(main): fix ImportError on examples dags

* thanks @eladkal

* @Taragolis thanks for the review, you absoultly right. bad styling, overthinking.

* Fix static check failure

* Update tests/system/README.md

* Update dev/PROJECT_GUIDELINES.md

---------

Co-authored-by: Elad Kalif <45845474+eladkal@users.noreply.github.com>
(cherry picked from commit e0fc803)
utkarsharma2 pushed a commit to astronomer/airflow that referenced this pull request Apr 22, 2024
* fix(main): fix ImportError on examples dags

* thanks @eladkal

* @Taragolis thanks for the review, you absoultly right. bad styling, overthinking.

* Fix static check failure

* Update tests/system/README.md

* Update dev/PROJECT_GUIDELINES.md

---------

Co-authored-by: Elad Kalif <45845474+eladkal@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:doc-only Changelog: Doc Only
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Quickstart: not having virtualenv installed results in broken DAGs
4 participants