https://pulumi.com logo
#general
Title
# general
f

fast-dinner-32080

02/05/2020, 11:47 PM
Copy code
panic: fatal: A failure has occurred: Nested type "rke_clusterServicesEtcdArgs" declared by rke_cluster was already declared by rke_cluster

goroutine 1 [running]:
<http://github.com/pulumi/pulumi/pkg/util/contract.failfast(...)|github.com/pulumi/pulumi/pkg/util/contract.failfast(...)>
	/Users/mitch.maler/go/pkg/mod/github.com/pulumi/pulumi@v1.8.0/pkg/util/contract/failfast.go:23
<http://github.com/pulumi/pulumi/pkg/util/contract.Failf(0x2c6daf1|github.com/pulumi/pulumi/pkg/util/contract.Failf(0x2c6daf1>, 0x38, 0xc0007d31e8, 0x3, 0x3)
	/Users/mitch.maler/go/pkg/mod/github.com/pulumi/pulumi@v1.8.0/pkg/util/contract/fail.go:30 +0x181
<http://github.com/pulumi/pulumi-terraform-bridge/pkg/tfgen.(*csharpNestedTypes).declareType(0xc00064e790|github.com/pulumi/pulumi-terraform-bridge/pkg/tfgen.(*csharpNestedTypes).declareType(0xc00064e790>, 0x304b380, 0xc0002489c0, 0xc0001a3f66, 0xb, 0xc0007281c0, 0xc, 0x2bfd6dc, 0x4, 0xc00001c3f0, ...)
	/Users/mitch.maler/go/pkg/mod/github.com/pulumi/pulumi-terraform-bridge@v1.5.2/pkg/tfgen/generate_csharp.go:124 +0x589
<http://github.com/pulumi/pulumi-terraform-bridge/pkg/tfgen.(*csharpNestedTypes).gatherFromPropertyType(0xc00064e790|github.com/pulumi/pulumi-terraform-bridge/pkg/tfgen.(*csharpNestedTypes).gatherFromPropertyType(0xc00064e790>, 0x304b380, 0xc0002489c0, 0xc0001a3f66, 0xb, 0xc0007281c0, 0xc, 0x2bfd6dc, 0x4, 0xc00001c3f0, ...)
	/Users/mitch.maler/go/pkg/mod/github.com/pulumi/pulumi-terraform-bridge@v1.5.2/pkg/tfgen/generate_csharp.go:158 +0x187
<http://github.com/pulumi/pulumi-terraform-bridge/pkg/tfgen.(*csharpNestedTypes).gatherFromProperties(0xc00064e790|github.com/pulumi/pulumi-terraform-bridge/pkg/tfgen.(*csharpNestedTypes).gatherFromProperties(0xc00064e790>, 0x304b380, 0xc0002489c0, 0xc0001a3f66, 0xb, 0x2bfd6dc, 0x4, 0xc0002f6e00, 0x21, 0x40, ...)
	/Users/mitch.maler/go/pkg/mod/github.com/pulumi/pulumi-terraform-bridge@v1.5.2/pkg/tfgen/generate_csharp.go:145 +0xc6
<http://github.com/pulumi/pulumi-terraform-bridge/pkg/tfgen.gatherNestedTypesForModule(0xc000420000|github.com/pulumi/pulumi-terraform-bridge/pkg/tfgen.gatherNestedTypesForModule(0xc000420000>, 0x7ffeefbff212)
	/Users/mitch.maler/go/pkg/mod/github.com/pulumi/pulumi-terraform-bridge@v1.5.2/pkg/tfgen/generate_csharp.go:87 +0x1cf
<http://github.com/pulumi/pulumi-terraform-bridge/pkg/tfgen.(*csharpGenerator).emitModule(0xc00010c000|github.com/pulumi/pulumi-terraform-bridge/pkg/tfgen.(*csharpGenerator).emitModule(0xc00010c000>, 0xc000420000, 0x2, 0x2, 0x0, 0xc0007d35c0, 0x104600e)
	/Users/mitch.maler/go/pkg/mod/github.com/pulumi/pulumi-terraform-bridge@v1.5.2/pkg/tfgen/generate_csharp.go:336 +0x14b
<http://github.com/pulumi/pulumi-terraform-bridge/pkg/tfgen.(*csharpGenerator).emitModules(0xc00010c000|github.com/pulumi/pulumi-terraform-bridge/pkg/tfgen.(*csharpGenerator).emitModules(0xc00010c000>, 0xc00062b310, 0x1, 0x1, 0x2, 0xc0005357c0, 0x1)
	/Users/mitch.maler/go/pkg/mod/github.com/pulumi/pulumi-terraform-bridge@v1.5.2/pkg/tfgen/generate_csharp.go:296 +0x119
<http://github.com/pulumi/pulumi-terraform-bridge/pkg/tfgen.(*csharpGenerator).emitPackage(0xc00010c000|github.com/pulumi/pulumi-terraform-bridge/pkg/tfgen.(*csharpGenerator).emitPackage(0xc00010c000>, 0xc00062b310, 0x1c0, 0x0)
	/Users/mitch.maler/go/pkg/mod/github.com/pulumi/pulumi-terraform-bridge@v1.5.2/pkg/tfgen/generate_csharp.go:228 +0xab
