-
Notifications
You must be signed in to change notification settings - Fork 16.2k
Fix priority_weight NOT NULL constraint in provider tests
#59833
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
Closed
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
uranusjr
approved these changes
Dec 26, 2025
Member
|
I’m doing a fix in a more blanket way in #59835, but eventually we should fix all tests to do this instead. |
Collaborator
Author
a9a0da2 to
f9a9434
Compare
potiuk
approved these changes
Dec 27, 2025
Member
f9a9434 to
8654ba1
Compare
8654ba1 to
3122c97
Compare
Collaborator
Author
3122c97 to
dcd9918
Compare
amoghrajesh
approved these changes
Dec 29, 2025
Contributor
amoghrajesh
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a nit, otherwise LGTM
After commit 60b4ed4 ("Remove PriorityWeightStrategy reference in SDK"), SDK operators store weight_rule as a string instead of a PriorityWeightStrategy object. When TaskInstance.refresh_from_task() calls task.weight_rule.get_weight(), it fails silently due to contextlib.suppress(Exception), leaving priority_weight unset. Fix by wrapping SDK operators with create_scheduler_operator() before passing to TaskInstance, matching the pattern used in core tests.
dcd9918 to
08734bc
Compare
Member
|
Worth waiting for #59835 to be merged? |
Collaborator
Author
Collaborator
Author
|
Closing because unnecessary after #59835. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
area:providers
provider:apache-kylin
provider:apache-spark
provider:cncf-kubernetes
Kubernetes (k8s) provider related issues
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
After commit 60b4ed4 ("Remove PriorityWeightStrategy reference in SDK"), SDK operators store weight_rule as a string instead of a PriorityWeightStrategy object. When TaskInstance.refresh_from_task() calls task.weight_rule.get_weight(), it fails silently due to contextlib.suppress(Exception), leaving priority_weight unset.
Fix by wrapping SDK operators with create_scheduler_operator() before passing to TaskInstance, matching the pattern used in core tests.
^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in a newsfragment file, named
{pr_number}.significant.rstor{issue_number}.significant.rst, in airflow-core/newsfragments.