Skip to content

Bugfix, prevent force of unpause on trigger DAG#32456

Merged
bbovenzi merged 1 commit into
apache:mainfrom
boschglobal:bugfix/trigger-always-unpause-dag
Jul 13, 2023
Merged

Bugfix, prevent force of unpause on trigger DAG#32456
bbovenzi merged 1 commit into
apache:mainfrom
boschglobal:bugfix/trigger-always-unpause-dag

Conversation

@jscheffl

@jscheffl jscheffl commented Jul 9, 2023

Copy link
Copy Markdown
Contributor

Apache Airflow version

main (development) (not released)

What happened

This PR fixes a new bug introduced when finalizing AIP-50 and adjusting the trigger button behavior: Irrespective of the flag to unpause a DAG when using the Trigger UI, calling always un-pauses.

What you think should happen instead

Like advertised in the UI it should only be un-paused if the user selects so.

How to reproduce

  • Start Airflow, open the UI, use a disabled DAG with parameters. Click on the trigger UI
  • Disable the "un-pause when paused" switch and trigger. Un-pause will be made even if not desired

Root cause: The un-pause flag was added into the trigger URL and irrespective of the form value the URL parameter overrules the form setting.

Operating System

Ubuntu 20.04 / Breeze Dev setup in Py 3.8 Container

Versions of Apache Airflow Providers

No specific setup, execution in Breeze from latest main

Deployment

Other

Deployment details

Development setup via breeze start-airflow...
Python 3.8
Postgres
Celery worker

Anything else

To improve visibility I added a flash() message as a reminder that unpause is needed. Removed the unpause URL parameter.

With this PR the behavior changes as follows:

  • If DAG has no parameters and user triggers (w/o) form: A flash message will be shown if DAG is un-paused implicitly/automatically
  • If DAG has parameters and user switches off the "Un-pause" button a warning will be displayed that DAG is paused.

This PR will very probably generate a merge conflict with PR #31301 which is still not merged :-( Will resolve it...

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

@boring-cyborg boring-cyborg Bot added area:UI Related to UI/UX. For Frontend Developers. area:webserver Webserver related Issues labels Jul 9, 2023
@jscheffl jscheffl added this to the Airflow 2.7.0 milestone Jul 9, 2023
@jscheffl jscheffl added kind:bug This is a clearly a bug priority:medium Bug that should be fixed before next release but would not block a release labels Jul 9, 2023

@bbovenzi bbovenzi 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.

good catch. and I like the "dag is paused" warning.

@bbovenzi
bbovenzi merged commit 4a12bdb into apache:main Jul 13, 2023
@jscheffl
jscheffl deleted the bugfix/trigger-always-unpause-dag branch July 13, 2023 20:01
@ephraimbuddy ephraimbuddy added the type:bug-fix Changelog: Bug Fixes label Aug 2, 2023
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. area:webserver Webserver related Issues kind:bug This is a clearly a bug priority:medium Bug that should be fixed before next release but would not block a release type:bug-fix Changelog: Bug Fixes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants