Skip to content
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

Add allowed_run_types parameter to Dag class #45146

Open
1 task done
eladkal opened this issue Dec 22, 2024 · 3 comments
Open
1 task done

Add allowed_run_types parameter to Dag class #45146

eladkal opened this issue Dec 22, 2024 · 3 comments
Labels
area:API Airflow's REST/HTTP API area:core area:UI Related to UI/UX. For Frontend Developers. kind:feature Feature Requests

Comments

@eladkal
Copy link
Contributor

eladkal commented Dec 22, 2024

Body

Some workflows are designed to be purely automatic. We should allow the capability for DAG author to declare DAG as scheduled run only. This means:

  1. Create manual run button from the UI will generate error / be disabled.
  2. Create manual run from API will generate error.
  3. Scheduler will not run tasks of manual DagRuns if the parameter is set.

To allow flexibility I'm proposing the allowed_run_types should be enum ['Scheduled', 'Backfill', 'Manual'] where user choose what to set. Thus we need to define the set of allowed rules per type.

Committer

  • I acknowledge that I am a maintainer/committer of the Apache Airflow project.
@eladkal eladkal added kind:feature Feature Requests area:core labels Dec 22, 2024
@dosubot dosubot bot added area:API Airflow's REST/HTTP API area:UI Related to UI/UX. For Frontend Developers. labels Dec 22, 2024
@eladkal eladkal changed the title Add prevent_manual_run_creation parameter to Dag class Add allowed_run_types parameter to Dag class Dec 22, 2024
@jason810496
Copy link
Contributor

Hi @eladkal, I can work on this issue, could you assign to me ? Thanks !
I also have a question: Does this mean that allowed_run_types should accept DagRunType instead of creating a new enum class in the models.dag module?

@potiuk
Copy link
Member

potiuk commented Dec 22, 2024

To allow flexibility I'm proposing the allowed_run_types should be enum ['Scheduled', 'Backfill', 'Manual'] where user choose what to set. Thus we need to define the set of allowed rules per type.

I have a feeling that this one might be somewhat impacted by decision on what we do here https://cwiki.apache.org/confluence/display/AIRFLOW/AIP-83+amendment+to+support+classic+Airflow+authoring+style - that seems very much related.

@potiuk
Copy link
Member

potiuk commented Dec 22, 2024

So probably we should wait until decision for this one happens

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:API Airflow's REST/HTTP API area:core area:UI Related to UI/UX. For Frontend Developers. kind:feature Feature Requests
Projects
None yet
Development

No branches or pull requests

3 participants