-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Support fractional keep_jobs times #55313
Conversation
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.
@squidpickles If we're going down this path, I think it'd make more sense to define keep_jobs in seconds. This would however require a depreciation path but could be implemented behind a feature flag.
@dwoz Yes, I had that thought, but wasn't sure how much backwards compatibility factored in. If you can describe how this project makes breaking changes, I would be happy to implement it. |
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.
This needs a testcase and a changelog. This will also need to be rebased and conflicts fixed.
ping @squidpickles this is the documentation on how to deprecate code: https://docs.saltproject.io/en/latest/topics/development/deprecations.html Are you willing to come back to this PR and fix up the merge conflicts and resolve the requested feedback? |
Ah, that is helpful. Yes, I can do this. It may take me a few days to get to it, but happy to use integer seconds with a new field name. |
808b332
to
ecb42e6
Compare
Not sure about all the tests failing above. Is that common? I can't see any obvious errors in the (truncated) log output |
It looks like the job failures are related to this change. Its getting a keyerror in one of the tests because its expecting I've also asked for @dwoz feedback on this PR |
ecb42e6
to
a33692f
Compare
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.
Approved, assuming we fix the tests.
changelog/55295.changed
Outdated
@@ -0,0 +1 @@ | |||
renamed `keep_jobs`, specifying job cache TTL in hours, to `keep_jobs_seconds`, specifying TTL in seconds |
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 small request. Can you change the filename to .deprecated
. We have not changed anything yet, because you can still use keep_jobs
so the describption should reflect that keep_jobs
is on a deprecation path and will be removed in favor of keep_jobs_seconds in the Chlorine release.
I went ahead and change the filename and I updated the release to Argon. I was wrong in recommending Chlorine as we need to ensure the deprecation is in two releases before removing |
Thanks for that. Makes sense. Not sure about tests passing or not -- I have fixed the |
8440e3d
to
1b7518f
Compare
Congratulations on your first PR being merged! 🎉 |
What does this PR do?
Adds support for fractional
keep_jobs
interval times, so that times less than an hour can be specified.What issues does this PR fix or reference?
See #55295
Previous Behavior
Times specified are converted to
int
s.New Behavior
The time is now a float, so smaller / more precise intervals can be specified. Still using hours, rather than integer minutes or seconds, to preserve backwards compatibility.
Tests written?
Existing tests apply appear to pass
Commits signed with GPG?
Yes