-
Notifications
You must be signed in to change notification settings - Fork 14.4k
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
Scheduler executes tasks for temporary DagRuns created by the airflow tasks test command #35994
Open
1 of 2 tasks
Labels
Comments
smphhh
added
area:core
kind:bug
This is a clearly a bug
needs-triage
label for new issues that we didn't triage yet
labels
Dec 1, 2023
smphhh
changed the title
Scheduler executes tasks for temporary DagRuns created by airflow tasks test
Scheduler executes tasks for temporary DagRuns created by the airflow tasks test command
Dec 1, 2023
Edit: never mind this comment, I now see #34109 reports what I mention here. I also see that behaviour on 2.7.3. I don't know if it's related, but now whenever I test a task from the cli, regardless of whether or not the task finishes successfully, I see this at the end of the output:
Click to see complete exception details
|
RNHTTR
added
area:Scheduler
including HA (high availability) scheduler
and removed
area:core
needs-triage
label for new issues that we didn't triage yet
labels
Dec 29, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Apache Airflow version
2.7.3
Also tested on 2.8.0b1
What happened
When a temporary DagRun is created by the
airflow tasks test
command the scheduler will start executing all tasks for that DagRun, including the one also ran by the test command.What you think should happen instead
Scheduler shouldn't launch tasks for such temporary DagRuns as this is totally unexpected for the user.
How to reproduce
Use the
airflow tasks test
command to launch a test run of a task using an execution date without an existing DagRun. The command will then create a new temporary DagRun in the database, and if the Dag is active the scheduler will start launching tasks for that run.Note that this is more evident when testing a task that takes a while to complete as the temporary DagRun is deleted after the task completes, which will cause the task runs launched by the scheduler to stop.
Operating System
Linux 94b223524983 6.1.32-0-virt #1-Alpine SMP PREEMPT_DYNAMIC Mon, 05 Jun 2023 09:39:09 +0000 x86_64 x86_64 x86_64 GNU/Linux
Versions of Apache Airflow Providers
No response
Deployment
Other Docker-based deployment
Deployment details
No response
Anything else
I think one possible solution would be to create an new DagRun type for the temporary runs. The scheduler wouldn't launch tasks for such runs as is the case with backfill runs, but the temporary runs wouldn't affect the timing of new runs unlike I believe is the case with backfill runs.
Also I think it would probably be clearer if the temporary runs wouldn't be shown in the dag grid view.
Are you willing to submit PR?
Code of Conduct
The text was updated successfully, but these errors were encountered: