-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Allow human readable duration strings in DecorationConfig duration fields. #12100
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
Conversation
98c7c8f
to
0837828
Compare
thanks |
LGTM label has been added. Git tree hash: b69f654312f6b0b733348257dbdbfd51ce4090cd
|
I think the Couldn't we just make |
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.
Are we adding a deprecation warning?
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.
+1 to Katharine's comment
0837828
to
da9fd3b
Compare
I got rid of the |
da9fd3b
to
dcf972e
Compare
dcf972e
to
7f9a860
Compare
Yeah the type is irrelevant I think, don't think |
… human readable duration strings.
7f9a860
to
2231ec8
Compare
Passes tests now. (My editor's go formatting disagrees with |
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.
The changes LGTM but can you try installing the current CRD, creating some, then changing the CRD and seeing if any of our clients fall over on a test cluster since the failure mode there is pretty rough?
/hold
grace_period: 15000000000 | ||
timeout: 2400000000000 | ||
grace_period: 15s | ||
timeout: 40m0s |
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.
nit: do we need the 0s here? That's odd
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.
Unfortunately that is how duration strings are printed: https://play.golang.org/p/xyrKD-34gfP
LGTM label has been added. Git tree hash: 8693cfde7fd607c1379eb68f9bab621592b3cb62
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: cjwagner, stevekuznetsov The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
I thought that is what we discussed here #12100 (comment)? I agree that the failure mode could be nasty if I made a mistake and if there is a better way to test this I'm eager to do so, but the ProwJob CRD did not change at all, so I'm not sure what you are suggesting I do to test this. |
Eek sorry, poor English -- I meant to install the CRD, create some ProwJobs (creating some) and edit the ProwJobs ("changing the CRD") with the new clients to see it function. But if you want to just roll it out to prow.k8s.io and roll back in case things get weird that also SGTM |
Deploying from this PR or merging this PR then deploying master should be equivalent, but deploying to prod from a PR seems like bad practice so lets merge this and deploy from master. |
@cjwagner: Updated the
In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
This appears to be working as intended. Our currently deployed config contains duration values in both formats and everything is being serialized to the human readable strings: https://prow.k8s.io/config |
This PR adds a new Duration type that can parse either 'integer number of nanoseconds' or 'duration string' format and serializes to the 'duration string' format. This type is used to replace the existing DecorationConfig duration fields with backwards compatibility for existing values. Now those fields can be specified in config like
"1h15m"
instead of4500000000000
(ns units)./cc @stevekuznetsov @sebastienvas