Skip to content

Commit 6e6fbb1

Browse files
authored
Merge branch 'main' into mrgrain/refactor/modern-messaging
2 parents d08b657 + 68b0725 commit 6e6fbb1

File tree

12 files changed

+155
-66
lines changed

12 files changed

+155
-66
lines changed

.github/workflows/build.yml

Lines changed: 3 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.github/workflows/integ.yml

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.projen/tasks.json

Lines changed: 4 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.projenrc.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ function configureProject<A extends pj.typescript.TypeScriptProject>(x: A): A {
7070
return x;
7171
}
7272

73-
const POWERFUL_RUNNER = 'aws-cdk_ubuntu-latest_4-core';
73+
const POWERFUL_RUNNER = 'aws-cdk_ubuntu-latest_16-core';
7474

7575
const workflowRunsOn = [
7676
POWERFUL_RUNNER,
@@ -199,6 +199,7 @@ const repoProject = new yarn.Monorepo({
199199
includeRootWorkspace: true,
200200
},
201201
nx: true,
202+
buildWithNx: true,
202203

203204
eslintOptions: {
204205
dirs: ['lib'],

nx.json

Lines changed: 3 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/@aws-cdk/integ-runner/test/runner/private/cloud-assembly.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ describe('cloud assembly manifest reader', () => {
146146

147147
// THEN
148148
const newManifest = Manifest.loadAssetManifest(manifestFile);
149-
expect(newManifest).toEqual({
149+
expect(newManifest).toMatchObject({
150150
version: expect.any(String),
151151
artifacts: expect.objectContaining({
152152
'Tree': {
@@ -193,7 +193,7 @@ describe('cloud assembly manifest reader', () => {
193193

194194
// THEN
195195
const newManifest = Manifest.loadAssetManifest(manifestFile);
196-
expect(newManifest).toEqual({
196+
expect(newManifest).toMatchObject({
197197
version: expect.any(String),
198198
artifacts: expect.objectContaining({
199199
'Tree': {
@@ -241,7 +241,7 @@ describe('cloud assembly manifest reader', () => {
241241

242242
// THEN
243243
const newManifest = Manifest.loadAssetManifest(manifestFile);
244-
expect(newManifest).toEqual({
244+
expect(newManifest).toMatchObject({
245245
version: expect.any(String),
246246
artifacts: expect.objectContaining({
247247
'Tree': {

packages/@aws-cdk/toolkit-lib/lib/actions/bootstrap/index.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,17 @@ export interface BootstrapParameters {
169169
readonly customPermissionsBoundary?: string;
170170
}
171171

172+
export interface EnvironmentBootstrapResult {
173+
environment: cxapi.Environment;
174+
status: 'success' | 'no-op';
175+
duration: number;
176+
}
177+
178+
export interface BootstrapResult {
179+
environments: EnvironmentBootstrapResult[];
180+
duration: number;
181+
}
182+
172183
/**
173184
* Parameters of the bootstrapping template with flexible configuration options
174185
*/

packages/@aws-cdk/toolkit-lib/lib/toolkit/toolkit.ts

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import * as chokidar from 'chokidar';
55
import * as fs from 'fs-extra';
66
import type { ToolkitServices } from './private';
77
import { assemblyFromSource } from './private';
8-
import type { BootstrapEnvironments, BootstrapOptions } from '../actions/bootstrap';
8+
import type { BootstrapEnvironments, BootstrapOptions, BootstrapResult, EnvironmentBootstrapResult } from '../actions/bootstrap';
99
import { BootstrapSource } from '../actions/bootstrap';
1010
import { AssetBuildTime, type DeployOptions } from '../actions/deploy';
1111
import { type ExtendedDeployOptions, buildParameterMap, createHotswapPropertyOverrides, removePublishedAssets } from '../actions/deploy/private';
@@ -147,7 +147,10 @@ export class Toolkit extends CloudAssemblySourceBuilder implements AsyncDisposab
147147
/**
148148
* Bootstrap Action
149149
*/
150-
public async bootstrap(environments: BootstrapEnvironments, options: BootstrapOptions): Promise<void> {
150+
public async bootstrap(environments: BootstrapEnvironments, options: BootstrapOptions): Promise<BootstrapResult> {
151+
const startTime = Date.now();
152+
const results: EnvironmentBootstrapResult[] = [];
153+
151154
const ioHelper = asIoHelper(this.ioHost, 'bootstrap');
152155
const bootstrapEnvironments = await environments.getEnvironments();
153156
const source = options.source ?? BootstrapSource.default();
@@ -177,17 +180,29 @@ export class Toolkit extends CloudAssemblySourceBuilder implements AsyncDisposab
177180
usePreviousParameters: parameters?.keepExistingParameters,
178181
},
179182
);
183+
180184
const message = bootstrapResult.noOp
181185
? ` ✅ ${environment.name} (no changes)`
182186
: ` ✅ ${environment.name}`;
183187

184188
await ioHelper.notify(IO.CDK_TOOLKIT_I9900.msg(chalk.green('\n' + message), { environment }));
185-
await bootstrapSpan.end();
189+
const envTime = await bootstrapSpan.end();
190+
const result: EnvironmentBootstrapResult = {
191+
environment,
192+
status: bootstrapResult.noOp ? 'no-op' : 'success',
193+
duration: envTime.asMs,
194+
};
195+
results.push(result);
186196
} catch (e: any) {
187197
await ioHelper.notify(IO.CDK_TOOLKIT_E9900.msg(`\n ❌ ${chalk.bold(environment.name)} failed: ${formatErrorMessage(e)}`, { error: e }));
188198
throw e;
189199
}
190200
})));
201+
202+
return {
203+
environments: results,
204+
duration: Date.now() - startTime,
205+
};
191206
}
192207

193208
/**

0 commit comments

Comments
 (0)