-
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
Validate DagRun state is valid on assignment #19898
Conversation
This should avoid the most obvious user errors without too much overhead to the overall system.
The PR most likely needs to run full matrix of tests because it modifies parts of the core of Airflow. However, committers might decide to merge it quickly and take the risk. If they don't merge it quickly - please rebase it to the latest main at your convenience, or amend the last commit of the PR, and push it with --force-with-lease. |
LOL tests are blowing up because a ton of them just set invalid DagRun states |
179d03a
to
affc563
Compare
On the rare occasion we really need to initialize a DagRun with None state (for testing purposes), we can just skip setting state, since SQLAlchemy automatically initializes the declared_attr to None for us anyway.
affc563
to
5607064
Compare
35d8d1d
to
7950102
Compare
@uranusjr Thanks for putting the MR together! |
(cherry picked from commit 5b50d61)
This should avoid the most obvious user errors without too much overhead to the overall system. Nowhere near perfect, but if the user goes even lower level than this, they are obviously on their own.
Ref: #19836