Skip to content

Commit

Permalink
Merge branch 'main' into otaviom/draining
Browse files Browse the repository at this point in the history
# Conflicts:
#	packages/@aws-cdk/cli-lib-alpha/THIRD_PARTY_LICENSES
  • Loading branch information
otaviomacedo committed Jan 10, 2024
2 parents 177c45c + 37c79b9 commit da8b06e
Show file tree
Hide file tree
Showing 2,547 changed files with 765,656 additions and 177,952 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/close-stale-prs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,5 @@ jobs:
important-checks-regex: AutoBuildv2Project1C6BFA3F
warn-message: This PR has been in the STATE state for 3 weeks, and looks abandoned. To keep this PR from being closed, please continue work on it. If not, it will automatically be closed in a week.
close-message: This PR has been deemed to be abandoned, and will be automatically closed. Please create a new PR for these changes if you think this decision has been made in error.
skip-labels: contribution/core,pr-linter/do-not-close
skip-labels: contribution/core,pr-linter/do-not-close,pr/needs-maintainer-review
close-label: closed-for-staleness
2 changes: 1 addition & 1 deletion .github/workflows/github-merit-badger.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ jobs:
badges: '[beginning-contributor,repeat-contributor,valued-contributor,admired-contributor,star-contributor,distinguished-contributor]'
thresholds: '[0,3,6,13,25,50]'
badge-type: 'achievement'
ignore-usernames: '[rix0rrr,MrArnoldPalmer,iliapolo,otaviomacedo,madeline-k,kaizencc,comcalvi,corymhall,peterwoodworth,TheRealAmazonKendra,vinayak-kukreja,mrgrain,pahud,cgarvis,kellertk,HBobertz,sumupitchayan,SankyRed,udaypant,colifran,khushail,scanlonp,mikewrighton,moelasmar,aws-cdk-automation,dependabot[bot],mergify[bot]]'
ignore-usernames: '[rix0rrr,MrArnoldPalmer,iliapolo,otaviomacedo,madeline-k,kaizencc,comcalvi,TheRealAmazonKendra,vinayak-kukreja,mrgrain,pahud,cgarvis,kellertk,HBobertz,sumupitchayan,SankyRed,udaypant,colifran,khushail,scanlonp,mikewrighton,moelasmar,paulhcsun,awsmjs,evgenyka,aws-cdk-automation,dependabot[bot],mergify[bot]]'
2 changes: 1 addition & 1 deletion .github/workflows/pr-linter-trigger.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
mkdir -p ./pr
echo $PR_NUMBER > ./pr/pr_number
echo $PR_SHA > ./pr/pr_sha
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: pr_info
path: pr/
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@716b1e13042866565e00e85fd4ec490e186c4a2f
with:
base_sha: ${{ github.event.pull_request.base.sha }}
files_yaml: |
Expand Down
82 changes: 74 additions & 8 deletions .github/workflows/spec-update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,19 @@ jobs:
env:
NODE_OPTIONS: "--max-old-space-size=8196 --experimental-worker ${NODE_OPTIONS:-}"

# Install all current dependencies
- name: Yarn Install
run: yarn install --frozen-lockfile

# Upload the current db to be used later
- name: Upload base database
uses: actions/upload-artifact@v4
with:
name: db.base.json.gz
path: node_modules/@aws-cdk/aws-service-spec/db.json.gz
if-no-files-found: error

# Perform the actual upgrade of the relevant packages
- name: Install ncu tool
run: npm -g install lerna npm-check-updates
- name: Run "ncu" for service spec packages
Expand All @@ -36,6 +47,14 @@ jobs:
- name: Install latest version & update lockfile
run: yarn upgrade @aws-cdk/aws-service-spec @aws-cdk/service-spec-importers @aws-cdk/service-spec-types

# Now that we have updated the database, upload the new candidate db
- name: Upload head database
uses: actions/upload-artifact@v4
with:
name: db.head.json.gz
path: node_modules/@aws-cdk/aws-service-spec/db.json.gz
if-no-files-found: error

# Build @aws-cdk/spec2cdk and run L1 gen script to generate base files for new modules
- name: Build @aws-cdk/spec2cdk
run: lerna run build --stream --no-progress --skip-nx-cache --scope @aws-cdk/spec2cdk
Expand All @@ -50,14 +69,56 @@ jobs:
git add .
git diff --patch --staged > ${{ runner.temp }}/update-spec.patch
- name: Upload Patch
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: update-spec.patch
path: ${{ runner.temp }}/update-spec.patch

diff-db:
needs: update-spec
runs-on: ubuntu-latest
permissions:
contents: write
id-token: none
pull-requests: write
env:
CI: "true"
steps:
- name: Download base database
uses: actions/download-artifact@v4
with:
name: db.base.json.gz
path: base
- name: Download head database
uses: actions/download-artifact@v4
with:
name: db.head.json.gz
path: head
- name: Diff databases
id: diff-db
run: npx --yes --package=@aws-cdk/service-spec-importers@latest -c 'diff-db base/db.json.gz head/db.json.gz' > DIFF || echo "diff-result=true" >> $GITHUB_OUTPUT
continue-on-error: true
- name: Create PR body file
run: |-
echo 'Updates the L1 CloudFormation resource definitions with the latest changes from `@aws-cdk/aws-service-spec`' >> PR.md
- name: Add model changelog to PR body file
if: steps.diff-db.outputs.diff-result
run: |-
echo '' >> PR.md
echo '**L1 CloudFormation resource definition changes:**' >> PR.md
echo '```' >> PR.md
cat DIFF >> PR.md
echo '```' >> PR.md
- name: Upload PR body file
uses: actions/upload-artifact@v4
with:
name: PR.md
path: PR.md
pr:
name: Create Pull Request
needs: update-spec
needs:
- update-spec
- diff-db
permissions:
contents: write
pull-requests: write
Expand All @@ -67,27 +128,32 @@ jobs:
uses: actions/checkout@v4

