Skip to content

Reenable clear on TaskInstanceModelView for role User#30415

Merged
potiuk merged 5 commits intoapache:mainfrom
eejbyfeldt:reenable-clear-on-task-instance-page
Apr 22, 2023
Merged

Reenable clear on TaskInstanceModelView for role User#30415
potiuk merged 5 commits intoapache:mainfrom
eejbyfeldt:reenable-clear-on-task-instance-page

Conversation

@eejbyfeldt
Copy link
Copy Markdown

The action was disable in #20659 which resolved #20655. The issue only mentions that the edit is broken and should be disabled. So it seem like the disabling of the clear action was unintentional.

Also based on the discussion in the PR #20655 further reinforces this. That the author believed it still worked could be explain by that using a user with role Admin the action was still available and therefore one could easily make a mistake believing it still worked as expected.

This PR reenables it action and modifies and existing test case to also verify that clearing is possible using a user with the role User.

This closes #30414

@boring-cyborg boring-cyborg bot added the area:webserver Webserver related Issues label Apr 1, 2023
@eejbyfeldt eejbyfeldt force-pushed the reenable-clear-on-task-instance-page branch 2 times, most recently from e561cd2 to 53f3b5f Compare April 2, 2023 05:30
@bbovenzi
Copy link
Copy Markdown
Contributor

bbovenzi commented Apr 4, 2023

If we're going to reenable clear, we will also want to reenable set_failed and set_success

Emil Ejbyfeldt added 2 commits April 12, 2023 10:30
The action was disable in apache#20659
which resolved apache#20655. The issue
only mentions that the edit is broken and should be disabled. So it seem
like the disabling of the clear action was unintentional.

Also based on the discussion in the PR
apache#20655 further reinforces this.
That the author believed it still worked could be explain by that using
a user with role `Admin` the action was still available and therefore
one could easily make a mistake believing it still worked as expected.

This PR reenables it action and modifies and existing test case to also
verify that clearing is possible using a user with the role `User`.
@eejbyfeldt eejbyfeldt force-pushed the reenable-clear-on-task-instance-page branch from 53f3b5f to fe22c1a Compare April 12, 2023 08:32
@eejbyfeldt
Copy link
Copy Markdown
Author

If we're going to reenable clear, we will also want to reenable set_failed and set_success

Added back all the set state * actions.

Comment thread airflow/www/views.py Outdated
@eladkal eladkal added this to the Airflow 2.6.1 milestone Apr 17, 2023
@eladkal eladkal added the type:bug-fix Changelog: Bug Fixes label Apr 17, 2023
@potiuk potiuk merged commit b140c44 into apache:main Apr 22, 2023
ephraimbuddy pushed a commit that referenced this pull request May 8, 2023
* Reenable clear on TaskInstanceModelView for role User

The action was disable in #20659
which resolved #20655. The issue
only mentions that the edit is broken and should be disabled. So it seem
like the disabling of the clear action was unintentional.

Also based on the discussion in the PR
#20655 further reinforces this.
That the author believed it still worked could be explain by that using
a user with role `Admin` the action was still available and therefore
one could easily make a mistake believing it still worked as expected.

This PR reenables it action and modifies and existing test case to also
verify that clearing is possible using a user with the role `User`.

* Add back other set state actions

* fix static checks

---------

Co-authored-by: eladkal <45845474+eladkal@users.noreply.github.com>
(cherry picked from commit b140c44)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:webserver Webserver related Issues type:bug-fix Changelog: Bug Fixes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cannot clear tasking instances on "List Task Instance" page with User role Edit Task Instance Page does not save updates.

4 participants