-
Notifications
You must be signed in to change notification settings - Fork 16.4k
Fix assets used only as inlets being incorrectly orphaned (#58303) #58368
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 assets used only as inlets being incorrectly orphaned (#58303) #58368
Conversation
327fa7d to
76d0cd8
Compare
|
@mykola-shyshov, great work on this fix. One question while reviewing: do we expect any noticeable perf impact when counting references for large asset sets? I assume minimal, but curious if we’ve thought about it. Also, confirming my understanding, this ensures inlet-only assets remain active and don’t get incorrectly dropped from AssetActive, correct? Maybe in the future we could add a test with mixed inlet/outlet references in the same DAG to fully cover real-world patterns, not necessary for this PR though. |
|
We should probably also backport this fix to AF 3.1 ? |
Assets referenced only in task inlets were removed from AssetActive, causing intermittent validation failures. Fixes apache#58303
e06e9f5 to
64ee24a
Compare
thanks. Unfortunately, I can not predict how much it may impact. Foreign index is there so it should be fine. Delegating this question to reviewers.
Yes
If something need to be done from my side direct me. |
|
I think the maintainer has to set a proper label on the PR so it's backported, so let's wait for someone to review the PR. |
kacpermuda
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.
|
@uranusjr Does the fix look good now after changes? Can we merge it? |
Lee-W
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.
a few nits but non-blocking
…apache#58303) (apache#58368) (cherry picked from commit 24e682c) Co-authored-by: Mykola Shyshov <mykola.shyshov@gmail.com>
Fix assets with only inlet references being incorrectly orphaned (#58303)
Assets that were referenced only in task inlets were incorrectly marked as orphaned and removed from the AssetActive table. This caused a race condition where validate_inlets_and_outlets would intermittently fail with AirflowInactiveAssetInInletOrOutletException.
The orphanage detection logic only checked DagScheduleAssetReference and TaskOutletAssetReference, but did not include TaskInletAssetReference. This meant assets used exclusively as task inputs were considered unreferenced and removed from active tracking.
WARN: may be it is intentionally!
Changes:
Fixes #58303
