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
Decouple REST Framework #252
Decouple REST Framework #252
Conversation
00f4ec9
to
f22007e
Compare
/ok-to-test |
huh, I guess it's now this approve and run button. |
The approach and the goal seems reasonable to me. I'll defer the detailed review to someone closer to the library, but I'd be very happy to lose the gorestful dependency. |
(I haven't abandoned this PR, just waiting for #247 to land since it is the priority and will have quite a few conflicts. :) ) |
f22007e
to
6437214
Compare
6437214
to
0cf1270
Compare
This current PR includes breaking changes. A couple months ago we talked about doing proper semver in this repo – wdyt, is that worth the effort? Otherwise, we could hide the breaking changes at the cost of making the |
I'm generally in favor of not breaking backward compatibility unless we really need to. I think we can get by here without breaking changes. How about we introduce a new Same idea applies for |
+1, thanks for the review & seems reasonable to me! The only side effect is that go-restful will be a dep even if unused. I'll make those changes by EOW. |
071a9a0
to
db2d21f
Compare
Takes ownership of the route interfaces and removes exposing the `go-restful` dependency. Adds an adapter for the currently used version of `go-restful`.
8321b59
to
4dc6e95
Compare
@jpbetz I believe I've addressed those notes – all places that expose the |
/assign @sttts |
Is there a proof PR in k/k ? |
Sgtm. Waiting for a proof PR before approval. |
4dc6e95
to
a5221dc
Compare
The header file is loaded from the GOPATH k8s dir by default, which makes it impossible to develop if you do not have the local dependencies in your GOPATH. This commit ensures the header file is loaded from the project's directory. It also includes a cleanup of the README and bumps the timeout to 10s. Signed-off-by: austin ce <austin.cawley@gmail.com>
a5221dc
to
e9ebba8
Compare
Uses github.com/austince/kube-openapi v0.0.0-restframework-e9ebba8 in place of all k8s.io/kube-openapi. Proof PR for kubernetes/kube-openapi#252 Signed-off-by: austin ce <austin.cawley@gmail.com>
Is this what you're after in a proof PR? kubernetes/kubernetes#107453 |
Yes. Applied labels to see test results. |
Turned up one error it seems. Fixed, working on covering the case in tests in this repo. |
@sttts Proof PR tests are now all passing, please have another look. Thanks! |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: austince, 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 |
Thanks so much! |
As discussed in the #250, the
go-restful
dependency is currently exposed in a few places, making it difficult to usekube-openapi
in projects using other frameworks (or versions ofgo-restful
). This may make it easier to eventually move away fromgo-restful
in k/k as well 🤷🏼.This PR defines interfaces based on the
go-restful
types and exposes them instead. It also creates an adapter package to make it easy to use the currentgo-restful
version with the new interfaces.The interfaces are close to
go-restful
, but:ReadSample
->RequestPayloadSample
)Consumes
->ConsumesMIMETypes
, etc.go-restful
typesNo breaking changes are introduced, though all places that expose the
restful
dependency instead of the new interfaces are marked as deprecated.The PR also adds some small changes to integration tests/docs so its easier to develop. Can move that out of this PR if desired.
/cc @jpbetz @deads2k
Closes #250