Skip to content

Conversation

@bflad
Copy link
Contributor

@bflad bflad commented Jul 7, 2023

Closes #310

The CI failures for terraform-provider-corner are expected in this case. Protocol upgrades that impose new RPCs will either require:

  • The tfprotov5.ProviderServer/tfprotov6.ProviderServer interface to require a new method
  • Or, new "optional" interfaces be implemented (let's make up ProviderServerWithGetMetadata in this case)

terraform-plugin-go is a low level abstraction which is designed to directly implement the protocol rather than introduce its own abstractions. Most provider developers will directly interface with higher level Go modules, such as terraform-plugin-sdk and terraform-plugin-framework. Except for advanced provider development using this Go module directly, this type of low level "breaking" change will be hidden by also upgrading those Go modules at the same time:

Therefore the change is implemented on the existing interface. terraform-provider-corner happens to also implement its own terraform-plugin-go based provider server code, which is affected by this change. Upgrading the various dependencies and implementing the new method makes terraform-provider-corner testing successful, which can be seen with hashicorp/terraform-provider-corner#174. The CI of this Go module and terraform-provider-corner implementation details just happens to be a chicken-and-egg problem which tends to only come up in this particular type of functionality change. 🐔 🥚

@bflad bflad added the enhancement New feature or request label Jul 7, 2023
@bflad bflad force-pushed the bflad/getproviderschema-optional branch from 26e2027 to 88d4ba1 Compare August 23, 2023 19:48
@bflad bflad force-pushed the bflad/getproviderschema-optional branch from d8073a4 to 31d1908 Compare August 24, 2023 19:42
@bflad bflad added this to the v0.19.0 milestone Aug 30, 2023
@bflad bflad marked this pull request as ready for review August 30, 2023 19:33
@bflad bflad requested a review from a team as a code owner August 30, 2023 19:33
@bflad bflad changed the title tfprotov5+tfprotov6: Add GetProviderSchemaOptional server capability tfprotov5+tfprotov6: Update to protocol versions 5.4/6.4 with GetMetadata RPC and GetProviderSchemaOptional server capability Aug 30, 2023
Copy link
Member

@austinvalle austinvalle left a comment

Choose a reason for hiding this comment

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

LGTM 🚀

Copy link
Contributor

@bendbennett bendbennett left a comment

Choose a reason for hiding this comment

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

LGTM 🚀

@bflad
Copy link
Contributor Author

bflad commented Sep 6, 2023

GetProviderSchemaOptional works as expected with upstream hashicorp/terraform#33807 and downstream hashicorp/terraform-plugin-framework#829 / hashicorp/terraform-plugin-sdk#1235 / hashicorp/terraform-plugin-mux#186. Merging!

@bflad bflad merged commit 24e6961 into main Sep 6, 2023
@bflad bflad deleted the bflad/getproviderschema-optional branch September 6, 2023 09:48
@github-actions
Copy link

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 May 24, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Introduce Protocol Server Capability for Optional GetProviderSchema RPC

3 participants