Skip to content
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

chore: bootstrap stack too old for integ tests #17277

Merged
merged 3 commits into from
Nov 2, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 8 additions & 5 deletions packages/aws-cdk/test/integ/helpers/cdk.ts
Original file line number Diff line number Diff line change
Expand Up @@ -541,11 +541,12 @@ let sanityChecked: boolean | undefined;
* by hand so let's just mass-automate it.
*/
async function ensureBootstrapped(fixture: TestFixture) {
// Use the default name for the bootstrap stack
if (await fixture.aws.stackStatus('CDKToolkit') === undefined) {
// use whatever version of bootstrap is the default for this particular version of the CLI
await fixture.cdk(['bootstrap', `aws://${await fixture.aws.account()}/${fixture.aws.region}`]);
}
// use whatever version of bootstrap is the default for this particular version of the CLI
const envSpecifier = `aws://${await fixture.aws.account()}/${fixture.aws.region}`;
if (ALREADY_BOOTSTRAPPED_IN_THIS_RUN.has(envSpecifier)) { return; }

await fixture.cdk(['bootstrap', envSpecifier]);
ALREADY_BOOTSTRAPPED_IN_THIS_RUN.add(envSpecifier);
}

/**
Expand Down Expand Up @@ -689,3 +690,5 @@ const installNpm7 = memoize0(async (): Promise<string> => {

return path.join(installDir, 'node_modules', '.bin', 'npm');
});

const ALREADY_BOOTSTRAPPED_IN_THIS_RUN = new Set();