Skip to content

Commit e42cc02

Browse files
authored
Merge branch 'main' into merge-back/2.164.1
2 parents bb9275c + a1eef1d commit e42cc02

File tree

215 files changed

+62259
-64963
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

215 files changed

+62259
-64963
lines changed

.github/workflows/github-merit-badger.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@ jobs:
1717
badges: '[beginning-contributor,repeat-contributor,valued-contributor,admired-contributor,star-contributor,distinguished-contributor]'
1818
thresholds: '[0,3,6,13,25,50]'
1919
badge-type: 'achievement'
20-
ignore-usernames: '[rix0rrr,iliapolo,otaviomacedo,kaizencc,comcalvi,TheRealAmazonKendra,vinayak-kukreja,mrgrain,pahud,cgarvis,kellertk,ashishdhingra,HBobertz,sumupitchayan,SankyRed,udaypant,colifran,khushail,scanlonp,mikewrighton,moelasmar,paulhcsun,awsmjs,evgenyka,GavinZZ,aaythapa,xazhao,ConnorRobertson,ssenchenko,gracelu0,jfuss,SimonCMoore,shikha372,kirtishrinkhala,godwingrs22,bergjaak,IanKonlog,Leo10Gama,samson-keung,scorbiere,michelle-wangg,jiayiwang7,1kaileychen,aws-cdk-automation,dependabot[bot],mergify[bot]]'
20+
ignore-usernames: '[rix0rrr,iliapolo,otaviomacedo,kaizencc,comcalvi,TheRealAmazonKendra,mrgrain,pahud,kellertk,ashishdhingra,HBobertz,sumupitchayan,colifran,khushail,moelasmar,paulhcsun,GavinZZ,aaythapa,xazhao,gracelu0,jfuss,shikha372,kirtishrinkhala,godwingrs22,bergjaak,IanKonlog,Leo10Gama,samson-keung,scorbiere,michelle-wangg,jiayiwang7,1kaileychen,aws-cdk-automation,dependabot[bot],mergify[bot]]'

.mergify.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ pull_request_rules:
2424
label:
2525
add: [ contribution/core ]
2626
conditions:
27-
- author~=^(rix0rrr|iliapolo|otaviomacedo|kaizencc|comcalvi|TheRealAmazonKendra|vinayak-kukreja|mrgrain|pahud|ashishdhingra|cgarvis|kellertk|HBobertz|sumupitchayan|SankyRed|udaypant|colifran|scanlonp|mikewrighton|moelasmar|paulhcsun|awsmjs|evgenyka|GavinZZ|aaythapa|xazhao|ConnorRobertson|ssenchenko|gracelu0|jfuss|SimonCMoore|shikha372|kirtishrinkhala|godwingrs22|bergjaak|samson-keung|IanKonlog|Leo10Gama|scorbiere|michelle-wangg|jiayiwang7|1kaileychen)$
27+
- author~=^(rix0rrr|iliapolo|otaviomacedo|kaizencc|comcalvi|TheRealAmazonKendra|mrgrain|pahud|ashishdhingra|kellertk|HBobertz|sumupitchayan|colifran|moelasmar|paulhcsun|GavinZZ|aaythapa|xazhao|gracelu0|jfuss|shikha372|kirtishrinkhala|godwingrs22|bergjaak|samson-keung|IanKonlog|Leo10Gama|scorbiere|michelle-wangg|jiayiwang7|1kaileychen)$
2828
- -label~="contribution/core"
2929
- name: automatic merge
3030
actions:

package.json

