Skip to content

Add the option to select bundle version parameter on dag run trigger endpoint#61550

Merged
pierrejeambrun merged 117 commits into
apache:mainfrom
itayweb:feat-bundle-version-support-dagrun
Jul 10, 2026
Merged

Add the option to select bundle version parameter on dag run trigger endpoint#61550
pierrejeambrun merged 117 commits into
apache:mainfrom
itayweb:feat-bundle-version-support-dagrun

Conversation

@itayweb

@itayweb itayweb commented Feb 6, 2026

Copy link
Copy Markdown
Contributor

A new feature in the dag run REST API, adding the option to add bundle version parameter to trigger specific version.
Wasn't sure how can I add to this a unit test due to need a git repo/s3 bucket, let me know if needed


Was generative AI tooling used to co-author this PR?
  • Yes (please specify the tool below)

Generated-by: [Cursor] following the guidelines

@boring-cyborg boring-cyborg Bot added area:API Airflow's REST/HTTP API area:DAG-processing labels Feb 6, 2026
@itayweb itayweb force-pushed the feat-bundle-version-support-dagrun branch from 5b3753a to eea1f7d Compare February 7, 2026 14:58
@itayweb itayweb force-pushed the feat-bundle-version-support-dagrun branch from eea1f7d to a862cd3 Compare February 7, 2026 18:22
@itayweb itayweb requested a review from potiuk as a code owner February 7, 2026 18:22
@itayweb itayweb force-pushed the feat-bundle-version-support-dagrun branch from a862cd3 to d47dcd4 Compare February 8, 2026 12:33
@itayweb itayweb force-pushed the feat-bundle-version-support-dagrun branch from d47dcd4 to 4aad19c Compare February 8, 2026 15:40
@itayweb itayweb force-pushed the feat-bundle-version-support-dagrun branch from 4aad19c to a87673a Compare February 8, 2026 19:51

@pierrejeambrun pierrejeambrun left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Overall this looks good to me.

Can you add unit tests to verify that behavior when we actually pass a 'bundle_version'.

I'd love a second look from versioning experts.

Comment thread airflow-core/src/airflow/serialization/definitions/dag.py Outdated
Comment thread airflow-core/src/airflow/serialization/definitions/dag.py
Comment thread airflow-core/src/airflow/models/dag_version.py Outdated
@itayweb itayweb requested a review from ephraimbuddy June 28, 2026 19:42
Comment thread airflow-core/src/airflow/serialization/definitions/dag.py Outdated
Comment thread airflow-core/src/airflow/api_fastapi/core_api/routes/public/dag_run.py Outdated
@itayweb itayweb requested a review from henry3260 as a code owner July 3, 2026 13:43
@itayweb itayweb requested a review from ephraimbuddy July 3, 2026 13:45

@ephraimbuddy ephraimbuddy left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

Comment thread uv.lock
Comment thread airflow-core/src/airflow/serialization/definitions/dag.py Outdated
@pierrejeambrun pierrejeambrun added the backport-to-v3-3-test Backport to v3-3-test label Jul 10, 2026
@pierrejeambrun pierrejeambrun merged commit 1ce3f17 into apache:main Jul 10, 2026
147 checks passed
@pierrejeambrun

Copy link
Copy Markdown
Member

Great! 🎉

@github-actions

Copy link
Copy Markdown
Contributor

Backport successfully created: v3-3-test

Note: As of Merging PRs targeted for Airflow 3.X
the committer who merges the PR is responsible for backporting the PRs that are bug fixes (generally speaking) to the maintenance branches.

In matter of doubt please ask in #release-management Slack channel.

Status Branch Result
v3-3-test PR Link

