Fix flaky bundle generate pipeline_and_deploy test: unique pipeline name#5376
Merged
Conversation
The pipeline name was set to "test-pipeline-${UNIQUE_NAME}" inside a
single-quoted JSON block, so bash never expanded ${UNIQUE_NAME} and every
run created a pipeline with the identical literal name. On the cloud variant
the Pipelines API rejects duplicate names, causing intermittent failures
when variants ran concurrently or a prior run's pipeline lingered.
Break out of the single quotes so $UNIQUE_NAME is interpolated, matching the
existing '${CURRENT_USER_NAME}' convention in the same script.
Co-authored-by: Isaac
Collaborator
|
Commit: e0fdac0 |
andrewnester
approved these changes
May 29, 2026
Collaborator
|
Commit: eb3fb12 |
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
bundle/generate/pipeline_and_deployacceptance test set the pipeline name to"test-pipeline-${UNIQUE_NAME}"inside a single-quoted JSON block. Bash doesn't expand${...}within single quotes, so every run created a pipeline with the identical literal nametest-pipeline-${UNIQUE_NAME}. On the cloud variant the Pipelines API rejects duplicate names, so the test failed intermittently withThe pipeline name 'test-pipeline-${UNIQUE_NAME}' is already used by another pipelinewhenever thedirectandterraformvariants ran against the same workspace or a prior run's pipeline lingered.The fix breaks out of the single quotes so
$UNIQUE_NAMEis interpolated, matching the script's existing'${CURRENT_USER_NAME}'convention and giving each run a distinct pipeline name. Local output is unchanged: the name is never printed, andUNIQUE_NAMEis normalized to[UNIQUE_NAME]by the replacer regardless.I scanned the other
bundle/acceptance scripts that embed variables in single-quoted JSON; this was the only one with the bug. The rest already use the break-out form.This pull request and its description were written by Isaac.