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
Fix cross-build by having active deadline seconds use maxInt32 #46711
Fix cross-build by having active deadline seconds use maxInt32 #46711
Conversation
/lgtm |
/cc @ncdc @smarterclayton - this should fix the cross build error introduced in #46640 |
@k8s-bot pull-kubernetes-cross test this |
Does this need a release note? |
@luxas - it has one. |
} | ||
value := *spec.ActiveDeadlineSeconds | ||
if value < 1 || value > math.MaxInt32 { | ||
allErrs = append(allErrs, field.Invalid(fldPath.Child("activeDeadlineSeconds"), value, validation.InclusiveRangeError(1, math.MaxInt32))) |
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.
What's the range of valid pod .spec.ActiveDeadlineSeconds
? 0 - MaxInt32
or 1 - MaxInt32
?
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.
0 is allowed on update of pod to mean "kill it now".
on create its 1-MaxInt32
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.
@derekwaynecarr , can we just update InclusiveRangeError
to use int64
?
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.
no, int64 values cannot be reliably represented in JSON
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.
InclusiveRangeError
is an internal error message builder which will return string. I think it's not related with JSON. Refer to #46807 for detail :).
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.
ah, misread... I thought you wanted the valid range expanded to int64
@k8s-bot pull-kubernetes-e2e-gce-etcd3 test this |
@derekwaynecarr Ah, I meant the other way, does this really need a release note when it's a bugfix 😄? Just don't know whether someone will be interested in this Uint -> Int shift in relnotes... |
/lgtm |
@k8s-bot pull-kubernetes-e2e-gce-etcd3 test this |
Fixes #46793 |
Adding a priority label since it's blocking cutting 1.7.0-beta.0. |
cc @dchen1107 @kubernetes/kubernetes-release-managers |
@luxas - struck release note. |
@caesarxuchao were you looking to change queue order? If so you need a |
I think this should skip to top of queue if its blocking, added label. |
This pr is fixing a regression which blocks 1.7 beta.0 release. I am going to manually merge it once pull-kubernetes-e2e-gce-etcd3 is green. cc/ @pwittrock the build cop. |
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: alexandercampbell, caesarxuchao, derekwaynecarr Assign the PR to them by writing The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these OWNERS Files:
You can indicate your approval by writing |
The test suite is not working again? |
@k8s-bot pull-kubernetes-e2e-gce-etcd3 test this |
What this PR does / why we need it:
Fixes cross build by having active deadline seconds use maxInt32 in validation.
In effect, this means the largest active deadline on a pod is ~68 years. Long enough.
Removes a redundant if-block in the validation code path.
We need this to fix cross build.