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

Validate DagRun state is valid on assignment #19898

Merged
merged 3 commits into from
Dec 1, 2021

Conversation

uranusjr
Copy link
Member

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

This should avoid the most obvious user errors without too much overhead
to the overall system.
@github-actions github-actions bot added the full tests needed We need to run full set of tests for this PR to merge label Nov 30, 2021
@github-actions
Copy link

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.

@uranusjr
Copy link
Member Author

LOL tests are blowing up because a ton of them just set invalid DagRun states

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.
@frapa-az
Copy link

frapa-az commented Dec 1, 2021

@uranusjr Thanks for putting the MR together!

@uranusjr uranusjr merged commit 5b50d61 into apache:main Dec 1, 2021
@uranusjr uranusjr deleted the validate-dagrun-state branch December 1, 2021 12:56
@jedcunningham jedcunningham added this to the Airflow 2.2.3 milestone Dec 7, 2021
jedcunningham pushed a commit that referenced this pull request Dec 7, 2021
@jedcunningham jedcunningham added the type:bug-fix Changelog: Bug Fixes label Dec 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
full tests needed We need to run full set of tests for this PR to merge type:bug-fix Changelog: Bug Fixes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants