hashicorp / terraform-provider-google

Terraform Provider for Google Cloud Platform
https://registry.terraform.io/providers/hashicorp/google/latest/docs
Mozilla Public License 2.0
2.34k stars 1.75k forks source link

Failing test(s): TestAccDataSourceArtifactRegistryDockerImage #18955

Closed SarahFrench closed 6 days ago

SarahFrench commented 3 months ago

Impacted tests

Affected Resource(s)

Failure rates

Message(s)

------- Stdout: -------
=== RUN   TestAccDataSourceArtifactRegistryDockerImage
=== PAUSE TestAccDataSourceArtifactRegistryDockerImage
=== CONT  TestAccDataSourceArtifactRegistryDockerImage
    vcr_utils.go:152: Step 1/1 error: Error running pre-apply refresh: exit status 1
        Error: googleapi: Error 404: Requested entity was not found.
          with data.google_artifact_registry_docker_image.testDigest,
          on terraform_plugin_test.tf line 9, in data "google_artifact_registry_docker_image" "testDigest":
           9: data "google_artifact_registry_docker_image" "testDigest" {
--- FAIL: TestAccDataSourceArtifactRegistryDockerImage (4.12s)
FAIL

Nightly build test history

https://hashicorp.teamcity.com/test/4451008058123925132?currentProjectId=TerraformProviders_GoogleCloud_GOOGLE_NIGHTLYTESTS&expandTestHistoryChartSection=true

b/357621304

brandonmichigangithub commented 3 months ago

We don't have access to this project and can't really see what the failures are caused by. Does the project actually have a "testDigest"?

SarahFrench commented 3 months ago

Here is where the "testDigest" datasource is in the codebase

The problem is that that data source is 404-ing

---[ REQUEST ]---------------------------------------
GET /v1/projects/cloudrun/locations/us/repositories/container/dockerImages/hello@sha256:7a6e0dfb0142464ce0ba14a2cfcac75e383e36f39f47539c870132c826314ad6?alt=json HTTP/1.1
Host: artifactregistry.googleapis.com
User-Agent: Terraform/1.8.3 (+https://www.terraform.io) Terraform-Plugin-SDK/2.33.0 terraform-provider-google/dev
Content-Type: application/json
Accept-Encoding: gzip

So the test will need to be updated to reference an existing resource

melinath commented 6 days ago

This was resolved by https://github.com/GoogleCloudPlatform/magic-modules/pull/11492