iamworkforcepool: make acceptance test resource names sweepable - #18979
Merged
SirGitsalot merged 1 commit intoSep 14, 2026
Merged
Conversation
Prefix workforce pool, provider and provider key IDs with tf-test so the nightly sweepers can clean them up. All resulting IDs stay within the documented 4-32 character [a-z0-9-] limit (longest is tf-test-my-other-key- plus a 10 character suffix = 31). Also updates the provider URL built in testAccCheckIamWorkforcePoolProvider so the embedded provider ID still matches the renamed resource.
Collaborator
|
Hi there, I'm the Modular magician. I've detected the following information about your changes for commit 19757ed: Diff reportYour PR generated the following diffs in downstream repositories:
Test reportAnalytics
Affected Service Packages
Step 1: Replaying Mode Action takenFound 12 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
View the replaying VCR build log Step 2: Recording Mode
🟢 All tests passed! View the recording VCR build log or the debug logs folder for detailed results. @SirGitsalot VCR tests complete for 19757ed! |
melinath
approved these changes
Sep 14, 2026
Merged
via the queue into
GoogleCloudPlatform:main
with commit Sep 14, 2026
3df4db2
39 checks passed
This was referenced Sep 14, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The
iamworkforcepoolacceptance tests create resources with names that do not begin withtf-test, so the sweepers cannot recognize them and orphaned resources accumulate in the CI project when a test fails to clean up after itself. This prefixes 82 resource identifiers across 3 handwritten test files — workforce pool IDs, provider IDs, and provider key IDs.One site is not a plain literal: a check helper reconstructs a provider URL by string interpolation (
fmt.Sprintf("%s/providers/my-provider-%s", ...)). That is updated in lockstep with the resource it refers to, otherwise the test would look up the old name and fail.Workforce pool and provider IDs are capped at 32 characters; the longest name here renders to 31, so every ID still fits.
This is test-only; no resource or provider behavior changes and no test coverage is removed.
Verification: both providers regenerate and build cleanly,
go vetandgofmtpass, and the downstream diff is confined toservices/iamworkforcepool. Every renamed site was rendered with its arguments substituted and checked for cross-step name instability and for duplicate names of the same resource type within a config.