Skip to content

Commit

Permalink
chore: add suppression of maintenance mode warning so dependencies ca…
Browse files Browse the repository at this point in the history
…n be upgraded (#24230)

Fixes the build failures in #24154 and has been successfully run through the cli test pipeline.

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
  • Loading branch information
TheRealAmazonKendra committed Feb 20, 2023
1 parent 1caa4d9 commit 78ee005
Show file tree
Hide file tree
Showing 47 changed files with 377 additions and 373 deletions.
7 changes: 3 additions & 4 deletions .github/workflows/yarn-upgrade-v1main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
run: yarn install --frozen-lockfile
- name: Install Tools
run: |-
npm -g install lerna js-yaml npm-check-updates@^9.0.0
npm -g install lerna npm-check-updates
- name: Build CLI
run: lerna run build --scope aws-cdk --include-dependencies --stream
- name: Build Integ Runner
Expand All @@ -51,7 +51,6 @@ jobs:
echo "list=$(lerna ls --all --json 2>/dev/null | jq -r 'map(.name) | join(",")')" >> $GITHUB_OUTPUT
- name: Run "ncu -u"
# We special-case some @types because they need to be pinned to specific versions due to breaking changes in minor upgrades https://github.com/DefinitelyTyped/DefinitelyTyped/issues/64266
# We special-case aws-sdk because of breaking changes with TS interface exports in recent minor versions - https://github.com/aws/aws-sdk-js/issues/3453
# We special-case typescript because it's not semantically versioned
# We special-case constructs because we want to stay in control of the minimum compatible version
# We special-case lerna because we have a patch on it that stops applying if Lerna upgrades. Remove this once https://github.com/lerna/lerna/pull/2874 releases.
Expand All @@ -61,8 +60,8 @@ jobs:
ncu --upgrade --filter=typescript --target=patch
ncu --upgrade --reject=@types/node,@types/prettier,constructs,typescript,lerna --target=minor
# Upgrade all the packages
lerna exec --parallel ncu -- --upgrade --filter=typescript --target=patch
lerna exec --parallel ncu -- --upgrade --reject='@types/node,@types/prettier,constructs,typescript,aws-sdk,aws-sdk-mock,${{ steps.list-packages.outputs.list }}' --target=minor
lerna exec --parallel ncu -- --upgrade --filter=typescript,lerna --target=patch
lerna exec --parallel ncu -- --upgrade --reject='@types/node,@types/prettier,constructs,typescript,aws-sdk-mock,${{ steps.list-packages.outputs.list }}' --target=minor
# This will ensure the current lockfile is up-to-date with the dependency specifications (necessary for "yarn update" to run)
- name: Run "yarn install"
Expand Down
9 changes: 4 additions & 5 deletions .github/workflows/yarn-upgrade.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
run: yarn install --frozen-lockfile
- name: Install Tools
run: |-
npm -g install lerna js-yaml npm-check-updates@^9.0.0
npm -g install lerna npm-check-updates
- name: Build Integ Runner
run: lerna run build --scope @aws-cdk/integ-runner --include-dependencies
- name: List Mono-Repo Packages
Expand All @@ -47,7 +47,6 @@ jobs:
echo "list=$(lerna ls --all --json 2>/dev/null | jq -r 'map(.name) | join(",")')" >> $GITHUB_OUTPUT
- name: Run "ncu -u"
# We special-case some @types because they need to be pinned to specific versions due to breaking changes in minor upgrades https://github.com/DefinitelyTyped/DefinitelyTyped/issues/64266
# We special-case aws-sdk because of breaking changes with TS interface exports in recent minor versions - https://github.com/aws/aws-sdk-js/issues/3453
# We special-case typescript because it's not semantically versioned
# We special-case constructs because we want to stay in control of the minimum compatible version
# We special-case lerna because we have a patch on it that stops applying if Lerna upgrades. Remove this once https://github.com/lerna/lerna/pull/2874 releases.
Expand All @@ -58,15 +57,15 @@ jobs:
ncu --upgrade --reject=@types/node,@types/prettier,constructs,typescript,lerna --target=minor
# Upgrade all the packages
lerna exec --parallel ncu -- --upgrade --filter=typescript --target=patch
lerna exec --parallel ncu -- --upgrade --reject='@types/node,@types/prettier,constructs,typescript,aws-sdk,aws-sdk-mock,${{ steps.list-packages.outputs.list }}' --target=minor
lerna exec --parallel ncu -- --upgrade --reject='@types/node,@types/prettier,constructs,typescript,aws-sdk-mock,${{ steps.list-packages.outputs.list }}' --target=minor
# Upgrade package.jsons in init templates
for pj in $(find packages/aws-cdk/lib/init-templates -name package.json); do
(cd $(dirname $pj) && ncu --upgrade --reject='constructs,${{ steps.list-packages.outputs.list }}')
done
# Upgrade dependencies at an aws-eks integ test docker image
cd packages/@aws-cdk/aws-eks/test/sdk-call-integ-test-docker-app/app/ && ncu --upgrade --reject='aws-sdk,${{ steps.list-packages.outputs.list }}'
cd packages/@aws-cdk/aws-eks/test/sdk-call-integ-test-docker-app/app/ && ncu --upgrade --reject=',${{ steps.list-packages.outputs.list }}'
# This will ensure the current lockfile is up-to-date with the dependency specifications (necessary for "yarn update" to run)
# This will ensure the current lockfile is up-to-date with the dependency specifications (necessary for "yarn upgrade" to run)
- name: Run "yarn install"
run: yarn install

Expand Down
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"lerna": "3.15.0",
"lerna": "^4.0.0",
"npmClient": "yarn",
"useWorkspaces": true,
"packages": [
Expand Down
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@
"@types/node": "18.11.18",
"@types/prettier": "2.6.0",
"@yarnpkg/lockfile": "^1.1.0",
"cdk-generate-synthetic-examples": "^0.1.151",
"cdk-generate-synthetic-examples": "^0.1.155",
"conventional-changelog-cli": "^2.2.2",
"fs-extra": "^9.1.0",
"graceful-fs": "^4.2.10",
"jest-junit": "^13.2.0",
"jsii-diff": "1.74.0",
"jsii-pacmak": "1.74.0",
"jsii-reflect": "1.74.0",
"jsii-rosetta": "1.74.0",
"jsii-diff": "1.75.0",
"jsii-pacmak": "1.75.0",
"jsii-reflect": "1.75.0",
"jsii-rosetta": "1.75.0",
"lerna": "^4.0.0",
"patch-package": "^6.5.1",
"semver": "^6.3.0",
Expand Down
3 changes: 3 additions & 0 deletions packages/@aws-cdk-testing/cli-integ/lib/aws.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
import * as AWS from 'aws-sdk';

// eslint-disable-next-line @typescript-eslint/no-require-imports
require('aws-sdk/lib/maintenance_mode_message').suppress = true;

export class AwsClients {
public static async default(output: NodeJS.WritableStream) {
const region = process.env.AWS_REGION ?? process.env.AWS_DEFAULT_REGION ?? 'us-east-1';
Expand Down
15 changes: 8 additions & 7 deletions packages/@aws-cdk-testing/cli-integ/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,17 +39,18 @@
},
"dependencies": {
"@octokit/rest": "^18.12.0",
"jest": "^27.5.1",
"aws-sdk": "^2.1313.0",
"aws-sdk": "^2.1317.0",
"axios": "^0.27.2",
"fs-extra": "^9.1.0",
"glob": "^7.2.3",
"jest": "^27.5.1",
"jest-junit": "^14.0.1",
"make-runnable": "^1.4.1",
"npm": "^8.19.4",
"p-queue": "^6.6.2",
"semver": "^7.3.8",
"ts-mock-imports": "^1.3.8",
"yargs": "^17.6.2",
"glob": "^7.2.3",
"p-queue": "^6.6.2",
"fs-extra": "^9.1.0",
"npm": "^8.19.3"
"yargs": "^17.7.0"
},
"repository": {
"url": "https://github.com/aws/aws-cdk.git",
Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk/aws-amplify/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@
"@aws-cdk/cfn2ts": "0.0.0",
"@aws-cdk/pkglint": "0.0.0",
"@types/jest": "^27.5.2",
"aws-sdk": "^2.1211.0"
"aws-sdk": "^2.1317.0"
},
"dependencies": {
"@aws-cdk/aws-codebuild": "0.0.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"@types/aws-lambda": "^8.10.110",
"@types/sinon": "^9.0.11",
"@aws-cdk/cdk-build-tools": "0.0.0",
"aws-sdk": "^2.596.0",
"aws-sdk": "^2.1317.0",
"aws-sdk-mock": "5.6.0",
"eslint": "^7.32.0",
"eslint-config-standard": "^14.1.1",
Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk/aws-cloudfront-origins/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@
"@aws-cdk/integ-tests": "0.0.0",
"@aws-cdk/pkglint": "0.0.0",
"@types/jest": "^27.5.2",
"aws-sdk": "^2.1211.0"
"aws-sdk": "^2.1317.0"
},
"dependencies": {
"@aws-cdk/aws-apigateway": "0.0.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk/aws-cloudfront/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@
"@aws-cdk/cfn2ts": "0.0.0",
"@aws-cdk/pkglint": "0.0.0",
"@types/jest": "^27.5.2",
"aws-sdk": "^2.1211.0",
"aws-sdk": "^2.1317.0",
"jest": "^27.5.1"
},
"dependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk/aws-cloudtrail/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
"@aws-cdk/cfn2ts": "0.0.0",
"@aws-cdk/pkglint": "0.0.0",
"@types/jest": "^27.5.2",
"aws-sdk": "^2.1211.0",
"aws-sdk": "^2.1317.0",
"jest": "^27.5.1"
},
"dependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk/aws-codebuild/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@
"@aws-cdk/cfn2ts": "0.0.0",
"@aws-cdk/pkglint": "0.0.0",
"@types/jest": "^27.5.2",
"aws-sdk": "^2.1211.0",
"aws-sdk": "^2.1317.0",
"jest": "^27.5.1"
},
"dependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk/aws-codecommit/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@
"@aws-cdk/cloud-assembly-schema": "0.0.0",
"@aws-cdk/pkglint": "0.0.0",
"@types/jest": "^27.5.2",
"aws-sdk": "^2.1211.0",
"aws-sdk": "^2.1317.0",
"jest": "^27.5.1"
},
"dependencies": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
},
"license": "Apache-2.0",
"devDependencies": {
"aws-sdk": "^2.596.0",
"aws-sdk": "^2.1317.0",
"aws-sdk-mock": "5.6.0",
"eslint": "^7.32.0",
"eslint-config-standard": "^14.1.1",
Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk/aws-dynamodb/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@
"@types/aws-lambda": "^8.10.110",
"@types/jest": "^27.5.2",
"@types/sinon": "^9.0.11",
"aws-sdk": "^2.1211.0",
"aws-sdk": "^2.1317.0",
"aws-sdk-mock": "5.6.0",
"jest": "^27.5.1",
"sinon": "^9.2.4",
Expand Down
8 changes: 4 additions & 4 deletions packages/@aws-cdk/aws-eks/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@
},
"license": "Apache-2.0",
"devDependencies": {
"@aws-cdk/lambda-layer-kubectl-v24": "^2.0.96",
"@aws-cdk/lambda-layer-kubectl-v24": "^2.0.100",
"aws-cdk-lib": "2.47.0",
"@aws-cdk/assertions": "0.0.0",
"@aws-cdk/cdk-build-tools": "0.0.0",
Expand All @@ -92,9 +92,9 @@
"@types/jest": "^27.5.2",
"@types/sinon": "^9.0.11",
"@types/yaml": "1.9.6",
"aws-sdk": "^2.1211.0",
"cdk8s": "^2.6.47",
"cdk8s-plus-24": "2.4.19",
"aws-sdk": "^2.1317.0",
"cdk8s": "^2.7.2",
"cdk8s-plus-24": "2.4.23",
"jest": "^27.5.1",
"sinon": "^9.2.4"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk/aws-events-targets/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@
"@aws-cdk/integ-runner": "0.0.0",
"@aws-cdk/pkglint": "0.0.0",
"@types/jest": "^27.5.2",
"aws-sdk": "^2.1211.0",
"aws-sdk": "^2.1317.0",
"aws-sdk-mock": "5.6.0",
"jest": "^27.5.1"
},
Expand Down
1 change: 0 additions & 1 deletion packages/@aws-cdk/aws-gamelift/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@
"@aws-cdk/cdk-build-tools": "0.0.0",
"@aws-cdk/integ-tests": "0.0.0",
"@aws-cdk/integ-runner": "0.0.0",
"@aws-cdk/integ-tests": "0.0.0",
"@aws-cdk/cfn2ts": "0.0.0",
"@aws-cdk/pkglint": "0.0.0",
"@aws-cdk/cx-api": "0.0.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@
"@aws-cdk/integ-runner": "0.0.0",
"@aws-cdk/pkglint": "0.0.0",
"@types/jest": "^27.5.2",
"aws-sdk": "^2.1211.0",
"aws-sdk": "^2.1317.0",
"aws-sdk-mock": "5.6.0",
"jest": "^27.5.1"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk/aws-lambda-nodejs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@
"@aws-cdk/triggers": "0.0.0",
"@types/jest": "^27.5.2",
"delay": "5.0.0",
"esbuild": "^0.17.7"
"esbuild": "^0.17.8"
},
"dependencies": {
"@aws-cdk/aws-lambda": "0.0.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk/aws-logs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@
"@types/aws-lambda": "^8.10.110",
"@types/jest": "^27.5.2",
"@types/sinon": "^9.0.11",
"aws-sdk": "^2.1211.0",
"aws-sdk": "^2.1317.0",
"aws-sdk-mock": "5.6.0",
"jest": "^27.5.1",
"nock": "^13.3.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk/aws-redshift/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
"@aws-cdk/pkglint": "0.0.0",
"@aws-cdk/integ-tests": "0.0.0",
"@types/jest": "^27.5.2",
"aws-sdk": "^2.1211.0",
"aws-sdk": "^2.1317.0",
"jest": "^27.5.1"
},
"dependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk/aws-route53/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
"@aws-cdk/pkglint": "0.0.0",
"@types/aws-lambda": "^8.10.110",
"@types/jest": "^27.5.2",
"aws-sdk": "^2.1211.0",
"aws-sdk": "^2.1317.0",
"jest": "^27.5.1"
},
"dependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk/aws-sqs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@
"@aws-cdk/cfn2ts": "0.0.0",
"@aws-cdk/pkglint": "0.0.0",
"@types/jest": "^27.5.2",
"aws-sdk": "^2.1211.0",
"aws-sdk": "^2.1317.0",
"jest": "^27.5.1"
},
"dependencies": {
Expand Down
4 changes: 2 additions & 2 deletions packages/@aws-cdk/cli-lib/THIRD_PARTY_LICENSES
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The @aws-cdk/cli-lib package includes the following third-party software/licensing:

** @jsii/check-node@1.74.0 - https://www.npmjs.com/package/@jsii/check-node/v/1.74.0 | Apache-2.0
** @jsii/check-node@1.75.0 - https://www.npmjs.com/package/@jsii/check-node/v/1.75.0 | Apache-2.0
jsii
Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.

Expand Down Expand Up @@ -268,7 +268,7 @@ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH RE

----------------

** aws-sdk@2.1313.0 - https://www.npmjs.com/package/aws-sdk/v/2.1313.0 | Apache-2.0
** aws-sdk@2.1316.0 - https://www.npmjs.com/package/aws-sdk/v/2.1316.0 | Apache-2.0
AWS SDK for JavaScript
Copyright 2012-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.

Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@
"@types/jest": "^27.5.2",
"@types/lodash": "^4.14.191",
"@types/minimatch": "^3.0.5",
"aws-sdk": "^2.928.0",
"aws-sdk": "^2.1317.0",
"@types/sinon": "^9.0.11",
"fast-check": "^2.25.0",
"jest": "^27.5.1",
Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk/custom-resources/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@
"@types/fs-extra": "^9.0.13",
"@types/jest": "^27.5.2",
"@types/sinon": "^9.0.11",
"aws-sdk": "^2.1211.0",
"aws-sdk": "^2.1317.0",
"aws-sdk-mock": "5.6.0",
"fs-extra": "^9.1.0",
"nock": "^13.3.0",
Expand Down
4 changes: 3 additions & 1 deletion packages/@aws-cdk/cx-api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,9 @@
"build+test+extract": "yarn build+test && yarn rosetta:extract"
},
"cdk-build": {
"post": ["node ./build-tools/flag-report.js"]
"post": [
"node ./build-tools/flag-report.js"
]
},
"author": {
"name": "Amazon Web Services",
Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk/integ-runner/THIRD_PARTY_LICENSES
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH RE

----------------

** aws-sdk@2.1313.0 - https://www.npmjs.com/package/aws-sdk/v/2.1313.0 | Apache-2.0
** aws-sdk@2.1317.0 - https://www.npmjs.com/package/aws-sdk/v/2.1317.0 | Apache-2.0
AWS SDK for JavaScript
Copyright 2012-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.

Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk/integ-tests/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
"@aws-cdk/pkglint": "0.0.0",
"@types/fs-extra": "^9.0.13",
"@types/jest": "^27.5.2",
"aws-sdk": "^2.1211.0",
"aws-sdk": "^2.1317.0",
"aws-sdk-mock": "5.6.0",
"jest": "^27.5.1",
"nock": "^13.3.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk/lambda-layer-awscli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@
"dependencies": {
"@aws-cdk/aws-lambda": "0.0.0",
"@aws-cdk/core": "0.0.0",
"@aws-cdk/asset-awscli-v1": "^2.2.65",
"@aws-cdk/asset-awscli-v1": "^2.2.69",
"constructs": "^10.0.0"
},
"homepage": "https://github.com/aws/aws-cdk",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@
"dependencies": {
"@aws-cdk/aws-lambda": "0.0.0",
"@aws-cdk/core": "0.0.0",
"@aws-cdk/asset-node-proxy-agent-v5": "^2.0.54",
"@aws-cdk/asset-node-proxy-agent-v5": "^2.0.58",
"constructs": "^10.0.0"
},
"homepage": "https://github.com/aws/aws-cdk",
Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk/pipelines/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
"@aws-cdk/cfn2ts": "0.0.0",
"@aws-cdk/pkglint": "0.0.0",
"@types/jest": "^27.5.2",
"aws-sdk": "^2.1211.0"
"aws-sdk": "^2.1317.0"
},
"peerDependencies": {
"@aws-cdk/aws-codebuild": "0.0.0",
Expand Down
Loading

0 comments on commit 78ee005

Please sign in to comment.