-
Notifications
You must be signed in to change notification settings - Fork 14.3k
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
CLI: airflow dags test { dag w/ schedule_interval=None }
error: "No run dates were found"
#18473
Comments
airflow dags test { any dag with schedule_interval=None }
causes error: "No run dates were found"airflow dags test { dag w/ schedule_interval=None }
causes error: "No run dates were found"
airflow dags test { dag w/ schedule_interval=None }
causes error: "No run dates were found"airflow dags test { dag w/ schedule_interval=None }
error: "No run dates were found"
I had filed this issue in the wrong repo previously (oops). Here's a comment about it from @uranusjr :
|
Some additional unorganised thoughts:
|
regarding (4), the trouble with using those commands as a substitute for
Also, they require that you have a scheduler running, which is a small step, but still an extra setup/teardown to keep track of. |
That’s a good point. It’s difficult to have the same behaviour the same for |
cc @ashb for thoughts. |
I've submitted a hack to restore the behaviour #18742. I'm still not entirely convinced this is the right thing to do; maybe eventually we should get rid of |
Yeah now that you mention it, |
This restores the behavior around this prior to AIP-39 implementation. It is arguably not correct, but nobody ever complained about it (and they have to the new behavior), so we should meet user expectations. Close #18473
Apache Airflow version
2.2.0b2 (beta snapshot)
Operating System
ubuntu 20.04
Versions of Apache Airflow Providers
n/a
Deployment
Virtualenv installation
Deployment details
pip install /path/to/airflow/src
What happened
Given any DAG initialized with:
schedule_interval=None
Run
airflow dags test mydagname $(date +%Y-%m-%d)
and get an error:This behavior changed in #15397, it used to trigger a backfill dagrun at the given date.
What you expected to happen
I expected a backfill dagrun with the given date, regardless of whether it fit into the
schedule_interval
.If AIP-39 made that an unrealistic expectation, then I'd hope for some way to define unscheduled dags which can still be tested from the command line (which, so far as I know, is the fastest way to iterate on a DAG.).
As it is, I keep changing
schedule_interval
back and forth depending on whether I want to iterate viaastro dev start
(which toleratesNone
but does superfluous work if the dag is scheduled) or viaairflow dags test ...
(which doesn't tolerateNone
).How to reproduce
Initialize a DAG with:
schedule_interval=None
and run it viaairflow dags test mydagname $(date +%Y-%m-%d)
Anything else
No response
Are you willing to submit PR?
Code of Conduct
The text was updated successfully, but these errors were encountered: