Uh oh!
There was an error while loading. Please reload this page.
[AIRFLOW-703] Stop Xcom being cleared too early - #1951
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
|
jlowin
commented
Dec 21, 2016
@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 |
blrnw3
commented
Dec 21, 2016
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. |
jlowin
commented
Dec 21, 2016
Ok, I think that's reasonable -- just wanted to double check. Once Travis clears I will merge. Thanks! |
jlowin
commented
Dec 21, 2016
Looks like I just exposed a PR-Tool bug that added [AIRFLOW-1] to the commit title. I'll look in to why! |
jlowin
commented
Dec 21, 2016
Oh, it's because the boilerplate PR template has [AIRFLOW-1] in it. Interesting. |
blrnw3
commented
Dec 21, 2016
ah my mistake 😅 |
jlowin
commented
Dec 21, 2016
No worries. Thanks for the PR! |
blrnw3
commented
Dec 21, 2016
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. Closesapache#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: