Skip to content

Conversation

@SarahFrench
Copy link
Member

@SarahFrench SarahFrench commented Sep 19, 2025

Do we want these values to match terraform-plugin-go? Does it even matter?

Not sure, but it's still good to keep these dependencies updated, and updating to match terraform-plugin-go feels like a good thing to arbitrarily aim for right now.

This PR:

A lot of diffs in this PR are in generated code, so I've highlighted areas where manual changes were made with comments. See also diffs in internal/rpcapi/dynrpcserver/generator/main.go and go.mod/sum

Target Release

N/A

Rollback Plan

  • If a change needs to be reverted, we will roll out an update to the code within 7 days.

Changes to Security Controls

Are there any changes to security controls (access controls, encryption, logging) in this pull request? If so, explain.

CHANGELOG entry

  • This change is user-facing and I added a changelog entry.
  • This change is not user-facing.

@SarahFrench SarahFrench added the no-changelog-needed Add this to your PR if the change does not require a changelog entry label Sep 19, 2025
@SarahFrench SarahFrench changed the title Sarah/use protoc version matching core plugins Upgrade protoc and protoc-gen-go-grpc versions to matching terraform-plugin-go Sep 19, 2025
@SarahFrench
Copy link
Member Author

Keeping this in draft until after HashiConf

@SarahFrench SarahFrench closed this Oct 3, 2025
@SarahFrench SarahFrench reopened this Oct 8, 2025
@SarahFrench SarahFrench force-pushed the sarah/use-protoc-version-matching-core-plugins branch from 6122570 to 37a4101 Compare October 8, 2025 12:17
@SarahFrench
Copy link
Member Author

SarahFrench commented Oct 8, 2025

In the Code Consistency Checks GHA make generate is failing with:

>2025/10/08 13:22:23 don't know what to do with parameter type google.golang.org/grpc.ServerStreamingServer[github.com/hashicorp/terraform/internal/rpcapi/terraform1/dependencies.BuildProviderPluginCache_Event]

Which is due to hitting this code. When I run the generator script locally I don't see any generic types being passed in 🤔

Edit: deleting the contents of tools/protobuf-compile/.workdir allowed me to reproduce the problem. Maybe the dependency updates weren't reflected in the binaries in that folder?

@SarahFrench SarahFrench force-pushed the sarah/use-protoc-version-matching-core-plugins branch from 7fc5c74 to c140d96 Compare October 9, 2025 10:19
Copy link
Member Author

Choose a reason for hiding this comment

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

This file has manually-made diffs that need closer review

Copy link
Member Author

Choose a reason for hiding this comment

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

Here's generated code that informed this change:

// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type CommandService_ExecuteClient = grpc.ServerStreamingClient[CommandResponse]

Copy link
Member Author

Choose a reason for hiding this comment

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

This file has diffs that need closer review

Copy link
Member Author

Choose a reason for hiding this comment

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

Here's generated code that informed this change:

// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type Provisioner_ProvisionResourceClient = grpc.ServerStreamingClient[ProvisionResource_Response]

Copy link
Member Author

Choose a reason for hiding this comment

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

This file has manually-made diffs that need closer review

Copy link
Member Author

Choose a reason for hiding this comment

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

Here's generated code that informed this change:

// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type Provider_ReadStateBytesClient = grpc.ServerStreamingClient[ReadStateBytes_Response]

Copy link
Member Author

Choose a reason for hiding this comment

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

This file has manually-made diffs that need closer review

Copy link
Member Author

Choose a reason for hiding this comment

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

Here's generated code that informed this change:

// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type CommandService_ExecuteClient = grpc.ServerStreamingClient[CommandResponse]

// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type CommandService_ExecuteClient = grpc.ServerStreamingClient[CommandResponse]

@SarahFrench SarahFrench marked this pull request as ready for review October 21, 2025 12:18
@SarahFrench SarahFrench requested a review from a team as a code owner October 21, 2025 12:18
Copy link
Member

@liamcervante liamcervante left a comment

Choose a reason for hiding this comment

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

I think this looks fine 👍 I guess the mockgen package seems to not be keeping up with the generics used by the proto files but nothing we can do about it.

@SarahFrench
Copy link
Member Author

Thanks Liam! Yeah it'd be nice if the mocks had the correct type baked in, instead of requiring setup in the test code, but if that causes issues in future I guess we can set up more test helpers.

FYI to any readers/future me: I'm planning to merge this to main tomorrow after the release, and I'm not planning to backport. Given that the main branch currently represents the first alpha release of 1.15, and alphas do not need Mend scans, merging this PR doesn't impact anyone's release rota.

@SarahFrench
Copy link
Member Author

Going ahead with merge despite the release not going out; main branch doesn't affect the release code.

@SarahFrench SarahFrench merged commit 2e5b5de into main Oct 22, 2025
13 checks passed
@SarahFrench SarahFrench deleted the sarah/use-protoc-version-matching-core-plugins branch October 22, 2025 13:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no-changelog-needed Add this to your PR if the change does not require a changelog entry

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants