-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Make task.disable_window be default source of window int #3081
Conversation
Please could one of @dlstadther , @Tarrasch or another maintainer approve the workflow so that tests run? |
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.
I agree this is what is should have been all along.
|
||
@property | ||
def disable_window_seconds(self): | ||
warnings.warn("Use of `disable_window_seconds` has been deprecated, use `disable_window` instead", DeprecationWarning) | ||
return None | ||
return self.disable_window |
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.
Does this line need a test added to get Codecov to go green? Happy to add it if required.
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.
I think this is what Codecov
is complains about. If you can fix it, it would awesome.
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.
quick skim looks like only the scheduler's disable_window
param is unittested. I don't immediately see any of the Task's. Having test coverage would be great if there's valuable logic that be added to verify. I won't block approval and merge without it. Let me know what you want to do.
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.
Have added a very basic test on disable_window_seconds
which (hopefully) will give the required coverage 🤞🏻
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.
lgtm
Description
When accessing
task.disable_window
property, use the property directly. Do not call the deprecatedtask.disable_window_seconds
.Motivation and Context
Fixes #3029
Current implementation gives a deprecation warning even when accessing the correct
task.disable_window
property, which is confusing. Fixing this means that the deprecation warning becomes more meaningful - it will only appear whentask.disable_window_seconds
is incorrectly accessed.Have you tested this? If so, how?
Have ran this change locally for me in my employers' Luigi test suite and removed 21 warnings when running a small test on a single task. However, that test suite does not use
disable_window
.