ci: unique identifier per integration-suite attempt; configurable stack prefix#1287
Merged
Conversation
3ab36f7 to
f10d26a
Compare
d6ca278 to
b5e32de
Compare
|
Integration-suite deploys intermittently failed at 'cdk deploy' (before any test runs) because the test stack was named only after the commit SHA and the job retries. When a retry's teardown deleted a function's log group while another attempt was still invoking that function, the Lambda service recreated the group as an unmanaged, never-expire group. It survived 'cdk destroy' and blocked the next attempt, which reused the same name and failed to auto-import it (the construct is RemovalPolicy.DESTROY, not Retain). Include CI_JOB_ID in the identifier so every attempt (including retries) gets unique stack, function, and log group names that never recur, so a leftover group can no longer collide with a later deploy. CI_JOB_ID is unique per retry and available in both script and after_script, so teardown still targets the right stack. The identifier also carries a short 'it-' prefix (replacing the longer 'integ-') to keep generated Lambda names under the 64-char limit; the shared integ-auth-delegated-role and capacity provider are unchanged.
b5e32de to
af5ebda
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
This PR reduces CloudFormation/CDK resource conflicts in the integration test pipeline by ensuring each integration-suite retry attempt uses a unique stack identifier (via CI_JOB_ID) and by shortening the default stack-name prefix from integ to it to reduce the chance of hitting CDK/AWS name-length limits.
Changes:
- Make CI stack identifiers unique per job attempt:
it-${CI_COMMIT_SHORT_SHA}-${CI_JOB_ID}. - Replace per-file
getIdentifier()usage with a shared exportedIDENTIFIERconstant. - Remove the
integ-prefix from per-suite stack IDs/names and rely on theit--prefixed identifier.
Reviewed changes
Copilot reviewed 11 out of 12 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
integration-tests/config.ts |
Prefixes local fallback identifiers with it- and exports a shared IDENTIFIER constant derived from getIdentifier(). |
integration-tests/bin/app.ts |
Updates CDK stack IDs to use ${IDENTIFIER}-<suite> naming (dropping the integ- prefix). |
integration-tests/tests/snapstart.test.ts |
Uses shared IDENTIFIER to build the suite stack name. |
integration-tests/tests/payload-size.test.ts |
Uses shared IDENTIFIER to build the suite stack name. |
integration-tests/tests/otlp.test.ts |
Uses shared IDENTIFIER to build the suite stack name. |
integration-tests/tests/oom.test.ts |
Uses shared IDENTIFIER to build the suite stack name. |
integration-tests/tests/on-demand.test.ts |
Uses shared IDENTIFIER to build the suite stack name. |
integration-tests/tests/lmi.test.ts |
Uses shared IDENTIFIER to build the suite stack name. |
integration-tests/tests/lmi-oom.test.ts |
Uses shared IDENTIFIER to build the suite stack name. |
integration-tests/tests/custom-metrics.test.ts |
Uses shared IDENTIFIER to build the suite stack name. |
integration-tests/tests/auth.test.ts |
Uses shared IDENTIFIER to build the suite stack name. |
.gitlab/templates/pipeline.yaml.tpl |
Sets unique IDENTIFIER per job attempt and updates deploy/destroy stack name patterns to match the new scheme. |
shreyamalpani
approved these changes
Jun 24, 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.
Overview
Integration-suite deploys intermittently fail at
cdk deploy(before any test runs) because of resource conflict. On some retries, the previous run resources were not cleaned up correctly.Fix
CI_JOB_IDin the identifier so every attempt gets unique names and there won't be resource conflict.Note - The integration tests are failing due to 429 error, too many requests. Will address this in follow up PR.