github-actions Bot pushed a commit to aws-mwaa/upstream-to-airflow that referenced this pull request Jul 10, 2026
…run trigger endpoint (apache#61550)

* feat: adding the option to add bundle version parameter on dag run trigger endpoint

* removing code comments and adding the new parameter to the schema

* feat: adding the new parameter to schema and types files

* fix: fixing format and missing field in class

* fix: fixing the usage of bundle version in orm dagrun creation

* feat: added migration file

* feat: adding unit test for bundle version parameter dagrun endpoint

* fix: fixing the unit test by removing unecessary asserts

* fix: removing duplicate dag version check and raising exception accordingly

* fix: adding a raise exception when passing incorrect bundle version

* fix: verify exception message to raise accordingly

* fix: wiring to bundle version and moved to the correct version target

* fix: missed adding bundle_version field in 2 unit tests response assertion

* fix: adding missing bundle version field in tests

* fix: handling dag and dag's tasks correctly when passing bundle version

* feat: added new airflow exception to handle no dag version has found

* fix: assigning run dag to dag version when only using bundle version

* fix: fixing assertion equal failing

* fix: removed unecessary init files after prek hook added them

* fix: adding support for all the dag-level callbacks

* feat: adding versioning test for bundle version parameter

* fix: rebasing branch

* feat: adding the option to add bundle version parameter on dag run trigger endpoint

* removing code comments and adding the new parameter to the schema

* feat: adding the new parameter to schema and types files

* fix: fixing format and missing field in class

* fix: fixing the usage of bundle version in orm dagrun creation

* feat: added migration file

* feat: adding unit test for bundle version parameter dagrun endpoint

* fix: fixing the unit test by removing unecessary asserts

* fix: removing duplicate dag version check and raising exception accordingly

* fix: adding a raise exception when passing incorrect bundle version

* fix: verify exception message to raise accordingly

* fix: wiring to bundle version and moved to the correct version target

* fix: missed adding bundle_version field in 2 unit tests response assertion

* fix: adding missing bundle version field in tests

* fix: handling dag and dag's tasks correctly when passing bundle version

* feat: added new airflow exception to handle no dag version has found

* fix: assigning run dag to dag version when only using bundle version

* fix: fixing assertion equal failing

* fix: removed unecessary init files after prek hook added them

* fix: adding support for all the dag-level callbacks

* fix: prek didn't updated datamodels for airflowctl

* fix: adding bundle version support also in asset route, fixing execution api versioning, and also getting latest version of dag with bundle version

* fix: duplicate import and duplicate methods

* fix: remove duplicate DagVersion lookup and unintended dag swap for non-explicit triggers

* fix: reverting uv lock due to unnecessary changes

* fix: fixing test to resolve ci errors

* fix: restore uv.lock to upstream/main

* fix: remove double code, moving to new CalVer file, raising correct exception and add more callbacks support in test

* fix: instead of always using latest dag using the correct dag if bundle version is passed

* fix: missing fields in schema.json

* Regenerate supervisor schema snapshot after rebase onto main

The schema.json was stale: it contained legacy top-level $defs
(DagRun, DagRunState, DagRunType, JsonValue, and nested asset
reference types) that the generator no longer emits after upstream
main restructured them. bundle_version also needed to land at the
correct offset in the generated output.

* fix: consolidate bundle version resolution, fix double deserialization, drop bundle_version from Execution API

* restored provider_dependencies.json.sha256sum

* Fix bundle_version overwritten by sync_dag_to_db and stale supervisor schema snapshot

* revert accidently changes to uv.lock

* Move AddPartitionDateField to 2026-06-30 version to match partition_date introduction timeline

* Remove dead AirflowBadRequest handler and unintended execution API version split

* Derive run context from requested bundle version on trigger

* Validate partition_key and allowed_run_types against the requested bundle version

* Revert accidental uv.lock

* Regenerate private UI OpenAPI spec

* Removing unnecessary callback attributes

* Remove unnecessary test due to remove bundle version from execution api

---------
(cherry picked from commit 1ce3f17)

Co-authored-by: Itay Adler <35665981+itayweb@users.noreply.github.com>
Co-authored-by: Itay Adler <itayadler@MacBook-Pro-sl-Itay.local>
Co-authored-by: Itay Adler <itayadler@Itays-Mac-mini.lan>
aws-airflow-bot pushed a commit to aws-mwaa/upstream-to-airflow that referenced this pull request Jul 10, 2026
…run trigger endpoint (apache#61550)

* feat: adding the option to add bundle version parameter on dag run trigger endpoint

* removing code comments and adding the new parameter to the schema

* feat: adding the new parameter to schema and types files

* fix: fixing format and missing field in class

* fix: fixing the usage of bundle version in orm dagrun creation

* feat: added migration file

* feat: adding unit test for bundle version parameter dagrun endpoint

* fix: fixing the unit test by removing unecessary asserts

* fix: removing duplicate dag version check and raising exception accordingly

* fix: adding a raise exception when passing incorrect bundle version

* fix: verify exception message to raise accordingly

* fix: wiring to bundle version and moved to the correct version target

* fix: missed adding bundle_version field in 2 unit tests response assertion

* fix: adding missing bundle version field in tests

* fix: handling dag and dag's tasks correctly when passing bundle version

* feat: added new airflow exception to handle no dag version has found

* fix: assigning run dag to dag version when only using bundle version

* fix: fixing assertion equal failing

* fix: removed unecessary init files after prek hook added them

* fix: adding support for all the dag-level callbacks

* feat: adding versioning test for bundle version parameter

* fix: rebasing branch

* feat: adding the option to add bundle version parameter on dag run trigger endpoint

* removing code comments and adding the new parameter to the schema

* feat: adding the new parameter to schema and types files

* fix: fixing format and missing field in class

* fix: fixing the usage of bundle version in orm dagrun creation

* feat: added migration file

* feat: adding unit test for bundle version parameter dagrun endpoint

* fix: fixing the unit test by removing unecessary asserts

* fix: removing duplicate dag version check and raising exception accordingly

* fix: adding a raise exception when passing incorrect bundle version

* fix: verify exception message to raise accordingly

* fix: wiring to bundle version and moved to the correct version target

* fix: missed adding bundle_version field in 2 unit tests response assertion

* fix: adding missing bundle version field in tests

* fix: handling dag and dag's tasks correctly when passing bundle version

* feat: added new airflow exception to handle no dag version has found

* fix: assigning run dag to dag version when only using bundle version

* fix: fixing assertion equal failing

* fix: removed unecessary init files after prek hook added them

* fix: adding support for all the dag-level callbacks

* fix: prek didn't updated datamodels for airflowctl

* fix: adding bundle version support also in asset route, fixing execution api versioning, and also getting latest version of dag with bundle version

* fix: duplicate import and duplicate methods

* fix: remove duplicate DagVersion lookup and unintended dag swap for non-explicit triggers

* fix: reverting uv lock due to unnecessary changes

* fix: fixing test to resolve ci errors

* fix: restore uv.lock to upstream/main

* fix: remove double code, moving to new CalVer file, raising correct exception and add more callbacks support in test

* fix: instead of always using latest dag using the correct dag if bundle version is passed

* fix: missing fields in schema.json

* Regenerate supervisor schema snapshot after rebase onto main

The schema.json was stale: it contained legacy top-level $defs
(DagRun, DagRunState, DagRunType, JsonValue, and nested asset
reference types) that the generator no longer emits after upstream
main restructured them. bundle_version also needed to land at the
correct offset in the generated output.

* fix: consolidate bundle version resolution, fix double deserialization, drop bundle_version from Execution API

* restored provider_dependencies.json.sha256sum

* Fix bundle_version overwritten by sync_dag_to_db and stale supervisor schema snapshot

* revert accidently changes to uv.lock

* Move AddPartitionDateField to 2026-06-30 version to match partition_date introduction timeline

* Remove dead AirflowBadRequest handler and unintended execution API version split

* Derive run context from requested bundle version on trigger

* Validate partition_key and allowed_run_types against the requested bundle version

* Revert accidental uv.lock

* Regenerate private UI OpenAPI spec

* Removing unnecessary callback attributes

* Remove unnecessary test due to remove bundle version from execution api

---------
(cherry picked from commit 1ce3f17)

Co-authored-by: Itay Adler <35665981+itayweb@users.noreply.github.com>
Co-authored-by: Itay Adler <itayadler@MacBook-Pro-sl-Itay.local>
Co-authored-by: Itay Adler <itayadler@Itays-Mac-mini.lan>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:API Airflow's REST/HTTP API area:DAG-processing backport-to-v3-3-test Backport to v3-3-test ready for maintainer review Set after triaging when all criteria pass.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support bundle version param in trigger dag run endpoint

10 participants