-
Notifications
You must be signed in to change notification settings - Fork 543
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
call time middleware support #2275
base: main
Are you sure you want to change the base?
call time middleware support #2275
Conversation
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: davidgamero 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 |
waiting on OpenAPITools/openapi-generator#20745 to fix |
Looks like CI/CD is failing, seems like some error about node 16 or some such, do we need to update our Github action? |
The ci errors are related to file extensions in the generated files. I have a PR open upstream to fix it and can re generate once it merges I'll try updating node on the actions if that fix doesn't resolve it |
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 there is a problem in the CI, and the bot does not recognize the most recent commit. Also, is it possible to add any unit tests?
yes i think the CI issue is this medyagh/setup-minikube#565 how do we feel about adding something like minikube tests? i was trying to add an integration test that runs the patch example against a minikube cluster i can add unit tests too, but they'd be mostly just testing the generated codes' features |
Seems like a good idea to me. |
10f0474
to
ee03ca0
Compare
it appears the CLA doesn't respect force pushes, so i will have to open a new PR redoing this with all signed commits? |
What if you squash locally and force push this branch? |
ee03ca0
to
7ad4824
Compare
you are right. that worked |
fwiw, we have KIND based e2e in the Java repo here: https://github.com/kubernetes-client/java/blob/master/.github/workflows/maven.yml#L66 If you want to add equivalent e2e for this client that would be awesome. |
Maybe we should move the E2E tests to a separate PR and get this merged. |
i'll use kind then to keep it similar.
agreed i'll remove the gh action changes |
i've added unit tests covering the two header-setting middleware utility functions for now, and will focus on e2e in a separate PR later |
regenerate to support call-time middleware from upstream work in OpenAPITools/openapi-generator#20430
this will enable the use of the
middleware
property of theoptions
argument to append additional middleware to callsin particular, we can support something like a WithHeader middleware that allows setting content type for json merge patch or even a wrapper that returns a full
options
type that can be passedafter unblocking the bugfix, I'll add the WithHeader middleware as an exported function returning a Middleware for ease of use
ex: