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
apiextensions: replace go-openapi with kube-openapi fork for validation #95954
Conversation
@sttts: This issue is currently awaiting triage. If a SIG or subproject determines this is a relevant issue, they will accept it by applying the The 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. |
7640e36
to
0457dc0
Compare
0457dc0
to
e1edf8b
Compare
e1edf8b
to
ff2d2cb
Compare
657be51
to
080bcc7
Compare
/retest |
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. |
52ddf75
to
81f20d3
Compare
/retest |
) | ||
|
||
// ToKubeOpenAPI converts a structural schema to go-openapi schema. It is faithful and roundtrippable. | ||
func (s *Structural) ToKubeOpenAPI() *spec.Schema { |
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.
Adding this in parallel to ToGoOpenAPI
is unfortunate. How will we avoid drift / bugs between the two? Is there a plan to eliminate one?
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.
yes, we will cut the other (less-critical) bit of go-openapi dependency in the publishing pipeline.
81f20d3
to
1d161c5
Compare
Signed-off-by: Gautier Delorme <gautier.delorme@gmail.com>
1d161c5
to
f63b677
Compare
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: liggitt, sttts 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 |
/retest |
/kind cleanup
/kind api-change
What this PR does / why we need it:
go-openapi is a 40k+ LOC library whose behaviour implicitly defines our CRD schema API. The goals of go-openapi are very different than our very limited and hugely sensitive use-case (defining API). The PR is the counterpart to kubernetes/kube-openapi#211 forking go-openapi and stripping >80% of code, focusing on the schema validation consisting of roughly 4.8k non-test LOC.
Which issue(s) this PR fixes:
Closes #95922.
Closes #90128. Thanks @gautierdelorme.