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

Failing test(s): TestAccDataSourceComputeInstance_networkAttachmentUsageExample #20270

Open
melinath opened this issue Nov 9, 2024 · 0 comments

Comments

@melinath
Copy link
Collaborator

melinath commented Nov 9, 2024

Impacted tests

  • TestAccDataSourceComputeInstance_networkAttachmentUsageExample

Affected Resource(s)

  • google_compute_network

Failure rates

  • 100% since 2024-08-29

Message(s)

Initial error:

panic: Invalid address to set: []string{"network_inferface"}
goroutine 1291 [running]:
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*ResourceData).Set(0xc0014e9c00, {0x49d8c73, 0x11}, {0x3fc31c0, 0xc001668be8})
  /go/1.21.13/pkg/mod/github.com/hashicorp/terraform-plugin-sdk/[email protected]/helper/schema/resource_data.go:233 +0x2b5
github.com/hashicorp/terraform-provider-google-beta/google-beta/services/compute.dataSourceGoogleComputeInstanceRead(0xc0014e9c00, {0x497c120?, 0xc0016cf800})
  /opt/teamcity-agent/work/291ecab4be7d2f4f/google-beta/services/compute/data_source_google_compute_instance.go:63 +0x678
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).read(0x53bb840?, {0x53bb840?, 0xc001844660?}, 0xd?, {0x497c120?, 0xc0016cf800?})
  /go/1.21.13/pkg/mod/github.com/hashicorp/terraform-plugin-sdk/[email protected]/helper/schema/resource.go:783 +0x163
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).ReadDataApply(0xc0002cd960, {0x53bb840, 0xc001844660}, 0xc0014e9b00, {0x497c120, 0xc0016cf800})
  /go/1.21.13/pkg/mod/github.com/hashicorp/terraform-plugin-sdk/[email protected]/helper/schema/resource.go:1015 +0x149
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*GRPCProviderServer).ReadDataSource(0xc0012100a8, {0x53bb840?, 0xc0018445d0?}, 0xc001844300)
  /go/1.21.13/pkg/mod/github.com/hashicorp/terraform-plugin-sdk/[email protected]/helper/schema/grpc_provider.go:1291 +0x352
github.com/hashicorp/terraform-plugin-mux/tf5muxserver.(*muxServer).ReadDataSource(0x53bb878?, {0x53bb840?, 0xc001844330?}, 0xc001844300)
  /go/1.21.13/pkg/mod/github.com/hashicorp/[email protected]/tf5muxserver/mux_server_ReadDataSource.go:36 +0x193
github.com/hashicorp/terraform-plugin-go/tfprotov5/tf5server.(*server).ReadDataSource(0xc0020525a0, {0x53bb840?, 0xc0018d9b30?}, 0xc000b041e0)
  /go/1.21.13/pkg/mod/github.com/hashicorp/[email protected]/tfprotov5/tf5server/server.go:688 +0x290
github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/tfplugin5._Provider_ReadDataSource_Handler({0x4916e40?, 0xc0020525a0}, {0x53bb840, 0xc0018d9b30}, 0xc0014e9800, 0x0)
  /go/1.21.13/pkg/mod/github.com/hashicorp/[email protected]/tfprotov5/internal/tfplugin5/tfplugin5_grpc.pb.go:572 +0x169
google.golang.org/grpc.(*Server).processUnaryRPC(0xc000516800, {0x53bb840, 0xc0018d9aa0}, {0x53c79c8, 0xc00141a780}, 0xc001587e60, 0xc001d30e10, 0x76781e0, 0x0)
  /go/1.21.13/pkg/mod/google.golang.org/[email protected]/server.go:1379 +0xe23
google.golang.org/grpc.(*Server).handleStream(0xc000516800, {0x53c79c8, 0xc00141a780}, 0xc001587e60)
  /go/1.21.13/pkg/mod/google.golang.org/[email protected]/server.go:1790 +0x1016
google.golang.org/grpc.(*Server).serveStreams.func2.1()
  /go/1.21.13/pkg/mod/google.golang.org/[email protected]/server.go:1029 +0x8b
created by google.golang.org/grpc.(*Server).serveStreams.func2 in goroutine 710
  /go/1.21.13/pkg/mod/google.golang.org/[email protected]/server.go:1040 +0x135

Current error:

 data_source_google_compute_instance_test.go:146: Step 1/1 error: Error running apply: exit status 1
        Error: Error creating Network: googleapi: Error 409: The resource 'projects/ci-test-project-nightly-beta/global/networks/basic-network-att' already exists, alreadyExists
          with google_compute_network.net_att_default

There are two issues: One is the initial panic; the other is that the resource is not using a unique name. https://googlecloudplatform.github.io/magic-modules/develop/test/test/ has guidance on getting a random sweepable name assigned for resources.

Nightly build test history

https://hashicorp.teamcity.com/test/5361730295113576016?currentProjectId=TerraformProviders_GoogleCloud_GOOGLE_BETA_NIGHTLYTESTS

b/378162405

@github-actions github-actions bot added crash forward/review In review; remove label to forward service/compute-vpc labels Nov 9, 2024
@melinath melinath removed crash forward/review In review; remove label to forward labels Nov 9, 2024
@SarahFrench SarahFrench added this to the Goals milestone Nov 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants