-
Notifications
You must be signed in to change notification settings - Fork 16.4k
Auto-correct stale bundle_name in DAG versions when DAG bundle configuration changes #49886
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
Auto-correct stale bundle_name in DAG versions when DAG bundle configuration changes #49886
Conversation
|
Tested this with and it fixes the issue reported here: #49861 for me. Also tested with 2 local dag bundles: started with this: Ran both dags, added a task to both dags, ran both dags again so both have a v2 version All runs correctly Removing one of the bundles also works as expected: the dag history is still shown but running it is not possible. No API server errors :) |
phanikumv
left a comment
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.
Please add a test covering this
Done |
|
While this worked, it doesn't seem like the right solution. A bundle was chosen randomly and versions updated. |
If there's a bundle name change without the dag structure changing, we should update the dag version to reflect the change. This issue was fixed in apache#49886 but the fix randomly assigned versions to the new bundle.
If there's a bundle name change without the dag structure changing, we should update the dag version to reflect the change. This issue was fixed in apache#49886 but the fix randomly assigned versions to the new bundle.
If there's a bundle name change without the dag structure changing, we should update the dag version to reflect the change. This issue was fixed in apache#49886 but the fix randomly assigned versions to the new bundle.
If there's a bundle name change without the dag structure changing, we should update the dag version to reflect the change. This issue was fixed in apache#49886 but the fix randomly assigned versions to the new bundle.
* Update dag version when bundle name changes If there's a bundle name change without the dag structure changing, we should update the dag version to reflect the change. This issue was fixed in #49886 but the fix randomly assigned versions to the new bundle. * fixup! Update dag version when bundle name changes * fixup! fixup! Update dag version when bundle name changes * fixup! fixup! fixup! Update dag version when bundle name changes * Change this to create new version when the bundle name changes
* Update dag version when bundle name changes If there's a bundle name change without the dag structure changing, we should update the dag version to reflect the change. This issue was fixed in #49886 but the fix randomly assigned versions to the new bundle. * fixup! Update dag version when bundle name changes * fixup! fixup! Update dag version when bundle name changes * fixup! fixup! fixup! Update dag version when bundle name changes * Change this to create new version when the bundle name changes (cherry picked from commit cc7abdc) Co-authored-by: Ephraim Anierobi <splendidzigy24@gmail.com>
* Update dag version when bundle name changes If there's a bundle name change without the dag structure changing, we should update the dag version to reflect the change. This issue was fixed in apache#49886 but the fix randomly assigned versions to the new bundle. * fixup! Update dag version when bundle name changes * fixup! fixup! Update dag version when bundle name changes * fixup! fixup! fixup! Update dag version when bundle name changes * Change this to create new version when the bundle name changes
) If there's a bundle name change without the dag structure changing, we should update the dag version to reflect the change. This issue was fixed in #49886 but the fix randomly assigned versions to the new bundle. * fixup! Update dag version when bundle name changes * fixup! fixup! Update dag version when bundle name changes * fixup! fixup! fixup! Update dag version when bundle name changes * Change this to create new version when the bundle name changes (cherry picked from commit cc7abdc) Co-authored-by: Ephraim Anierobi <splendidzigy24@gmail.com>
When the DAG bundle name is changed the dag_version.bundle_name field still points to the old, inactive bundle.
This causes a ValueError: Requested bundle is not configured error when accessing affected DAGs.
closes: #49861
^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in a newsfragment file, named
{pr_number}.significant.rstor{issue_number}.significant.rst, in airflow-core/newsfragments.