Skip to content

Support bundle version param in trigger dag run endpoint #60484

@zach-overflow

Description

@zach-overflow

Description

As of Airflow 3.1.5, it appears that the Airflow API does not support selecting an arbitrary dag version / bundle version to trigger via the /api/v2/dags/{dag_id}/dagRuns POST endpoint. As far as I can tell, when a client submits a request to the trigger dag run endpoint, the underlying DagRun instance is always created with the latest dag_version, and either a null bundle_version, or the current bundle version.

If I'm understanding the distinction between bundle versions and dag versions correctly, then I believe this feature request would entail supporting an optional bundle_version parameter in the trigger dag run post requests. Requests without that parameter would trigger a dag run as they currently do, whereas requests with that parameter would trigger a prior bundled version of the dag (if the provided bundle_version exists, and if the dag bundle supports versioning).

Use case/motivation

It would be nice in certain scenarios to programmatically trigger a dag run for a specific past dag version. For example, to compare the results, side effects, or other behaviors associated with a "past" dag bundle version and the "latest" of that same dag.

Related issues

None that I could find, but feel free to link any that I may have missed.

Are you willing to submit a PR?

  • Yes I am willing to submit a PR!

Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:APIAirflow's REST/HTTP APIkind:featureFeature Requestsneeds-triagelabel for new issues that we didn't triage yet

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions