Skip to content
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

Add protobuf for provider-defined functions #34383

Merged
merged 3 commits into from
Dec 14, 2023

Conversation

jbardin
Copy link
Member

@jbardin jbardin commented Dec 8, 2023

Add init protocol definitions 5.5 and 6.5, containing the addition of provider-defined functions.

This PR only updates the protobuf definitions to include provider defined functions messages and calls, along with the files generated from the protocol.

Copy link
Contributor

@bflad bflad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Protocol definition updates look good to me 🚀

Minor nit: Might be good to copy the v5 Function message definition to v6 since it has all the additional comments.

@jbardin
Copy link
Member Author

jbardin commented Dec 8, 2023

Already done ;) manual rebasing still in progress, so not all commits were lined up yet

bflad added a commit to hashicorp/terraform-plugin-go that referenced this pull request Dec 11, 2023
Reference: hashicorp/terraform#34383

The next version of the plugin protocol (5.5/6.5) includes support for provider defined functions. This change introduces the initial implementation of that support including:

- Updated Protocol Buffers definitions
- Re-generated Protocol Buffers Go code
- Initial implementations of `tfprotov5` and `tfprotov6` package abstractions and wiring between those abstractions and the Protocol Buffers generated Go code
- Initial implementations of `tfprotov5/tf5server` and `tfprotov6/tf6server` for the new `GetFunctions` and `CallFunction` RPCs

Similar to the last set of protocol RPC changes, `ProviderServer` implementations must implement the new RPCs by either including function support or always returning an error. The HashiCorp-maintained provider development SDKs will receive updates to match this change.
@jbardin jbardin requested a review from a team December 11, 2023 21:02
@jbardin jbardin marked this pull request as ready for review December 12, 2023 20:03
bflad added a commit to hashicorp/terraform-plugin-go that referenced this pull request Dec 14, 2023
@jbardin jbardin merged commit 78b30b7 into main Dec 14, 2023
6 checks passed
@jbardin jbardin deleted the jbardin/provider-functions-proto branch December 14, 2023 14:55
Copy link
Contributor

Reminder for the merging maintainer: if this is a user-visible change, please update the changelog on the appropriate release branch.

bflad added a commit to hashicorp/terraform-plugin-go that referenced this pull request Dec 14, 2023
#351)

Reference: hashicorp/terraform#34383
Reference: #353

The next version of the plugin protocol (5.5/6.5) includes support for provider defined functions. This change introduces the initial implementation of that support including:

- Updated Protocol Buffers definitions
- Re-generated Protocol Buffers Go code
- Initial implementations of `tfprotov5` and `tfprotov6` package abstractions and wiring between those abstractions and the Protocol Buffers generated Go code
- Initial implementations of `tfprotov5/tf5server` and `tfprotov6/tf6server` for the new `GetFunctions` and `CallFunction` RPCs

This temporarily will not require `ProviderServer` implementations to include `FunctionServer` implementation, however that change will occur in a subsequent release.
Copy link
Contributor

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active contributions.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 14, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants