-
Notifications
You must be signed in to change notification settings - Fork 16.4k
[AIRFLOW-703] Stop Xcom being cleared too early #1951
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
Conversation
Only clear Xcom when the task is CERTAIN to start executing Fixes AIRFLOW-703
Current coverage is 66.59% (diff: 100%)@@ master #1951 diff @@
==========================================
Files 135 135
Lines 10201 10201
Methods 0 0
Messages 0 0
Branches 0 0
==========================================
+ Hits 6792 6793 +1
+ Misses 3409 3408 -1
Partials 0 0
|
|
@blrnw3 the fix (moving Are we sure that your first test is actually testing the right thing? Your comment says it won't clear because the other TI is running, but I think that TI has already ended and it's not clearing because of the |
|
Thanks @jlowin. I've clarified the comment. It's a little tricky to test the exact situation I found, because it relies to some extent on a race condition. The test I wrote simulates that by ignoring dependencies and marking success, which I think is a valid test because that is also a potential real-world use case, and more-easily testable. |
|
Ok, I think that's reasonable -- just wanted to double check. Once Travis clears I will merge. Thanks! |
|
Looks like I just exposed a PR-Tool bug that added [AIRFLOW-1] to the commit title. I'll look in to why! |
|
Oh, it's because the boilerplate PR template has [AIRFLOW-1] in it. Interesting. |
|
ah my mistake 😅 |
|
No worries. Thanks for the PR! |
|
It was a pleasure |
XComs should only be cleared when it is certain that the task will run. Previously, XComs were cleared before it was determined if tasks were runnable, queable, or just being marked success. Now XComs are cleared immediately before the task actually starts. Closes apache#1951 from blrnw3/fix/xcom_bug_AIRFLOW-703
Only clear Xcom when the task is CERTAIN to start executing
Fixes AIRFLOW-703
Dear Airflow Maintainers,
Please accept this PR that addresses the following issues:
Per Apache guidelines you need to create a Jira issue.
Testing Done:
Expanded on a test case which was checking only a subset of this bug
specify why you think this is not required. We like to improve our
coverage so a non existing test is even a better reason to include one.
Reminders for contributors (REQUIRED!):
Your PR's title must reference an issue on
Airflow's JIRA.
For example, a PR called "[AIRFLOW-1] My Amazing PR" would close JIRA
issue Improving the search functionality in the graph view #1. Please open a new issue if required!
For all PRs with UI changes, you must provide screenshots. If the UI changes are not obvious, either annotate the images or provide before/after screenshots.
Please squash your commits when possible and follow the How to write a good git commit message.
Summarized as follows: