apache / airflow

Apache Airflow - A platform to programmatically author, schedule, and monitor workflows
https://airflow.apache.org/
Apache License 2.0
35.76k stars 13.91k forks source link

Make pause DAG its own role separate from edit DAG #22317

Open brettplarson opened 2 years ago

brettplarson commented 2 years ago

Description

As an Airflow administrator I would like to be be able to configure a user account with permissions be able to "clear" and re-run a DAG run but also not be able to pause a DAG.

Currently this doesn't appear to be possible as Toggle DAG paused status and Clear DAG Run both come from the same DAGs.can_edit permission set.

Use case/motivation

A failure such as an unexpected reboot may require a non-privileged user to restart a run - without needing a huge amount of permissions.

It is really easy to click and pause a DAG when viewing / browsing in the UI.

Either cancelling an existing dag run or preventing further runs from proceeding can be an issue.

This happened a few times and has caused issues as the DAG was paused preventing important ETLs from running at their scheduled times.

Related issues

No response

Are you willing to submit a PR?

Code of Conduct

boring-cyborg[bot] commented 2 years ago

Thanks for opening your first issue here! Be sure to follow the issue template!

potiuk commented 2 years ago

Marked is a good-first-issue. Maybe someone would like to take it on. But if you feel like that @brettplarson the surest way to get it implemented is for you to contribute it :). You could join some 2000 contrinbutors to Airlfow.

danielbeach commented 2 years ago

@potiuk I would like to work on this as my first contribution. I would appreciate any mentorship through the process. I'm going to work this weekend to get every cloned and start investigating. Thanks!

potiuk commented 2 years ago

Sure :). Go ahead and ask questions. Ideally - in #airflow-how-to-pr channel in our slack so that it does not rely on me being present. There are plenty of contributors who can help. It does not have to be me

eladkal commented 2 years ago

@danielbeach are you still working on this issue?

danielbeach commented 2 years ago

@eladkal nope.

mrmammadov commented 1 year ago

@eladkal @potiuk is this issue still relevant? I would like to contribute

potiuk commented 1 year ago

Feel free.

eladkal commented 1 year ago

@mmenarguezpear are you still working on this issue?

herlambang commented 1 year ago

Hi,

I'm patching the permission, modify the security manager, views and templates and it seems good so far. If this issue is not progressing, I'd like to continue working on tests and make a PR. Thanks

eladkal commented 1 year ago

@herlambang assigning to you

DuanWeiFan commented 7 months ago

Hi folks, we are looking forward to this feature in our org. Wondering if the pr still active? I see it was closed automatically.

potiuk commented 7 months ago

You can take it over if you care for it and lead it to completion if you do not hear back.

DuanWeiFan commented 7 months ago

Thanks @potiuk Yes I would like to contribute here. Would create another pr once I have things tested and ready.