- name: Download patch
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: update-spec.patch
path: ${{ runner.temp }}

- name: Apply patch
run: '[ -s ${{ runner.temp }}/update-spec.patch ] && git apply ${{ runner.temp }}/update-spec.patch || echo "Empty patch. Skipping."'

- name: Download PR body file
uses: actions/download-artifact@v4
with:
name: PR.md
path: ${{ runner.temp }}

- name: Make Pull Request
uses: peter-evans/create-pull-request@v5
with:
# Git commit details
branch: automation/spec-update
author: aws-cdk-automation <[email protected]>
commit-message: |-
feat: update AWS Service Spec
AWS Service Spec packages to latest versions.
feat: update L1 CloudFormation resource definitions
Updates the L1 CloudFormation resource definitions with the latest changes from `@aws-cdk/aws-service-spec`
# Pull Request details
title: "feat: update AWS Service Spec"
body: |-
AWS Service Spec packages to latest versions.
title: "feat: update L1 CloudFormation resource definitions"
body-path: ${{ runner.temp }}/PR.md
labels: contribution/core,dependencies,auto-approve,pr-linter/exempt-integ-test,pr-linter/exempt-readme,pr-linter/exempt-test
team-reviewers: aws-cdk-team
# Github prevents further Github actions to be run if the default Github token is used.
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/update-metadata-regions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
git add .
git diff --patch --staged > ${{ runner.temp }}/update-spec.patch
- name: Upload Patch
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: update-spec.patch
path: ${{ runner.temp }}/update-spec.patch
Expand All @@ -50,7 +50,7 @@ jobs:
uses: actions/checkout@v4

- name: Download patch
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: update-spec.patch
path: ${{ runner.temp }}
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/yarn-upgrade.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,13 +62,13 @@ jobs:
ncu --upgrade --reject=@types/node,@types/prettier,constructs,typescript --target=minor
# Upgrade all the packages
lerna exec --parallel ncu -- --upgrade --filter=typescript --target=patch
lerna exec --parallel ncu -- --upgrade --reject='@types/conventional-commits-parser,@types/node,@types/prettier,constructs,typescript,aws-sdk-mock,@aws-cdk/aws-service-spec,@aws-cdk/service-spec-types,${{ steps.list-packages.outputs.list }}' --target=minor
lerna exec --parallel ncu -- --upgrade --reject='@types/conventional-commits-parser,@types/node,@types/prettier,constructs,typescript,aws-sdk-mock,@aws-sdk/*,@aws-cdk/aws-service-spec,@aws-cdk/service-spec-types,${{ steps.list-packages.outputs.list }}' --target=minor
# Upgrade package.json files 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-testing/framework-integ/test/aws-eks/test/sdk-call-integ-test-docker-app/app/ && ncu --upgrade --reject=',${{ steps.list-packages.outputs.list }}'
cd packages/@aws-cdk-testing/framework-integ/test/aws-eks/test/sdk-call-integ-test-docker-app/app/ && ncu --upgrade --reject='@aws-sdk/*,${{ steps.list-packages.outputs.list }}'
# This will ensure the current lockfile is up-to-date with the dependency specifications (necessary for "yarn upgrade" to run)
- name: Run "yarn install"
Expand All @@ -89,7 +89,7 @@ jobs:
git add .
git diff --patch --staged > ${{ runner.temp }}/upgrade.patch
- name: Upload Patch
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: upgrade.patch
path: ${{ runner.temp }}/upgrade.patch
Expand All @@ -106,7 +106,7 @@ jobs:
uses: actions/checkout@v4

- name: Download patch
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: upgrade.patch
path: ${{ runner.temp }}
Expand Down
2 changes: 1 addition & 1 deletion .mergify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ pull_request_rules:
label:
add: [ contribution/core ]
conditions:
- author~=^(rix0rrr|MrArnoldPalmer|iliapolo|otaviomacedo|madeline-k|kaizencc|comcalvi|corymhall|peterwoodworth|TheRealAmazonKendra|vinayak-kukreja|mrgrain|pahud|cgarvis|kellertk|HBobertz|sumupitchayan|SankyRed|udaypant|colifran|scanlonp|mikewrighton|moelasmar)$
- author~=^(rix0rrr|MrArnoldPalmer|iliapolo|otaviomacedo|madeline-k|kaizencc|comcalvi|TheRealAmazonKendra|vinayak-kukreja|mrgrain|pahud|cgarvis|kellertk|HBobertz|sumupitchayan|SankyRed|udaypant|colifran|scanlonp|mikewrighton|moelasmar|paulhcsun|awsmjs|evgenyka)$
- -label~="contribution/core"
- name: automatic merge
actions:
Expand Down
5 changes: 5 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
repos:
- repo: https://github.com/gitleaks/gitleaks
rev: v8.17.0
hooks:
- id: gitleaks
Loading

0 comments on commit da8b06e

Please sign in to comment.