-
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
Ensure priority weight is capped at 32-bit integer to prevent roll-over #43611
base: main
Are you sure you want to change the base?
Ensure priority weight is capped at 32-bit integer to prevent roll-over #43611
Conversation
Besides some adjustments because of rework of classes in regards of TeskSDK I think this can also be back-ported to Ariflow 2.10 line to prevent errors in roll-over. Therefore tagging as 2.10.4 milestone... but backport would most likely a re-write of this PR. |
should we have a newsfragment (just in case) just explaining what happened? |
c18bfe7
to
e9649e6
Compare
self.priority_weight = max( | ||
MINIMUM_PRIORITY_WEIGHT, min(MAXIMUM_PRIORITY_WEIGHT, self.priority_weight) | ||
) |
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.
Shoud we use db_safe_priority
here instead of re-impl?
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.
Would like to but the implementaiton currently is in airflow-utils
- I asusme we want to have task SDK split apart from core?
Still what I can do is implement the same in task-SDK as utility... the old abstract/base operator in core will go away once AIP-72 is complete, correct?
This is an alternative PR to #42410 via not converting the priority_weight to float but ensure no roll-over in int is happening - by capping INT values to database limits.
There are several attempts to fix this problem: