Skip to content

Add bundle_version to DagRun response #49726

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

Merged
merged 3 commits into from
Apr 25, 2025

Conversation

dstandish
Copy link
Contributor

The field was missing.

Note on relationship to #49007...

In #49007 the concern was raised about the DagVersion record not pointing to the current bundle version when the bundle version changed but dag structure did not.

The user assumed that this meant the dag run was associated with the wrong bundle version. Adding the dag run bundle version will let the user see that that the associaton is correct.

Users may now see two "bundle versions" in the dag run response. But the reason for this can be understood. If the DagVersion record points to an older bundle version, it is because the dag structure did not change when the code changed. But since the scheduler just cares about dag structure, it doesn't matter, and it still tells the truth -- the version of the dag version is the bundle version which caused that revision.

closes #49007

@boring-cyborg boring-cyborg bot added area:airflow-ctl area:API Airflow's REST/HTTP API area:UI Related to UI/UX. For Frontend Developers. labels Apr 24, 2025
@kaxil kaxil added this to the Airflow 3.0.1 milestone Apr 24, 2025
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.

Nice, we just need to update the tests.

Should we display this is the UI ? For instance in the details tab for dagrun, for now only versions in dag_versions are shown. (and there is a bundle there) but I guess we can add a DagRun.bundle_name section

@bbovenzi
Copy link
Contributor

@dstandish
Copy link
Contributor Author

We might need to update the Dag Run Details page: https://github.com/apache/airflow/blob/main/airflow-core/src/airflow/ui/src/pages/Run/Details.tsx#L140

Yeah so the dag versions are what the dag versions are... they are sort of useless for the user. For a dag run in a dag that uses a versioned bundle (yes, too many conceps), it will always point to just one dag version; though that dag version might correspond to a bundle version that was "old" at time dag run created.

all quite confusing, yes.

The field was missing.

Note on relationship to apache#49007...

In apache#49007 the concern was raised about the DagVersion record not pointing to the current bundle version when the bundle version changed but dag structure did not.

The user assumed that this meant the dag run was associated with the wrong bundle version. Adding the dag run bundle version will let the user see that that the associaton is correct.

Users may now see two "bundle versions" in the dag run response.  But the reason for this can be understood.  If the DagVersion record points to an older bundle version, it is because the dag structure did not change when the code changed.  But since the scheduler just cares about dag structure, it doesn't matter, and it still tells the truth -- the version of the dag version is the bundle version which caused that revision.

closes apache#49007
@dstandish dstandish force-pushed the add-bundle-version-to-dag-run branch from f775164 to 441d895 Compare April 24, 2025 22:17
@dstandish
Copy link
Contributor Author

Looks like the errors are related to edge executor; merging

@dstandish dstandish merged commit b70ece0 into apache:main Apr 25, 2025
90 of 95 checks passed
@dstandish dstandish deleted the add-bundle-version-to-dag-run branch April 25, 2025 03:51
prabhusneha pushed a commit to astronomer/airflow that referenced this pull request Apr 25, 2025
The field was missing.

Note on relationship to apache#49007...

In apache#49007 the concern was raised about the DagVersion record not pointing to the current bundle version when the bundle version changed but dag structure did not.

The user assumed that this meant the dag run was associated with the wrong bundle version. Adding the dag run bundle version will let the user see that that the associaton is correct.

Users may now see two "bundle versions" in the dag run response.  But the reason for this can be understood.  If the DagVersion record points to an older bundle version, it is because the dag structure did not change when the code changed.  But since the scheduler just cares about dag structure, it doesn't matter, and it still tells the truth -- the version of the dag version is the bundle version which caused that revision.

closes apache#49007
kaxil pushed a commit that referenced this pull request Apr 25, 2025
The field was missing.

Note on relationship to #49007...

In #49007 the concern was raised about the DagVersion record not pointing to the current bundle version when the bundle version changed but dag structure did not.

The user assumed that this meant the dag run was associated with the wrong bundle version. Adding the dag run bundle version will let the user see that that the associaton is correct.

Users may now see two "bundle versions" in the dag run response.  But the reason for this can be understood.  If the DagVersion record points to an older bundle version, it is because the dag structure did not change when the code changed.  But since the scheduler just cares about dag structure, it doesn't matter, and it still tells the truth -- the version of the dag version is the bundle version which caused that revision.

closes #49007

(cherry picked from commit b70ece0)
jroachgolf84 pushed a commit to jroachgolf84/airflow that referenced this pull request Apr 30, 2025
The field was missing.

Note on relationship to apache#49007...

In apache#49007 the concern was raised about the DagVersion record not pointing to the current bundle version when the bundle version changed but dag structure did not.

The user assumed that this meant the dag run was associated with the wrong bundle version. Adding the dag run bundle version will let the user see that that the associaton is correct.

Users may now see two "bundle versions" in the dag run response.  But the reason for this can be understood.  If the DagVersion record points to an older bundle version, it is because the dag structure did not change when the code changed.  But since the scheduler just cares about dag structure, it doesn't matter, and it still tells the truth -- the version of the dag version is the bundle version which caused that revision.

closes apache#49007
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:airflow-ctl area:API Airflow's REST/HTTP API area:UI Related to UI/UX. For Frontend Developers.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Versioned dag run uses the latest version of serialized dag in the Scheduler instead of sticking to their version
4 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy