-
Notifications
You must be signed in to change notification settings - Fork 15.2k
Store and expose task inlet references to assets #51424
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
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.
Overall looks good! Put some comments on the failing tests.
Do you think we should add a newsfragment
? Since it also includes changes on the database end, maybe not directly a user-facing feature but could be if someone started using those fields.
airflow-core/tests/unit/api_fastapi/core_api/routes/public/test_assets.py
Show resolved
Hide resolved
Good point, I’ll add a news fragment file. |
305d0ff
to
067eede
Compare
The term 'consuming' is confusing here. The implementation of this property returns a list of dags that use the asset in their 'schedule' argument (asset-based scheduling). However, a dag can 'consume' an asset in other ways, e.g. using it as an inlet, which this property does not handle.
067eede
to
d816b0f
Compare
d816b0f
to
4b31bf3
Compare
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.
Nice! Looks good to me!
Backend part for #50873.
The name 'consuming dags' is somewhat confusing. This is actually a backref to DagScheduleAssetReference, and as the name suggests, it only tracks dags that reference assets in its
schedule
, not other ways of “consuming”, namely inlet references. Therefore, I changed the name toscheduled_dags
instead, to reflect the fact that those dags actually use the asset for scheduling.I added a new model TaskInletAssetReference to track inlet references. A backref is also created to expose this to the REST API (so we can later show this in the UI). I’m calling this
consuming_tasks
, but open to other ideas (again, consuming might not be the best word).