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

feat(appconfig): add deploy method to configuration constructs #28174

Closed
wants to merge 44 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
5f1030b
feat(appconfig): add deploy method to configuration constructs
chenjane-dev Nov 28, 2023
9b1e2c8
Update packages/@aws-cdk/aws-appconfig-alpha/README.md
chenjane-dev Nov 30, 2023
540b3c4
Add unit tests
chenjane-dev Nov 30, 2023
2c37eb7
Refactor deployment code to common method
chenjane-dev Dec 1, 2023
38c3adf
chore(apigatewayv2-integrations-alpha): turn on awslint (#28173)
sumupitchayan Nov 28, 2023
147420e
chore(codebuild): added validation when using Windows Image (#27946)
sakurai-ryo Nov 28, 2023
80be312
chore(dynamodb): migrate replica handler (#27798)
colifran Nov 29, 2023
1cd58e0
chore(route53): add directions for running cross account zone delegat…
colifran Nov 29, 2023
670fb61
feat(scheduler-targets-alpha): `SnsPublish` scheduler target (#27838)
ymhiroki Nov 29, 2023
4595c86
chore(core): isCfnResource allows any type as input (#28001)
tmokmss Nov 29, 2023
a069c89
chore(docs): update scheduler-targets-alpha readme (#28182)
vinayak-kukreja Nov 29, 2023
cfcbc59
chore(route53): migrate cross account zone handler (#28134)
colifran Nov 29, 2023
94be576
docs(s3): bad type definition for objectsKeyPattern parameter (#28176)
paulhcsun Nov 29, 2023
1714db2
feat(scheduler-targets): eventBridge putEvents target (#27629)
WtfJoke Nov 29, 2023
707f94a
feat(apigatewayv2): graduate to stable 🚀 (#28094)
sumupitchayan Nov 29, 2023
55a1511
fix(cli): IAM Policy changes not deploying with --hotswap-fallback (#…
mrgrain Nov 30, 2023
df9c622
fix(cli-lib): deploy fails with "no such file or directory, open 'nod…
mrgrain Nov 30, 2023
d045bd7
feat(scheduler-targets-alpha): `InspectorStartAssessmentRun` Target (…
go-to-k Nov 30, 2023
f3a7744
feat(ecs): add instance warmup period prop (#28194)
msambol Nov 30, 2023
67d9d27
chore: update Contributors File (#28210)
aws-cdk-automation Dec 1, 2023
0d5ea8e
chore(release): 2.112.0
Dec 1, 2023
a822559
chore: fixup changelog to mention graduation of supporting apigateway…
mrgrain Dec 1, 2023
185d1e8
feat(msk-alpha): MSK Kafka versions 2.8.2.tiered and 3.5.1 and Storag…
chrispidcock Dec 1, 2023
9bacdfc
chore: add changelog items that were missed during the 2.122.0 releas…
mrgrain Dec 1, 2023
dd59233
feat: update AWS Service Spec (#28222)
aws-cdk-automation Dec 1, 2023
fb64d5b
chore(release): 2.113.0
Dec 1, 2023
fa2481a
chore(spec2cdk): remove temporary patch schema aws-logs-loggroup.json…
mikewrighton Dec 1, 2023
09d882c
chore(codebuild): fix formatting errors (#28226)
kaizencc Dec 1, 2023
d36092f
chore(redshift-alpha): formatting typos (#28224)
kaizencc Dec 1, 2023
9cb2b9f
chore(deps): Bump tj-actions/changed-files from 40.2.0 to 40.2.1 (#28…
dependabot[bot] Dec 4, 2023
19ec804
feat(scheduler-targets-alpha): `KinesisStreamPutRecord` Target (#27845)
go-to-k Dec 4, 2023
02990fd
chore(apigateway): improve docs and default value settings for identi…
go-to-k Dec 4, 2023
d13557f
fix(apigatewayv2): export newly graduated apigatewayv2 modules (#28250)
jgreenbow Dec 4, 2023
995beb1
feat(appconfig-alpha): support for relative file paths when importing…
chenjane-dev Dec 5, 2023
9aa0377
fix(iam): attaching a policy is not idempotent with imported resource…
lpizzinidev Dec 5, 2023
37cac37
feat(appconfig-alpha): support for composite alarms (#28156)
chenjane-dev Dec 5, 2023
a85e058
feat(rds): grantConnect method enables iam auth to rds cluster (#28118)
corymhall Dec 5, 2023
b2e1c89
fix(apigateway): move url property to RestApiBase (#27742)
hariprakash-j Dec 5, 2023
9482952
fix(stepfunctions-tasks): mwaa service generates wrong action in role…
tam0ri Dec 5, 2023
562ce9b
feat(scheduler-targets-alpha): `KinesisDataFirehosePutRecord` Target …
go-to-k Dec 5, 2023
8ea14d9
chore(kms): prefer new `aliasArn` to `keyArn` for getting arn of an a…
rafaelrcamargo Dec 5, 2023
93ddf2b
feat: update AWS Service Spec (#28259)
aws-cdk-automation Dec 5, 2023
03e3684
feat(appconfig): add deploy method to configuration constructs
chenjane-dev Nov 28, 2023
ce5244e
Fix merge conflicts
chenjane-dev Dec 5, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .github/workflows/request-cli-integ-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
persist-credentials: false
- name: Find changed cli files
id: changed-cli-files
uses: tj-actions/changed-files@da093c1609db0edd0a037ce9664e135f74bf30d9
uses: tj-actions/changed-files@1c938490c880156b746568a518594309cfb3f66b
with:
base_sha: ${{ github.event.pull_request.base.sha }}
files_yaml: |
Expand Down
29 changes: 29 additions & 0 deletions CHANGELOG.v2.alpha.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,35 @@

All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.

## [2.113.0-alpha.0](https://github.com/aws/aws-cdk/compare/v2.112.0-alpha.0...v2.113.0-alpha.0) (2023-12-01)


### Features

* **msk-alpha:** MSK Kafka versions 2.8.2.tiered and 3.5.1 and StorageMode property ([#27560](https://github.com/aws/aws-cdk/issues/27560)) ([f9f15fa](https://github.com/aws/aws-cdk/commit/f9f15fa448b8a57c2a40c070e105042bdea1f26c))

## [2.112.0-alpha.0](https://github.com/aws/aws-cdk/compare/v2.111.0-alpha.0...v2.112.0-alpha.0) (2023-12-01)


### ⚠ BREAKING CHANGES TO EXPERIMENTAL FEATURES

* **integ-tests:** Fix typo in the `InvocationType` property from `REQUEST_RESPONE` to `REQUEST_RESPONSE`

### Features

* **scheduler-targets:** eventBridge putEvents target ([#27629](https://github.com/aws/aws-cdk/issues/27629)) ([cd12ce4](https://github.com/aws/aws-cdk/commit/cd12ce4b38137f40a78b1462958a50d5b56d926c)), closes [#27454](https://github.com/aws/aws-cdk/issues/27454)
* **scheduler-targets:** SqsSendMessage Target ([#27774](https://github.com/aws/aws-cdk/issues/27774)) ([80c1d26](https://github.com/aws/aws-cdk/commit/80c1d2657cbcb63a88cc2ebd5ca02f4e03c514ac)), closes [#27458](https://github.com/aws/aws-cdk/issues/27458)
* **scheduler-targets-alpha:** `InspectorStartAssessmentRun` Target ([#27850](https://github.com/aws/aws-cdk/issues/27850)) ([073958f](https://github.com/aws/aws-cdk/commit/073958f04d9249d93013db94f21d749bc835904b)), closes [#27453](https://github.com/aws/aws-cdk/issues/27453)
* **scheduler-targets-alpha:** `SnsPublish` scheduler target ([#27838](https://github.com/aws/aws-cdk/issues/27838)) ([ff203a1](https://github.com/aws/aws-cdk/commit/ff203a19893e226d121644ae2589bf8c5b9a8440)), closes [#27459](https://github.com/aws/aws-cdk/issues/27459)


### Bug Fixes

* **cli-lib:** deploy fails with "no such file or directory, open 'node_modules/@aws-cdk/integ-runner/lib/workers/db.json.gz'" ([#28199](https://github.com/aws/aws-cdk/issues/28199)) ([78b34ac](https://github.com/aws/aws-cdk/commit/78b34accfa1cba88cc412b04df42ea5819c2cf4c)), closes [#27813](https://github.com/aws/aws-cdk/issues/27813) [#27983](https://github.com/aws/aws-cdk/issues/27983)
* **integ-tests:** fix typo in InvocationType enum property name ([#28162](https://github.com/aws/aws-cdk/issues/28162)) ([48c275c](https://github.com/aws/aws-cdk/commit/48c275c57c945c7a3ce318522add83a8630e53b7))
* **msk-alpha:** cluster deployment fails in `ap-southeast-1` ([#28112](https://github.com/aws/aws-cdk/issues/28112)) ([0ee4199](https://github.com/aws/aws-cdk/commit/0ee41998509c6026a849c337b680dbeb9de82a40)), closes [#28108](https://github.com/aws/aws-cdk/issues/28108)
* **scheduler:** schedule not added to group with unspecified name ([#27927](https://github.com/aws/aws-cdk/issues/27927)) ([cfa2d76](https://github.com/aws/aws-cdk/commit/cfa2d76895d8ff02e0f33df3ecad095de0c4ae3a)), closes [#27885](https://github.com/aws/aws-cdk/issues/27885)

## [2.111.0-alpha.0](https://github.com/aws/aws-cdk/compare/v2.110.1-alpha.0...v2.111.0-alpha.0) (2023-11-27)

## [2.110.1-alpha.0](https://github.com/aws/aws-cdk/compare/v2.110.0-alpha.0...v2.110.1-alpha.0) (2023-11-21)
Expand Down
45 changes: 45 additions & 0 deletions CHANGELOG.v2.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,51 @@

All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.

## [2.113.0](https://github.com/aws/aws-cdk/compare/v2.112.0...v2.113.0) (2023-12-01)


### Features

* update AWS Service Spec ([#28222](https://github.com/aws/aws-cdk/issues/28222)) ([f4c1d12](https://github.com/aws/aws-cdk/commit/f4c1d1253ee34c2837a57a93faa47c9da97ef6d8))

## [2.112.0](https://github.com/aws/aws-cdk/compare/v2.111.0...v2.112.0) (2023-12-01)


### Features

* **apigatewayv2:** graduate to stable 🚀 ([#28094](https://github.com/aws/aws-cdk/issues/28094)) ([187f67b](https://github.com/aws/aws-cdk/commit/187f67b3430dca7ea96a94c66b18694bce213f03))
* **apigatewayv2-authorizers:** graduate to stable 🚀 ([#28094](https://github.com/aws/aws-cdk/issues/28094)) ([187f67b](https://github.com/aws/aws-cdk/commit/187f67b3430dca7ea96a94c66b18694bce213f03))
* **apigatewayv2-integrations:** graduate to stable 🚀 ([#28094](https://github.com/aws/aws-cdk/issues/28094)) ([187f67b](https://github.com/aws/aws-cdk/commit/187f67b3430dca7ea96a94c66b18694bce213f03))
* **backup:** add disableDefaultBackupPolicy property to selection ([#27925](https://github.com/aws/aws-cdk/issues/27925)) ([55ffb3c](https://github.com/aws/aws-cdk/commit/55ffb3c2cede6496699cb3d07542d17d2c8212f8)), closes [#27900](https://github.com/aws/aws-cdk/issues/27900)
* **ecs:** add instance warmup period prop ([#28194](https://github.com/aws/aws-cdk/issues/28194)) ([990fab3](https://github.com/aws/aws-cdk/commit/990fab3b99117eeca7909c19a12bc975c1b48160)), closes [#28190](https://github.com/aws/aws-cdk/issues/28190)
* **elasticloadbalancingv2:** add security group support for nlb ([#27978](https://github.com/aws/aws-cdk/issues/27978)) ([645d4e9](https://github.com/aws/aws-cdk/commit/645d4e9db8c4a1cf2c324e88d9d49891386171ef)), closes [#26735](https://github.com/aws/aws-cdk/issues/26735)
* **lambda-nodejs:** add verbose and debug log level to esbuild bundling ([#27658](https://github.com/aws/aws-cdk/issues/27658)) ([d5ef107](https://github.com/aws/aws-cdk/commit/d5ef10738fd429980e260c8dc685aa7a9b1d56f6)), closes [#27634](https://github.com/aws/aws-cdk/issues/27634)
* **opensearch:** OpenSearch 2.11 engine version ([#28109](https://github.com/aws/aws-cdk/issues/28109)) ([31c18f7](https://github.com/aws/aws-cdk/commit/31c18f75ecb4afa90e2b320797816f4d72aab23b))
* **rds:** PostgreSQL 14.10, 13.13, 12.17, and 11.22 ([#28131](https://github.com/aws/aws-cdk/issues/28131)) ([f53faf6](https://github.com/aws/aws-cdk/commit/f53faf67d6b95c285835f7ea5c8dffe58d351061))
* **region-info:** update Metadata regions ([#28160](https://github.com/aws/aws-cdk/issues/28160)) ([85cc0c6](https://github.com/aws/aws-cdk/commit/85cc0c686049ca40a0bc09589830a909e911fbdf))
* **region-info:** update Metadata regions ([#28166](https://github.com/aws/aws-cdk/issues/28166)) ([306c3f1](https://github.com/aws/aws-cdk/commit/306c3f12dff5dd0150770a42b5387bfd7fe1c41d))
* update AWS Service Spec ([#28073](https://github.com/aws/aws-cdk/issues/28073)) ([f7b8096](https://github.com/aws/aws-cdk/commit/f7b80967b3b297c5b71c30158f65386c0d8258b3))
* update AWS Service Spec ([#28147](https://github.com/aws/aws-cdk/issues/28147)) ([030782a](https://github.com/aws/aws-cdk/commit/030782a75c2f82603ce5af9ae15fbfdbd57f4c70))


### Bug Fixes

* **cli:** IAM Policy changes not deploying with --hotswap-fallback ([#28185](https://github.com/aws/aws-cdk/issues/28185)) ([116b933](https://github.com/aws/aws-cdk/commit/116b93324f5c2d961ed222c659b1b35ec71c57c7))
* **core:** incorrect CloudFormation date formatting ([#28149](https://github.com/aws/aws-cdk/issues/28149)) ([1624ab6](https://github.com/aws/aws-cdk/commit/1624ab604458e21eea5b469f50df0f0f0f22a3e8)), closes [/docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-rule.html#cfn-s3](https://github.com/aws//docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-rule.html/issues/cfn-s3) [/docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-transition.html#cfn-s3](https://github.com/aws//docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-transition.html/issues/cfn-s3) [#28065](https://github.com/aws/aws-cdk/issues/28065) [#28124](https://github.com/aws/aws-cdk/issues/28124)
* evaluate all nested stacks during GetAtt evaluation ([207be27](https://github.com/aws/aws-cdk/commit/207be2700c9dee8a2ef600c5b38d362565ac3501))
* java package names are incorrect for a number of packages ([#28121](https://github.com/aws/aws-cdk/issues/28121)) ([b865320](https://github.com/aws/aws-cdk/commit/b865320674f97bd7dd7cfcc69235d3521e6aa0d4))
* **apigateway:** lambda authorizer does not enforce default cache TTL ([#27873](https://github.com/aws/aws-cdk/issues/27873)) ([25ee8ef](https://github.com/aws/aws-cdk/commit/25ee8ef61d6b33628923a0fee4c042a0f0f2441e)), closes [#27826](https://github.com/aws/aws-cdk/issues/27826)
* **apigatewayv2-integrations:** integrations of imported lambda functions do not get configured ([#27861](https://github.com/aws/aws-cdk/issues/27861)) ([2c21ea0](https://github.com/aws/aws-cdk/commit/2c21ea06adc629d177db0114f16800d5f5f60c48)), closes [#18965](https://github.com/aws/aws-cdk/issues/18965)
* **awslint:** linting is slow ([#27860](https://github.com/aws/aws-cdk/issues/27860)) ([0607b2c](https://github.com/aws/aws-cdk/commit/0607b2cd48e3ae1cb8c1ab883d9af525c7bb89ff))
* **cli:** hotswap cannot evaluate nested stacks within nested stacks ([#28080](https://github.com/aws/aws-cdk/issues/28080)) ([6004a17](https://github.com/aws/aws-cdk/commit/6004a17c593728e36ad4f5c3dcdd578ff46fa9bb)), closes [/github.com/aws/aws-cdk/blob/25ee8ef61d6b33628923a0fee4c042a0f0f2441e/packages/aws-cdk/lib/api/evaluate-cloudformation-template.ts#L390](https://github.com/aws//github.com/aws/aws-cdk/blob/25ee8ef61d6b33628923a0fee4c042a0f0f2441e/packages/aws-cdk/lib/api/evaluate-cloudformation-template.ts/issues/L390) [#28077](https://github.com/aws/aws-cdk/issues/28077)
* **cloudformation-diff:** `cdk diff` throws `toUpperCase is not a function` when `ipProtocol` is a number ([#28023](https://github.com/aws/aws-cdk/issues/28023)) ([182bafc](https://github.com/aws/aws-cdk/commit/182bafcac00db0226701366c54d55cff566bfc8e)), closes [#28021](https://github.com/aws/aws-cdk/issues/28021)
* **cloudformation-diff:** cdk diff fails on node14 ([#28067](https://github.com/aws/aws-cdk/issues/28067)) ([15c3955](https://github.com/aws/aws-cdk/commit/15c3955634219a2c11cb181b48a6dccb6d81bc82))
* **ec2:** IPAM allocated subnets cannot split more than 256 times ([#28027](https://github.com/aws/aws-cdk/issues/28027)) ([91a3e8c](https://github.com/aws/aws-cdk/commit/91a3e8c0fb0b6e91d45146c44c234151c59b3476)), closes [#25537](https://github.com/aws/aws-cdk/issues/25537)
* **lambda-event-sources:** event source property maxConcurrency is not token-aware ([#27797](https://github.com/aws/aws-cdk/issues/27797)) ([38f54db](https://github.com/aws/aws-cdk/commit/38f54dbd01722baf7781a006da75e109d38cd9db)), closes [#27796](https://github.com/aws/aws-cdk/issues/27796)
* **s3-bucket-deployment:** update logging statement to ensure one-line logging ([#28057](https://github.com/aws/aws-cdk/issues/28057)) ([b01e17d](https://github.com/aws/aws-cdk/commit/b01e17d1e97bfd59603017ecd46b63c0c3df483a))
* **cli:** hotswap cannot evaluate nested stacks within nested stacks ([#28080](https://github.com/aws/aws-cdk/pull/28080)) ([6004a17](https://github.com/aws/aws-cdk/commit/6004a17c593728e36ad4f5c3dcdd578ff46fa9bb))
* **lambda:** validate logLevel with logFormat for advanced logging ([#28045](https://github.com/aws/aws-cdk/pull/28045)) ([f533ba2](https://github.com/aws/aws-cdk/commit/f533ba2d2c00c6c1a8d143aea4b29857a6ed018a))

## [2.111.0](https://github.com/aws/aws-cdk/compare/v2.110.1...v2.111.0) (2023-11-27)


Expand Down
10 changes: 5 additions & 5 deletions CONTRIBUTORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
Shout out to our top contributors!

- [rix0rrr](https://github.com/rix0rrr)
- [eladb](https://github.com/eladb)
- [skinny85](https://github.com/skinny85)
- [RomainMuller](https://github.com/RomainMuller)
- [njlynch](https://github.com/njlynch)
Expand All @@ -14,19 +13,20 @@ Shout out to our top contributors!
- [otaviomacedo](https://github.com/otaviomacedo)
- [madeline-k](https://github.com/madeline-k)
- [NetaNir](https://github.com/NetaNir)
- [mrgrain](https://github.com/mrgrain)
- [comcalvi](https://github.com/comcalvi)
- [robertd](https://github.com/robertd)
- [MrArnoldPalmer](https://github.com/MrArnoldPalmer)
- [pahud](https://github.com/pahud)
- [mrgrain](https://github.com/mrgrain)
- [MrArnoldPalmer](https://github.com/MrArnoldPalmer)
- [peterwoodworth](https://github.com/peterwoodworth)
- [TheRealAmazonKendra](https://github.com/TheRealAmazonKendra)
- [lpizzinidev](https://github.com/lpizzinidev)
- [colifran](https://github.com/colifran)
- [nija-at](https://github.com/nija-at)
- [hoegertn](https://github.com/hoegertn)
- [jumic](https://github.com/jumic)
- [watany-dev](https://github.com/watany-dev)
- [jumic](https://github.com/jumic)
- [SoManyHs](https://github.com/SoManyHs)


_Last updated: Wed, 01 Nov 23 00:09:18 +0000_
_Last updated: Fri, 01 Dec 23 00:09:47 +0000_
1 change: 1 addition & 0 deletions packages/@aws-cdk-testing/cli-integ/lib/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ export * from './corking';
export * from './integ-test';
export * from './memoize';
export * from './resource-pool';
export * from './with-cli-lib';
export * from './with-sam';
export * from './shell';
export * from './with-aws';
Expand Down
134 changes: 134 additions & 0 deletions packages/@aws-cdk-testing/cli-integ/lib/with-cli-lib.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,134 @@
import * as os from 'os';
import * as path from 'path';
import { TestContext } from './integ-test';
import { RESOURCES_DIR } from './resources';
import { AwsContext, withAws } from './with-aws';
import { cloneDirectory, installNpmPackages, TestFixture, DEFAULT_TEST_TIMEOUT_S, CdkCliOptions } from './with-cdk-app';
import { withTimeout } from './with-timeout';

/**
* Higher order function to execute a block with a CliLib Integration CDK app fixture
*/
export function withCliLibIntegrationCdkApp<A extends TestContext & AwsContext>(block: (context: CliLibIntegrationTestFixture) => Promise<void>) {
return async (context: A) => {
const randy = context.randomString;
const stackNamePrefix = `cdktest-${randy}`;
const integTestDir = path.join(os.tmpdir(), `cdk-integ-${randy}`);

context.log(` Stack prefix: ${stackNamePrefix}\n`);
context.log(` Test directory: ${integTestDir}\n`);
context.log(` Region: ${context.aws.region}\n`);

await cloneDirectory(path.join(RESOURCES_DIR, 'cdk-apps', 'simple-app'), integTestDir, context.output);
const fixture = new CliLibIntegrationTestFixture(
integTestDir,
stackNamePrefix,
context.output,
context.aws,
context.randomString);

let success = true;
try {
const installationVersion = fixture.packages.requestedFrameworkVersion();

if (fixture.packages.majorVersion() === '1') {
throw new Error('This test suite is only compatible with AWS CDK v2');
}

const alphaInstallationVersion = fixture.packages.requestedAlphaVersion();
await installNpmPackages(fixture, {
'aws-cdk-lib': installationVersion,
'@aws-cdk/cli-lib-alpha': alphaInstallationVersion,
'@aws-cdk/aws-lambda-go-alpha': alphaInstallationVersion,
'@aws-cdk/aws-lambda-python-alpha': alphaInstallationVersion,
'constructs': '^10',
});

await block(fixture);
} catch (e: any) {
// We survive certain cases involving gopkg.in
if (errorCausedByGoPkg(e.message)) {
return;
}
success = false;
throw e;
} finally {
if (process.env.INTEG_NO_CLEAN) {
context.log(`Left test directory in '${integTestDir}' ($INTEG_NO_CLEAN)\n`);
} else {
await fixture.dispose(success);
}
}
};
}

/**
* Return whether or not the error is being caused by gopkg.in being down
*
* Our Go build depends on https://gopkg.in/, which has errors pretty often
* (every couple of days). It is run by a single volunteer.
*/
function errorCausedByGoPkg(error: string) {
// The error is different depending on what request fails. Messages recognized:
////////////////////////////////////////////////////////////////////
// go: github.com/aws/aws-lambda-go@v1.28.0 requires
// gopkg.in/yaml.v3@v3.0.0-20200615113413-eeeca48fe776: invalid version: git ls-remote -q origin in /go/pkg/mod/cache/vcs/0901dc1ef67fcce1c9b3ae51078740de4a0e2dc673e720584ac302973af82f36: exit status 128:
// remote: Cannot obtain refs from GitHub: cannot talk to GitHub: Get https://github.com/go-yaml/yaml.git/info/refs?service=git-upload-pack: net/http: request canceled (Client.Timeout exceeded while awaiting headers)
// fatal: unable to access 'https://gopkg.in/yaml.v3/': The requested URL returned error: 502
////////////////////////////////////////////////////////////////////
// go: downloading github.com/aws/aws-lambda-go v1.28.0
// go: github.com/aws/aws-lambda-go@v1.28.0 requires
// gopkg.in/yaml.v3@v3.0.0-20200615113413-eeeca48fe776: unrecognized import path "gopkg.in/yaml.v3": reading https://gopkg.in/yaml.v3?go-get=1: 502 Bad Gateway
// server response: Cannot obtain refs from GitHub: cannot talk to GitHub: Get https://github.com/go-yaml/yaml.git/info/refs?service=git-upload-pack: net/http: request canceled (Client.Timeout exceeded while awaiting headers)
////////////////////////////////////////////////////////////////////
// go: github.com/aws/aws-lambda-go@v1.28.0 requires
// gopkg.in/yaml.v3@v3.0.0-20200615113413-eeeca48fe776: invalid version: git fetch -f origin refs/heads/*:refs/heads/* refs/tags/*:refs/tags/* in /go/pkg/mod/cache/vcs/0901dc1ef67fcce1c9b3ae51078740de4a0e2dc673e720584ac302973af82f36: exit status 128:
// error: RPC failed; HTTP 502 curl 22 The requested URL returned error: 502
// fatal: the remote end hung up unexpectedly
////////////////////////////////////////////////////////////////////

return (error.includes('gopkg\.in.*invalid version.*exit status 128')
|| error.match(/unrecognized import path[^\n]gopkg\.in/));
}

/**
* SAM Integration test fixture for CDK - SAM integration test cases
*/
export function withCliLibFixture(block: (context: CliLibIntegrationTestFixture) => Promise<void>) {
return withAws(withTimeout(DEFAULT_TEST_TIMEOUT_S, withCliLibIntegrationCdkApp(block)));
}

export class CliLibIntegrationTestFixture extends TestFixture {
/**
*
*/
public async cdk(args: string[], options: CdkCliOptions = {}) {
const action = args[0];
const stackName = args[1];

const cliOpts: Record<string, any> = {
stacks: stackName ? [stackName] : undefined,
};

if (action === 'deploy') {
cliOpts.requireApproval = options.neverRequireApproval ? 'never' : 'broadening';
}

return this.shell(['node', '--input-type=module', `<<__EOS__
import { AwsCdkCli } from '@aws-cdk/cli-lib-alpha';
const cli = AwsCdkCli.fromCdkAppDirectory();

await cli.${action}(${JSON.stringify(cliOpts)});
__EOS__`], {
...options,
modEnv: {
AWS_REGION: this.aws.region,
AWS_DEFAULT_REGION: this.aws.region,
STACK_NAME_PREFIX: this.stackNamePrefix,
PACKAGE_LAYOUT_VERSION: this.packages.majorVersion(),
...options.modEnv,
},
});
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
const cdk = require('aws-cdk-lib/core');
const iam = require('aws-cdk-lib/aws-iam');
const sqs = require('aws-cdk-lib/aws-sqs');

const stackPrefix = process.env.STACK_NAME_PREFIX;
if (!stackPrefix) {
throw new Error(`the STACK_NAME_PREFIX environment variable is required`);
}

class SimpleStack extends cdk.Stack {
constructor(scope, id, props) {
super(scope, id, props);
const queue = new sqs.Queue(this, 'queue', {
visibilityTimeout: cdk.Duration.seconds(300),
});
const role = new iam.Role(this, 'role', {
assumedBy: new iam.AnyPrincipal(),
});
queue.grantConsumeMessages(role);
}
}

const app = new cdk.App();
new SimpleStack(app, `${stackPrefix}-simple-1`);

app.synth();
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"app": "node app.js",
"versionReporting": false,
"context": {
"aws-cdk:enableDiffNoFail": "true"
}
}
Loading
Loading