+6-6
Original file line numberDiff line numberDiff line change
@@ -15,21 +15,21 @@
1515
"build-all": "tsc -b"
1616
},
1717
"devDependencies": {
18-
"@nx/workspace": "^19.7.2",
18+
"@nx/workspace": "^19.8.6",
1919
"@types/node": "18.11.19",
2020
"@types/prettier": "2.6.0",
2121
"@yarnpkg/lockfile": "^1.1.0",
2222
"aws-sdk-js-codemod": "^0.28.2",
23-
"cdk-generate-synthetic-examples": "^0.2.14",
23+
"cdk-generate-synthetic-examples": "^0.2.17",
2424
"conventional-changelog-cli": "^2.2.2",
2525
"fs-extra": "^9.1.0",
2626
"graceful-fs": "^4.2.11",
2727
"jest-junit": "^13.2.0",
28-
"jsii-diff": "1.103.1",
29-
"jsii-pacmak": "1.103.1",
30-
"jsii-reflect": "1.103.1",
28+
"jsii-diff": "1.104.0",
29+
"jsii-pacmak": "1.104.0",
30+
"jsii-reflect": "1.104.0",
3131
"lerna": "^8.1.8",
32-
"nx": "^19.7.2",
32+
"nx": "^19.8.6",
3333
"patch-package": "^6.5.1",
3434
"semver": "^7.6.3",
3535
"standard-version": "^9.5.0",

packages/@aws-cdk-testing/cli-integ/lib/shell.ts

+21-21
Original file line numberDiff line numberDiff line change
@@ -14,21 +14,19 @@ export async function shell(command: string[], options: ShellOptions = {}): Prom
1414
throw new Error('Use either env or modEnv but not both');
1515
}
1616

17+
const outputs = new Set(options.outputs);
18+
const writeToOutputs = (x: string) => {
19+
for (const outputStream of outputs) {
20+
outputStream.write(x);
21+
}
22+
};
23+
1724
// Always output the command
18-
(options.output ?? process.stdout).write(`💻 ${command.join(' ')}\n`);
19-
20-
let output: NodeJS.WritableStream | undefined = options.output ?? process.stdout;
21-
switch (options.show ?? 'always') {
22-
case 'always':
23-
break;
24-
case 'never':
25-
case 'error':
26-
output = undefined;
27-
break;
28-
}
25+
writeToOutputs(`💻 ${command.join(' ')}\n`);
26+
const show = options.show ?? 'always';
2927

3028
if (process.env.VERBOSE) {
31-
output = process.stdout;
29+
outputs.add(process.stdout);
3230
}
3331

3432
const env = options.env ?? (options.modEnv ? { ...process.env, ...options.modEnv } : process.env);
@@ -46,12 +44,16 @@ export async function shell(command: string[], options: ShellOptions = {}): Prom
4644
const stderr = new Array<Buffer>();
4745

4846
child.stdout!.on('data', chunk => {
49-
output?.write(chunk);
47+
if (show === 'always') {
48+
writeToOutputs(chunk);
49+
}
5050
stdout.push(chunk);
5151
});
5252

5353
child.stderr!.on('data', chunk => {
54-
output?.write(chunk);
54+
if (show === 'always') {
55+
writeToOutputs(chunk);
56+
}
5557
if (options.captureStderr ?? true) {
5658
stderr.push(chunk);
5759
}
@@ -66,8 +68,8 @@ export async function shell(command: string[], options: ShellOptions = {}): Prom
6668
if (code === 0 || options.allowErrExit) {
6769
resolve(out);
6870
} else {
69-
if (options.show === 'error') {
70-
(options.output ?? process.stdout).write(out + '\n');
71+
if (show === 'error') {
72+
writeToOutputs(`${out}\n`);
7173
}
7274
reject(new Error(`'${command.join(' ')}' exited with error code ${code}.`));
7375
}
@@ -97,10 +99,8 @@ export interface ShellOptions extends child_process.SpawnOptions {
9799

98100
/**
99101
* Pass output here
100-
*
101-
* @default stdout unless quiet=true
102102
*/
103-
readonly output?: NodeJS.WritableStream;
103+
readonly outputs?: NodeJS.WritableStream[];
104104

105105
/**
106106
* Only return stderr. For example, this is used to validate
@@ -127,9 +127,9 @@ export class ShellHelper {
127127
private readonly _cwd: string,
128128
private readonly _output: NodeJS.WritableStream) { }
129129

130-
public async shell(command: string[], options: Omit<ShellOptions, 'cwd' | 'output'> = {}): Promise<string> {
130+
public async shell(command: string[], options: Omit<ShellOptions, 'cwd' | 'outputs'> = {}): Promise<string> {
131131
return shell(command, {
132-
output: this._output,
132+
outputs: [this._output],
133133
cwd: this._cwd,
134134
...options,
135135
});

packages/@aws-cdk-testing/cli-integ/lib/staging/maven.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ export async function uploadJavaPackages(packages: string[], login: LoginInforma
4242
`-Dfile=${pkg.replace(/.pom$/, '.jar')}`,
4343
...await pathExists(sourcesFile) ? [`-Dsources=${sourcesFile}`] : [],
4444
...await pathExists(javadocFile) ? [`-Djavadoc=${javadocFile}`] : []], {
45-
output,
45+
outputs: [output],
4646
modEnv: {
4747
// Do not try to JIT the Maven binary
4848
MAVEN_OPTS: `${NO_JIT} ${process.env.MAVEN_OPTS ?? ''}`.trim(),

packages/@aws-cdk-testing/cli-integ/lib/staging/npm.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ export async function uploadNpmPackages(packages: string[], login: LoginInformat
3131
await shell(['node', require.resolve('npm'), 'publish', path.resolve(pkg)], {
3232
modEnv: npmEnv(usageDir, login),
3333
show: 'error',
34-
output,
34+
outputs: [output],
3535
});
3636

3737
console.log(`✅ ${pkg}`);

packages/@aws-cdk-testing/cli-integ/lib/staging/nuget.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ export async function uploadDotnetPackages(packages: string[], usageDir: UsageDi
2525
'--disable-buffering',
2626
'--timeout', '600',
2727
'--skip-duplicate'], {
28-
output,
28+
outputs: [output],
2929
});
3030

3131
console.log(`✅ ${pkg}`);

packages/@aws-cdk-testing/cli-integ/lib/staging/pypi.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ export async function uploadPythonPackages(packages: string[], login: LoginInfor
3232
TWINE_REPOSITORY_URL: login.pypiEndpoint,
3333
},
3434
show: 'error',
35-
output,
35+
outputs: [output],
3636
});
3737

3838
console.log(`✅ ${pkg}`);

packages/@aws-cdk-testing/cli-integ/lib/with-cdk-app.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -242,9 +242,9 @@ export interface CdkCliOptions extends ShellOptions {
242242
* Prepare a target dir byreplicating a source directory
243243
*/
244244
export async function cloneDirectory(source: string, target: string, output?: NodeJS.WritableStream) {
245-
await shell(['rm', '-rf', target], { output });
246-
await shell(['mkdir', '-p', target], { output });
247-
await shell(['cp', '-R', source + '/*', target], { output });
245+
await shell(['rm', '-rf', target], { outputs: output ? [output] : [] });
246+
await shell(['mkdir', '-p', target], { outputs: output ? [output] : [] });
247+
await shell(['cp', '-R', source + '/*', target], { outputs: output ? [output] : [] });
248248
}
249249

250250
interface CommonCdkBootstrapCommandOptions {

packages/@aws-cdk-testing/cli-integ/lib/with-sam.ts

+13-8
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ export function withSamIntegrationFixture(block: (context: SamIntegrationTestFix
119119
export class SamIntegrationTestFixture extends TestFixture {
120120
public async samShell(command: string[], filter?: string, action?: () => any, options: Omit<ShellOptions, 'cwd' | 'output'> = {}): Promise<ActionOutput> {
121121
return shellWithAction(command, filter, action, {
122-
output: this.output,
122+
outputs: [this.output],
123123
cwd: path.join(this.integTestDir, 'cdk.out').toString(),
124124
...options,
125125
});
@@ -182,7 +182,12 @@ export async function shellWithAction(
182182
throw new Error('Use either env or modEnv but not both');
183183
}
184184

185-
options.output?.write(`💻 ${command.join(' ')}\n`);
185+
const writeToOutputs = (x: string) => {
186+
for (const output of options.outputs ?? []) {
187+
output.write(x);
188+
}
189+
};
190+
writeToOutputs(`💻 ${command.join(' ')}\n`);
186191

187192
const env = options.env ?? (options.modEnv ? { ...process.env, ...options.modEnv } : undefined);
188193

@@ -206,17 +211,17 @@ export async function shellWithAction(
206211
out.push(Buffer.from(chunk));
207212
if (!actionExecuted && typeof filter === 'string' && Buffer.concat(out).toString('utf-8').includes(filter) && typeof action === 'function') {
208213
actionExecuted = true;
209-
options.output?.write('before executing action');
214+
writeToOutputs('before executing action');
210215
action().then((output) => {
211-
options.output?.write(`action output is ${output}`);
216+
writeToOutputs(`action output is ${output}`);
212217
actionOutput = output;
213218
actionSucceeded = true;
214219
}).catch((error) => {
215-
options.output?.write(`action error is ${error}`);
220+
writeToOutputs(`action error is ${error}`);
216221
actionSucceeded = false;
217222
actionOutput = error;
218223
}).finally(() => {
219-
options.output?.write('terminate sam sub process');
224+
writeToOutputs('terminate sam sub process');
220225
killSubProcess(child, command.join(' '));
221226
});
222227
}
@@ -235,13 +240,13 @@ export async function shellWithAction(
235240
}
236241

237242
child.stdout!.on('data', chunk => {
238-
options.output?.write(chunk);
243+
writeToOutputs(chunk);
239244
stdout.push(chunk);
240245
executeAction(chunk);
241246
});
242247

243248
child.stderr!.on('data', chunk => {
244-
options.output?.write(chunk);
249+
writeToOutputs(chunk);
245250
if (options.captureStderr ?? true) {
246251
stderr.push(chunk);
247252
}

packages/@aws-cdk-testing/cli-integ/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@
5050
"@aws-sdk/client-sso": "3.632.0",
5151
"@aws-sdk/client-sts": "3.632.0",
5252
"@aws-sdk/credential-providers": "3.632.0",
53-
"@smithy/util-retry": "3.0.7",
54-
"@smithy/types": "3.5.0",
53+
"@smithy/util-retry": "3.0.8",
54+
"@smithy/types": "3.6.0",
5555
"axios": "^1.7.7",
5656
"chalk": "^4",
5757
"fs-extra": "^9.1.0",

packages/@aws-cdk-testing/cli-integ/tests/cli-integ-tests/cli.integtest.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1662,7 +1662,7 @@ integTest(
16621662
const targetName = template.replace(/.js$/, '');
16631663
await shell([process.execPath, template, '>', targetName], {
16641664
cwd: cxAsmDir,
1665-
output: fixture.output,
1665+
outputs: [fixture.output],
16661666
modEnv: {
16671667
TEST_ACCOUNT: await fixture.aws.account(),
16681668
TEST_REGION: fixture.aws.region,

packages/@aws-cdk-testing/framework-integ/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
"@aws-cdk/lambda-layer-kubectl-v30": "^2.0.1",
4545
"@aws-cdk/lambda-layer-kubectl-v31": "^2.0.0",
4646
"aws-cdk-lib": "0.0.0",
47-
"cdk8s": "2.69.0",
47+
"cdk8s": "2.69.10",
4848
"cdk8s-plus-27": "2.9.5",
4949
"constructs": "^10.0.0"
5050
},

packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-elastic-beanstalk-deploy.js.snapshot/aws-cdk-codepipeline-elastic-beanstalk-deploy.assets.json

+5-5
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-elastic-beanstalk-deploy.js.snapshot/aws-cdk-codepipeline-elastic-beanstalk-deploy.template.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@
164164
"S3Bucket": {
165165
"Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}"
166166
},
167-
"S3Key": "3322b7049fb0ed2b7cbb644a2ada8d1116ff80c32dca89e6ada846b5de26f961.zip"
167+
"S3Key": "f24ba5e516d9d80b64bc7b0f406eedd12c36b20e7461f3e7719b7ffbdad72410.zip"
168168
},
169169
"Description": "/opt/awscli/aws"
170170
}
@@ -450,7 +450,7 @@
450450
"Value": "AWSServiceRoleForElasticBeanstalkManagedUpdates"
451451
}
452452
],
453-
"SolutionStackName": "64bit Amazon Linux 2023 v6.2.1 running Node.js 20"
453+
"SolutionStackName": "64bit Amazon Linux 2023 v6.2.2 running Node.js 20"
454454
},
455455
"DependsOn": [
456456
"beastalkapp",

packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-elastic-beanstalk-deploy.js.snapshot/manifest.json

+9-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)