<http://github.com/pulumi/pulumi-terraform-bridge/pkg/tfgen.(*generator).Generate(0xc00059ac00|github.com/pulumi/pulumi-terraform-bridge/pkg/tfgen.(*generator).Generate(0xc00059ac00>, 0x3, 0x30500c0)
	/Users/mitch.maler/go/pkg/mod/github.com/pulumi/pulumi-terraform-bridge@v1.5.2/pkg/tfgen/generate.go:501 +0xaf
<http://github.com/pulumi/pulumi-terraform-bridge/pkg/tfgen.newTFGenCmd.func1(0xc00048d680|github.com/pulumi/pulumi-terraform-bridge/pkg/tfgen.newTFGenCmd.func1(0xc00048d680>, 0xc00062b2c0, 0x1, 0x5, 0x6, 0x6)
	/Users/mitch.maler/go/pkg/mod/github.com/pulumi/pulumi-terraform-bridge@v1.5.2/pkg/tfgen/main.go:66 +0x11f
<http://github.com/pulumi/pulumi/pkg/util/cmdutil.RunFunc.func1(0xc00048d680|github.com/pulumi/pulumi/pkg/util/cmdutil.RunFunc.func1(0xc00048d680>, 0xc00062b2c0, 0x1, 0x5, 0xc00069b9f8, 0x1367d74)
	/Users/mitch.maler/go/pkg/mod/github.com/pulumi/pulumi@v1.8.0/pkg/util/cmdutil/exit.go:96 +0x51
<http://github.com/pulumi/pulumi/pkg/util/cmdutil.RunResultFunc.func1(0xc00048d680|github.com/pulumi/pulumi/pkg/util/cmdutil.RunResultFunc.func1(0xc00048d680>, 0xc00062b2c0, 0x1, 0x5)
	/Users/mitch.maler/go/pkg/mod/github.com/pulumi/pulumi@v1.8.0/pkg/util/cmdutil/exit.go:112 +0x6b
<http://github.com/spf13/cobra.(*Command).execute(0xc00048d680|github.com/spf13/cobra.(*Command).execute(0xc00048d680>, 0xc0000dc130, 0x5, 0x5, 0xc00048d680, 0xc0000dc130)
	/Users/mitch.maler/go/pkg/mod/github.com/spf13/cobra@v0.0.5/command.go:830 +0x2aa
<http://github.com/spf13/cobra.(*Command).ExecuteC(0xc00048d680|github.com/spf13/cobra.(*Command).ExecuteC(0xc00048d680>, 0x3, 0x30500c0, 0x24)
	/Users/mitch.maler/go/pkg/mod/github.com/spf13/cobra@v0.0.5/command.go:914 +0x2fb
<http://github.com/spf13/cobra.(*Command).Execute(...)|github.com/spf13/cobra.(*Command).Execute(...)>
	/Users/mitch.maler/go/pkg/mod/github.com/spf13/cobra@v0.0.5/command.go:864
<http://github.com/pulumi/pulumi-terraform-bridge/pkg/tfgen.Main(0x2bfd293|github.com/pulumi/pulumi-terraform-bridge/pkg/tfgen.Main(0x2bfd293>, 0x3, 0x30500c0, 0x24, 0xc0006ca780, 0x2bfd293, 0x3, 0x0, 0x0, 0x2c02658, ...)
	/Users/mitch.maler/go/pkg/mod/github.com/pulumi/pulumi-terraform-bridge@v1.5.2/pkg/tfgen/main.go:31 +0x9b
main.main()
	/Users/mitch.maler/downloads/pulumi-rke/cmd/pulumi-tfgen-rke/main.go:29 +0xdc
make: *** [build] Error 3
w

white-balloon-205

02/05/2020, 11:49 PM
See https://pulumi-community.slack.com/archives/CB81H6DG9/p1580516824010500 for a related discussion. Also cc @broad-dog-22463 who may be able to help here.
f

fast-dinner-32080

02/05/2020, 11:57 PM
Ah that seems like the exact issue. There are deprecated fields looking at the schema. So will have to see if I can rename them.
@white-balloon-205 @broad-dog-22463 Now I am getting another weird error. When it does the dotnet build I get this
Copy code
RkeCluster.cs(10741,21): error CS0100: The parameter name 'roles' is a duplicate [/Users/mitch.maler/Downloads/pulumi-rke/sdk/dotnet/Pulumi.Rke.csproj]
RkeCluster.cs(10701,33): error CS0102: The type 'RkeClusterNodes' already contains a definition for 'Roles' [/Users/mitch.maler/Downloads/pulumi-rke/sdk/dotnet/Pulumi.Rke.csproj]
RkeCluster.cs(5159,31): error CS0102: The type 'RkeClusterNodesArgs' already contains a definition for 'Roles' [/Users/mitch.maler/Downloads/pulumi-rke/sdk/dotnet/Pulumi.Rke.csproj]
RkeCluster.cs(5277,31): error CS0102: The type 'RkeClusterNodesGetArgs' already contains a definition for 'Roles' [/Users/mitch.maler/Downloads/pulumi-rke/sdk/dotnet/Pulumi.Rke.csproj]
Looking at the code I see this so it is duplicating fields
Copy code
ImmutableArray<string> roles,
string? roles,
Looking in the rke code there are two fields Roles and Role https://github.com/rancher/terraform-provider-rke/blob/master/rke/schema_rke_cluster_node.go#L21 Not sure where it is confusing those
The weird thing is in the cs code there is no field named Role so it is making the singular one plural?
3 Views