-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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): TestAccLoggingBucketConfigOrganization_basic #16696
Comments
I don't think this PR is a cause of the test failure, but the timing is very close after being merged on Nov 3rd : GoogleCloudPlatform/magic-modules#9373 |
the test passed on my laptop. is it already fixed? or running it local is not the correct way to re-produce the error? I can't access to the |
Hi @pengq-google I can't tell from the information you posted, but the tests may being skipped and not actually passing due to the issue I described here. Please let me know if the tests pass for you after checking all required ENVs are set. I just checked a debug log from the test failing and I believe the cause of the test failures is that the test creates the resource with no ---[ REQUEST ]---------------------------------------
PATCH /v2/organizations/123456789/locations/global/buckets/_Default?alt=json&updateMask=retentionDays%2Cdescription HTTP/1.1
Host: logging.googleapis.com
User-Agent: Terraform/1.2.5 (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google/dev
Content-Length: 98
Content-Type: application/json
Accept-Encoding: gzip
{
"cmekSettings": null,
"description": "retention test 30 days",
"indexConfigs": [],
"retentionDays": 30
}
-----------------------------------------------------
2024/01/02 04:22:41 [DEBUG] Google API Response Details:
---[ 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: Tue, 02 Jan 2024 04:22:41 GMT
Server: ESF
Vary: Origin
Vary: X-Origin
Vary: Referer
X-Content-Type-Options: nosniff
X-Frame-Options: SAMEORIGIN
X-Xss-Protection: 0
{
"name": "organizations/1234567889/locations/global/buckets/_Default",
"description": "retention test 30 days",
"updateTime": "2024-01-02T04:22:41.066690578Z",
"retentionDays": 30,
"lifecycleState": "ACTIVE",
"indexConfigs": [
+ {
+ "fieldPath": "jsonPayload.request.url",
+ "type": "INDEX_TYPE_STRING",
+ "createTime": "2023-11-11T05:13:00.950893533Z"
+ },
+ {
+ "fieldPath": "jsonPayload.response.status",
+ "type": "INDEX_TYPE_INTEGER",
+ "createTime": "2024-01-02T04:08:30.909281305Z"
+ }
]
}
----------------------------------------------------- I believe what's causing the test to fail is that Terraform identifies that the new index configs information in the state doesn't match the configuration and will plan to remove the extra information. |
@pengq-google it looks like you might have an extra
|
Actually it also needs to be adjusted to be targeting the correct service - currently it's only running tests for pubsub. Sorry for the double ping!
|
Thanks for all the advice!!! |
With proper setting of Environment variables,
I also tried with what I got is:
Is it because I am using my own project and provide a real org number? should I use fake org number "123456789"? Thanks! |
It may be because the failure is due to multiple acceptance tests interacting with the same resource at the same time. From a quick search of the provider's codebase I found TestAccLoggingBucketConfigOrganization_indexConfigs, which adds the index configs that are present in the error in the issue description. If that's the cause (I haven't looked into it extensively so may have missed something) the solution to the tests failing is likely to be changing the tests to not run in parallel anymore; the _Default bucket here is at the organisation level and our tests cannot provision new orgs to keep their actions separate from each other. |
Failure rates
Impacted tests
Affected Resource(s)
Nightly build test history
Message(s)
b/315294638
The text was updated successfully, but these errors were encountered: