Move allow_producer_teams from asset model to DagScheduleAssetReference#66487
Merged
Conversation
Lee-W
reviewed
May 7, 2026
002457d to
fa9c421
Compare
fa9c421 to
35d7ee1
Compare
o-nikolas
approved these changes
May 7, 2026
arpitrathore
pushed a commit
to arpitrathore/airflow
that referenced
this pull request
May 9, 2026
jason810496
pushed a commit
to jason810496/airflow
that referenced
this pull request
May 11, 2026
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
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.
Storing the
allow_producer_teamsparameter on theAssetModelwas bad design decision. The same asset can be (and is expected to be) defined in multiple Dags across different bundles. For example:Producer Dag (team1 bundle):
Consumer Dag (team2 bundle):
The asset
my_assetis referenced in both Dags. The producer does not defineallow_producer_teams, but the consumer does. Since each bundle is processed independently, whichever bundle is parsed last overwrites the asset row in the database. In other words, the producer bundle could wipe out the consumer'sallow_producer_teams.Even though the asset is declared in multiple Dags, there is only one row in the
assettable. Storingallow_producer_teamsthere was not the right choice because it is a consumer-side declaration: it controls which teams are allowed to trigger this specific consumer, not a global property of the asset itself.Solution: Move
allow_producer_teamsto thedag_schedule_asset_referencetable, which represents the relationship between a consumer Dag and the asset it schedules on.Was generative AI tooling used to co-author this PR?
{pr_number}.significant.rst, in airflow-core/newsfragments. You can add this file in a follow-up commit after the PR is created so you know the PR number.