-
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): TestAccContainerCluster_resourceManagerTags #20252
Failing test(s): TestAccContainerCluster_resourceManagerTags #20252
Comments
I did some sleuthing and suspect GoogleCloudPlatform/magic-modules#12014 to be the cause. The timing matches. That commit added bootstrapping for the role binding but kept the role binding in the test's TF config. Not sure if that PR should just be rolled back or what. I don't really understand the issue exactly and the bootstrapping is a bit confusing (the test fails when the bootstrapping makes changes?). My best guess is that there's supposed to be only the bootstrapping and that it's WAI to fail the first time (because IAM isn't safe to change with how the tests are run in parallel). But because the TF for the test still exists, when it does teardown, TF tries to reverse the config and remove the role binding, which makes the bootstrapping fail next time. So we'd want to remove https://github.com/GoogleCloudPlatform/magic-modules/blob/0616a35f4dddbca1857fbc0c1330bc5ea93cc7e5/mmv1/third_party/terraform/services/container/resource_container_cluster_test.go.tmpl#L11452-L11456. Though there's actually some other IAM changes there that presumably should have been bootstrapped too. And then the sleep also removed. That's just my guess. I didn't make any change because I'm not sure if my understanding is correct and if we want to try to fix it as opposed to rolling back the presumably breaking PR. I haven't yet looked into what it would take to get the tests running locally. |
@KatrinaHoffert yes, that's exactly correct. |
Since it seems like GoogleCloudPlatform/magic-modules#12376 was stalled, I threw up GoogleCloudPlatform/magic-modules#12728 (with attribution to the author for the earlier changes), and adjusting some similar code in the autopilot resource manager tags test. Hope that's Ok. Both tests pass for me locally in both recording and replaying modes now (after the initial bootstrapping). I think I only adjusted formatting around those lines, but it's been a little while, so not totally clear on whether my changes are the main issue or not... but sorry for not noticing this sooner either way. |
no worries, sorry we didn't catch it on the PR & thanks for looking into it! |
@melinath I had an initial fix for At the risk of duplicating some of the comments I'm making in the PR, to summarize:
|
|
Thanks as always for your responsiveness! Sorry to bug you on these ones! For 1. I do seem to reliably encounter that issue, at least against my test project. I opened https://issuetracker.google.com/u/1/issues/390456348, since I don't think it's a Terraform level issue. Peripherally related: GoogleCloudPlatform/magic-modules#12785 If there's a ticket for the autopilot variant of this anywhere, feel free to link it -- I couldn't find one, but it's surprising to me if it wasn't flaky. |
This was a much bigger can of worms than originally anticipated, but I think I've got a more durable fix now in the linked PR (GoogleCloudPlatform/magic-modules#12728). That should the autopilot test as well, and a node pool one from #19997 |
Impacted tests
Affected Resource(s)
Failure rates
Message(s)
The test is deleting the role it's trying to bootstrap. The fix is to stop the test configs from managing container-engine-robot service agent IAM members and make sure they're all bootstrapped instead.
Nightly build test history
https://hashicorp.teamcity.com/test/6020505809058767047?currentProjectId=TerraformProviders_GoogleCloud_GOOGLE_NIGHTLYTESTS&expandTestHistoryChartSection=true&expandedTest=build%3A%28id%3A255899%29%2Cid%3A2000000000
b/378146451
The text was updated successfully, but these errors were encountered: