You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would expect the schemas to be acceptable, however when debugging i found that the schema.Provider is sorted alphabetically and so the tfprotov5.ProviderServer must be manually ordered alphabetically.
Actual Behavior
panic: got a different provider schema from two servers (*schema.GRPCProviderServer, *protocol.provider). Provider schemas must be identical across providers.
I patched the error message with a diff highlighting the issue below.
returnfactory, fmt.Errorf("got a different provider schema from two servers (%T, %T). Provider schemas must be identical across providers.\n%s", factory.servers[factory.providerSchemaFrom](), s, cmp.Diff(resp.Provider, factory.providerSchema))
panic: got a different provider schema from two servers (*schema.GRPCProviderServer, *protocol.provider). Provider schemas must be identical across providers.
: &tfprotov5.Schema{
: Version: 0,
: Block: &tfprotov5.SchemaBlock{
: Version: 0,
: Attributes: []*tfprotov5.SchemaAttribute{
: &{
: - Name: "context",
: + Name: "base_url",
: Type: s"tftypes.String",
: - Description: "The context path of the pingaccess API.",
: + Description: "The base url of the pingaccess API.",
: Required: false,
: Optional: true,
: ... // 4 identical fields
: },
: &{
: - Name: "base_url",
: + Name: "context",
: Type: s"tftypes.String",
: - Description: "The base url of the pingaccess API.",
: + Description: "The context path of the pingaccess API.",
: Required: false,
: Optional: true,
: ... // 4 identical fields
: },
: &{Name: "password", Type: s"tftypes.String", Description: "The password for pingaccess API.", Optional: true, ...},
: &{Name: "username", Type: s"tftypes.String", Description: "The username for pingaccess API.", Optional: true, ...},
: },
: BlockTypes: nil,
: Description: "",
: ... // 2 identical fields
: },
: }
:
:
: goroutine 1 [running]:
: main.main()
: github.com/iwarapter/terraform-provider-pingaccess/main.go:17 +0x238
Steps to Reproduce
Define a sdkv2 and tfprotov5 schema with snippets above
build and plan
The text was updated successfully, but these errors were encountered:
Thanks for the suggestion! I opened #18 to resolve this. I needed to copy the values of the slice to avoid reordering the slices, which I'm not sure if it would matter or not, but I'd prefer to not do it if we don't need to.
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.
terraform-plugin-mux version
Relevant provider source code
tfprotov5.ProviderServer
schema.Provider
Expected Behavior
I would expect the schemas to be acceptable, however when debugging i found that the
schema.Provider
is sorted alphabetically and so thetfprotov5.ProviderServer
must be manually ordered alphabetically.Actual Behavior
panic: got a different provider schema from two servers (*schema.GRPCProviderServer, *protocol.provider). Provider schemas must be identical across providers.
I patched the error message with a diff highlighting the issue below.
Steps to Reproduce
The text was updated successfully, but these errors were encountered: