Open SarahFrench opened 1 month ago
From one of the builds I link above under Message(s) I can see this is the API's response that's involved in the panic:
---[ RESPONSE ]--------------------------------------
HTTP/2.0 200 OK
Alt-Svc: h3=":443"; ma=2592000,h3-29=":443"; ma=2592000
Cache-Control: private
Content-Type: application/json; charset=UTF-8
Date: Thu, 17 Oct 2024 11:28:24 GMT
Etag: FSCrXwsrOtLCc3VHT4XIoalk4Sc=/WsmFvTzbKjzpmuH1ByKk-49cc_E=
Server: ESF
Vary: Origin
Vary: X-Origin
Vary: Referer
X-Content-Type-Options: nosniff
X-Frame-Options: SAMEORIGIN
X-Xss-Protection: 0
{
"kind": "compute#instanceGroupManagerResizeRequest",
"id": "9113303207974357537",
"creationTimestamp": "2024-10-17T04:28:14.344-07:00",
"name": "tf-test-a3-dwsgbbsro3e6z",
"description": "Test resize request resource",
"zone": "https://www.googleapis.com/compute/v1/projects/PROJECT_ID/zones/us-central1-a",
"resizeBy": 2,
"requestedRunDuration": {
"seconds": "14400",
"nanos": 0
},
"state": "ACCEPTED",
"status": {
"lastAttempt": {
"error": {
"errors": [
{
"code": "ZONE_RESOURCE_POOL_EXHAUSTED_WITH_DETAILS",
"message": "Waiting for resources. Currently there are not enough resources available to fulfill the request."
}
]
}
}
},
"selfLink": "https://www.googleapis.com/compute/v1/projects/PROJECT_ID/zones/us-central1-a/instanceGroupManagers/a3-dws/resizeRequests/tf-test-a3-dwsgbbsro3e6z",
"selfLinkWithId": "https://www.googleapis.com/compute/v1/projects/PROJECT_ID/zones/us-central1-a/instanceGroupManagers/a3-dws/resizeRequests/9113303207974357537"
}
It looks like the error.errors field is currently defined as a single nested object instead of a list of objects.
Note: the person addressing this issue might also address https://github.com/hashicorp/terraform-provider-google/issues/19918 at the same time.
This is now failing with the error:
Error: Error creating RegionInstanceTemplate: googleapi: Error 409: The resource 'projects/ci-test-project-nightly-ga/regions/us-central1/instanceTemplates/a3-dws' already exists, alreadyExists
In addition to fixing the panic, the test needs to use variables properly to get a tf-test prefix and random suffix used in all resource names as described on https://googlecloudplatform.github.io/magic-modules/develop/test/test/
Impacted tests
Affected Resource(s)
Failure rates
The test only fails if the test environment causes the resize to fail, but in situations where the resize fails this panic will always occur. I'll label the issue as 100% failure.
Message(s)
Panic from flattenComputeResizeRequestStatusLastAttemptErrorErrors
See builds where this happened:
Nightly build test history
b/374273746