Skip to content

Conversation

@hussein-awala
Copy link
Member

closes: #34092

To clear a TI, we don't delete the row, but we just update some fields like the state, job_id, task_retries, ... so technically we edit it.

Currently the required permissions to do that are edit dag run and delete task instance, which is IMHO a bug. WDYT about that?

However this fix could affect some users who have roles with delete permission without edit, so we should be careful.


^ 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.rst or {issue_number}.significant.rst, in newsfragments.

Copy link
Member

@jedcunningham jedcunningham left a comment

Choose a reason for hiding this comment

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

I agree, bug. The API also requires edit.

@potiuk
Copy link
Member

potiuk commented Sep 5, 2023

I agree, bug. The API also requires edit.

Yep. I looked it up in API first and saw EDIT - but missed the clear() endpoint.

@uranusjr uranusjr merged commit 2f5777c into apache:main Sep 5, 2023
@ephraimbuddy ephraimbuddy added this to the Airflow 2.7.2 milestone Oct 3, 2023
@ephraimbuddy ephraimbuddy added the type:bug-fix Changelog: Bug Fixes label Oct 3, 2023
ephraimbuddy pushed a commit that referenced this pull request Oct 5, 2023
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.

Can Delete on Task Instances permission is required to clear task

5 participants