Skip to content

Conversation

@uranusjr
Copy link
Member

This is done by triggering the DAG that has the given asset as a task outlet. 409 is returned if more than one DAG uses the asset as outlet.

Close #42318.

This is done by triggering the DAG that has the given asset as a task
outlet. 409 is returned if more than one DAG uses the asset as outlet.
@boring-cyborg boring-cyborg bot added the area:UI Related to UI/UX. For Frontend Developers. label Feb 13, 2025
@uranusjr uranusjr mentioned this pull request Feb 13, 2025
7 tasks
Copy link
Member

@pierrejeambrun pierrejeambrun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code looks good.

To what extend do we really need that endpoint ? While we can just query the asset details (get_asset), check the producing_tasks dag_ids and manually trigger one of those Run via the POST DagRun API if we only have 1 dag affected.

This operates across DagRun, Assets resources and return a 'DagRun' while we are querying the asset resource. All that seems a little confusing to me.

Does it have to be part of the public API ? Or can this be private if really required ?

@bbovenzi
Copy link
Contributor

Yeah, why is this needed? We can already manually trigger a dag run or manually create an asset event through the API.

@uranusjr
Copy link
Member Author

It’s in the vision of the data awareness proposal. The motivation is to be able to treat assets as the central concept like DAGs. When you want an asset to be refreshed, you can operate on the asset directly, instead of needing to go through the thought process of finding what DAG contains a task that refreshes the asset, and triggers that DAG instead (DAG is the central concept in this thought process).

Yeah we definitely don’t really need this, and we probably don’t need to do anything in the UI for 3.0. This is just a new thing that promotes the asset centric idea.

Copy link
Member

@pierrejeambrun pierrejeambrun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the details.

@uranusjr uranusjr merged commit d5b9d63 into apache:main Feb 17, 2025
46 checks passed
@uranusjr uranusjr deleted the materialize branch February 17, 2025 06:33
dantonbertuol pushed a commit to dantonbertuol/airflow that referenced this pull request Feb 17, 2025
This is done by triggering the DAG that has the given asset as a task
outlet. 409 is returned if more than one DAG uses the asset as outlet.
ntr pushed a commit to ntr/airflow that referenced this pull request Feb 20, 2025
This is done by triggering the DAG that has the given asset as a task
outlet. 409 is returned if more than one DAG uses the asset as outlet.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:UI Related to UI/UX. For Frontend Developers.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

New REST API endpoints for assets

3 participants