Promote composition functions to v1#75
Merged
negz merged 1 commit intocrossplane:mainfrom Aug 16, 2024
Merged
Conversation
Merged
6 tasks
1904124 to
459057b
Compare
bobh66
approved these changes
Aug 16, 2024
459057b to
1324ac8
Compare
Signed-off-by: Nic Cope <[email protected]>
1324ac8 to
0f7d85f
Compare
Member
Author
|
I tested this by:
The function successfully served both (after fixing a bug or two), so I think this is good to go. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of your changes
This PR compliments crossplane/crossplane#5885, which promotes functions to v1 in Crossplane.
Crossplane v1.17 and above will send requests to
apiextensions.fn.proto.v1.FunctionRunnerService. It'll fall back toapiextensions.fn.proto.v1beta1.FunctionRunnerServiceif v1 isn't available. Crossplane v1.16 and earlier will only send requests toapiextensions.fn.proto.v1beta1.FunctionRunnerService.Going forward we want functions to serve
apiextensions.fn.proto.v1.FunctionRunnerService. However, to avoid breaking compatibility with Crossplane v1.16 and earlier they'll also need to serveapiextensions.fn.proto.v1beta1.FunctionRunnerService.This PR:
BetaFunctionRunnermiddleware that serves v1beta1 requests by wrapping a v1 server.This wrapping approach only works because we intend v1 to be identical to v1beta1. That is, we promoted v1beta1 to v1 without making any breaking changes. In upstream Crossplane the v1beta1 proto is now automatically replicated from the v1 proto to ensure they remain identical.
I have: