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
fix(cli): cli integ tests do not have a unique stack prefix #9165
Conversation
Stack prefixes only included the codebuild project _name_ and not the build id. There was also some legacy support in which the test prefix was `cdk-toolkit-canary` or `cdk-toolkit-integration` and it seems like these prefixes are no longer required. This resulted in canaries failing when two instances executed concurrently: the "cleanup" code of one canary deleted stacks in-flight for the other canary. We now simply use a timestamp to generate a unique prefix for each test run in order to isolate these stacks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this usage need to be cleaned up as well?
const stackPrefix = process.env.STACK_NAME_PREFIX || 'cdk-toolkit-integration'; |
No, this is where the app takes in the environment variable. But you know what? Let me change this so that it will fail if the environment variable is not defined, so we can avoid future mistakes. |
@njlynch fixed |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
Stack prefixes only included the codebuild project _name_ and not the build id. There was also some legacy support in which the test prefix was `cdk-toolkit-canary` or `cdk-toolkit-integration` and it seems like these prefixes are no longer required. This resulted in canaries failing when two instances executed concurrently: the "cleanup" code of one canary deleted stacks in-flight for the other canary. We now simply use a timestamp to generate a unique prefix for each test run in order to isolate these stacks.
Stack prefixes only included the codebuild project _name_ and not the build id. There was also some legacy support in which the test prefix was `cdk-toolkit-canary` or `cdk-toolkit-integration` and it seems like these prefixes are no longer required. This resulted in canaries failing when two instances executed concurrently: the "cleanup" code of one canary deleted stacks in-flight for the other canary. We now simply use a timestamp to generate a unique prefix for each test run in order to isolate these stacks.
Stack prefixes only included the codebuild project name and not the build id. There was also some legacy support in which the test prefix was
cdk-toolkit-canary
orcdk-toolkit-integration
and it seems like these prefixes are no longer required.This resulted in canaries failing when two instances executed concurrently: the "cleanup" code of one canary deleted stacks in-flight for the other canary.
We now simply use a timestamp to generate a unique prefix for each test run in order to isolate these stacks.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license