-
Notifications
You must be signed in to change notification settings - Fork 16.4k
Count mapped upstreams only if all are finished #30641
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
Merged
potiuk
merged 3 commits into
apache:main
from
astronomer:investigate-28973-dynamic-run-too-early
Apr 22, 2023
Merged
Count mapped upstreams only if all are finished #30641
potiuk
merged 3 commits into
apache:main
from
astronomer:investigate-28973-dynamic-run-too-early
Apr 22, 2023
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
uranusjr
commented
Apr 14, 2023
An XComArg's get_task_map_length() should only return an integer when the *entire* task has finished. However, before this patch, it may attempt to count a mapped upstream even when some (or all!) of its expanded tis are still unfinished, resulting its downstream to be expanded prematurely. This patch adds an additional check before we count upstream results to ensure all the upstreams are actually finished.
This needs a special workaround for a NULL quirk in SQL.
67a39d4 to
62313b4
Compare
hussein-awala
approved these changes
Apr 18, 2023
Member
hussein-awala
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
potiuk
approved these changes
Apr 22, 2023
Member
|
Another potential candidate for 2.6.0 @ephraimbuddy @pierrejeambrun @jedcunningham . Marked it so. |
ephraimbuddy
pushed a commit
that referenced
this pull request
Apr 23, 2023
* Fix Pydantic TI handling in XComArg.resolve() * Count mapped upstreams only if all are finished An XComArg's get_task_map_length() should only return an integer when the *entire* task has finished. However, before this patch, it may attempt to count a mapped upstream even when some (or all!) of its expanded tis are still unfinished, resulting its downstream to be expanded prematurely. This patch adds an additional check before we count upstream results to ensure all the upstreams are actually finished. * Use SQL IN to find unfinished TI instead This needs a special workaround for a NULL quirk in SQL. (cherry picked from commit 5f2628d)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
An XComArg's
get_task_map_length()should only return an integer when the entire task has finished. However, before this patch, it may attempt to count a mapped upstream even when some (or all!) of its expanded tis are still unfinished, resulting its downstream to be expanded prematurely. This patch adds an additional check before we count upstream results to ensure all the upstreams are actually finished.Fix #28973.
One thing I don’t like in this patch is it adds an additional SQL query for each resolution. I have a hunch the two queries can be combined, but I’m not sure how.