Promote composition functions to v1 #75
Merged
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.FunctionRunnerService
if 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:
BetaFunctionRunner
middleware 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: