-
Notifications
You must be signed in to change notification settings - Fork 40k
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
remove ValidateJobTemplate and add more test cases to batch validation #116052
remove ValidateJobTemplate and add more test cases to batch validation #116052
Conversation
/sig apps |
af5e32a
to
9a684fa
Compare
9a684fa
to
584db3d
Compare
This PR may require API review. If so, when the changes are ready, complete the pre-review checklist and request an API review. Status of requested reviews is tracked in the API Review project. |
I'm running into this issue that isn't allowing me to update the generated code. @liggitt or @alculquicondor is this a user error or a problem we should address? I'm not sure how to regenerate this code if |
it's likely an issue with your env... that script is tested continuously at HEAD and other users can run it locally |
@liggitt Thank you for your help. I am getting past this point. I am new to updating APIs in Kubernetes. Am I correct in thinking I should do |
Yes, Make sure you have fetched latest tags from github ( |
584db3d
to
49e0517
Compare
/retest |
1 similar comment
/retest |
/remove-sig api-machinery |
This is ready for review! Sorry for all the test failures. I picked a bad time to upgrade my goenv so I wasn't clear what was local issues or real bugs. |
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.
Technically, the new tests are independent from the rest of the changes. But they are already in a separate commit, so it's ok to leave in the same PR.
UID: types.UID("1a2b3c"), | ||
}, | ||
Spec: batch.JobSpec{ | ||
BackoffLimit: &negative, |
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.
it looks like this variable already existed, but following the DAMP principle, this should be pointer.Int64(-1)
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.
DAMP?
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.
TIL: Descriptive And Meaningful Phrases
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.
Type: field.ErrorTypeInvalid, | ||
Field: "spec.completions", | ||
}, | ||
opts: JobValidationOptions{AllowElasticIndexedJobs: true}, |
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 option matter?
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.
Yea it does. Its not really an important test but this test case is verifying that we can't change completions if we are a NonIndexedJob. I think scaling IndexJobs is gated by AllowElasticIndexedJobs.
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.
https://github.com/kubernetes/kubernetes/blob/master/pkg/apis/batch/validation/validation.go#L570
If I don't have the AllowElasticIndexedJobs set we just assume completions are immutable.
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.
oh, then rename the testcase to: immutable completions for indexed job when AllowElasticIndexedJobs is true
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 test case is for non-indexed jobs but I take your point. I'll push up a change.
29ad2f0
to
fb0b9c2
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.
/lgtm
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 cancel
@@ -1,1202 +0,0 @@ | |||
apiVersion: batch/v1beta1 |
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.
delete the JobTemplate files under testdata/{v1.25.0,v1.26.0} as well
one comment on other testdata files to drop, then lgtm |
1e694b3
to
3489ace
Compare
/retest |
cc @pohly for leaked goroutine in integration test:
looks like these started with the new detection https://storage.googleapis.com/k8s-triage/index.html?pr=1&job=integration&test=TestMain |
/lgtm |
LGTM label has been added. Git tree hash: 52ab827da883cdb9d01e991d834d402adbcc947e
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: kannon92, liggitt 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 |
/triage accepted |
What type of PR is this?
/kind cleanup
What this PR does / why we need it:
Remove unused code and add a few missing test cases in validation.
Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
Does this PR introduce a user-facing change?
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.: