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

Move fallible ti.task.dag assignment back inside try/except block (#24533) #24592

Merged
merged 2 commits into from
Jun 30, 2022

Conversation

ejk43
Copy link
Contributor

@ejk43 ejk43 commented Jun 22, 2022

It looks like ti.task.dag was originally protected inside try/except, but was moved out at commit 7be87d

This causes the "View Logs in Elasticsearch" option to crash in the Airflow UI

related: #24533

@boring-cyborg
Copy link

boring-cyborg bot commented Jun 22, 2022

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 Contribution Guide (https://github.com/apache/airflow/blob/main/CONTRIBUTING.rst)
Here are some useful points:

  • Pay attention to the quality of your code (flake8, 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.
    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

It looks like ti.task.dag was originally protected inside try/except,
but was moved out at commit 7be87d
@ejk43 ejk43 force-pushed the try-catch-dag-assignment branch from 85803b1 to 8d68822 Compare June 22, 2022 13:09
@github-actions github-actions bot added the full tests needed We need to run full set of tests for this PR to merge label Jun 23, 2022
@github-actions
Copy link

The PR most likely needs to run full matrix of tests because it modifies parts of the core of Airflow. However, committers might decide to merge it quickly and take the risk. If they don't merge it quickly - please rebase it to the latest main at your convenience, or amend the last commit of the PR, and push it with --force-with-lease.

@uranusjr uranusjr force-pushed the try-catch-dag-assignment branch from 81c6b3d to 6eb5286 Compare June 23, 2022 06:12
@ejk43
Copy link
Contributor Author

ejk43 commented Jun 23, 2022

Another good catch. Thanks for the review and commit, I appreciate the detail.

What's the process to get this into main branch from here? Is anything else needed? (first time PR for me)

@uranusjr
Copy link
Member

We generally need two committer reviews to merge a PR, so let’s wait for now.

@uranusjr uranusjr merged commit 97948ec into apache:main Jun 30, 2022
@boring-cyborg
Copy link

boring-cyborg bot commented Jun 30, 2022

Awesome work, congrats on your first merged pull request!

@eladkal eladkal added this to the Airflow 2.3.4 milestone Jul 5, 2022
@ephraimbuddy ephraimbuddy added the type:bug-fix Changelog: Bug Fixes label Jul 5, 2022
ephraimbuddy pushed a commit that referenced this pull request Jul 5, 2022
…4533) (#24592)

* Move fallible ti.task.dag assignment back inside try/except block

It looks like ti.task.dag was originally protected inside try/except,
but was moved out at commit 7be87d

* Remove unneeded variable annotation

Co-authored-by: EJ Kreinar <ej@he360.com>
Co-authored-by: Tzu-ping Chung <uranusjr@gmail.com>
(cherry picked from commit 97948ec)
ephraimbuddy pushed a commit that referenced this pull request Jul 5, 2022
…4533) (#24592)

* Move fallible ti.task.dag assignment back inside try/except block

It looks like ti.task.dag was originally protected inside try/except,
but was moved out at commit 7be87d

* Remove unneeded variable annotation

Co-authored-by: EJ Kreinar <ej@he360.com>
Co-authored-by: Tzu-ping Chung <uranusjr@gmail.com>
(cherry picked from commit 97948ec)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:logging area:providers full tests needed We need to run full set of tests for this PR to merge type:bug-fix Changelog: Bug Fixes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants