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

chore: npm-check-updates && yarn upgrade #33590

Closed
wants to merge 3 commits into from

Conversation

aws-cdk-automation
Copy link
Collaborator

Ran npm-check-updates and yarn upgrade to keep the yarn.lock file up-to-date.

@aws-cdk-automation aws-cdk-automation added auto-approve contribution/core This is a PR that came from AWS. dependencies This issue is a problem in a dependency or a pull request that updates a dependency file. labels Feb 26, 2025
@aws-cdk-automation aws-cdk-automation requested a review from a team February 26, 2025 13:52
@github-actions github-actions bot added the p2 label Feb 26, 2025
@aws-cdk-automation aws-cdk-automation requested a review from a team February 26, 2025 13:52
Copy link

codecov bot commented Feb 26, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 82.21%. Comparing base (b3edd0d) to head (bf26b0a).
Report is 18 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #33590   +/-   ##
=======================================
  Coverage   82.21%   82.21%           
=======================================
  Files         119      119           
  Lines        6876     6876           
  Branches     1162     1162           
=======================================
  Hits         5653     5653           
  Misses       1120     1120           
  Partials      103      103           
Flag Coverage Δ
suite.unit 82.21% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
packages/aws-cdk ∅ <ø> (∅)
packages/aws-cdk-lib/core 82.21% <ø> (ø)

@samson-keung
Copy link
Contributor

The build log shows that some snapshots need to be updated due to helm version changed.

Build log snippet:

@aws-cdk/aws-eks-v2-alpha: [~] AWS::Lambda::LayerVersion kubectlLayer44321E08 replace
@aws-cdk/aws-eks-v2-alpha:  └─ [~] Description (requires replacement)
@aws-cdk/aws-eks-v2-alpha:      ├─ [-] /opt/kubectl/kubectl 1.32.0; /opt/helm/helm 3.17.0
@aws-cdk/aws-eks-v2-alpha:      └─ [+] /opt/kubectl/kubectl 1.32.0; /opt/helm/helm 3.17.1

Commit where Helm version was updated: cdklabs/awscdk-asset-kubectl#1667

I will update the snapshots shortly.

@samson-keung samson-keung self-assigned this Feb 26, 2025
@samson-keung samson-keung force-pushed the automation/yarn-upgrade branch from bcc9b91 to 17eeb18 Compare February 26, 2025 21:25
aws-cdk-automation and others added 2 commits February 26, 2025 21:30
Ran npm-check-updates and yarn upgrade to keep the `yarn.lock` file up-to-date.
@samson-keung samson-keung force-pushed the automation/yarn-upgrade branch from 17eeb18 to c016ffe Compare February 26, 2025 21:32
@samson-keung samson-keung added pr/do-not-merge This PR should not be merged at this time. and removed auto-approve labels Feb 26, 2025
@samson-keung
Copy link
Contributor

This yarn upgrade job updated the @aws-cdk/asset-awscli-v1 version as well (here).

So snapshots that relies on the AWS CLI layer requires updating as well since the asset hash changed. Relevant log snippet:

@aws-cdk-testing/framework-integ:   CHANGED    aws-s3-deployment/test/integ.bucket-deployment-cloudfront 1.267s
@aws-cdk-testing/framework-integ:       Resources
@aws-cdk-testing/framework-integ: [~] AWS::Lambda::LayerVersion DeployWithInvalidationAwsCliLayerDEDD5787 replace
@aws-cdk-testing/framework-integ:  └─ [~] Content (requires replacement)
@aws-cdk-testing/framework-integ:      └─ [~] .S3Key:
@aws-cdk-testing/framework-integ:          ├─ [-] e42a736be21cd3134b9bff4e71e3afa99a4cc900ae489e9a7f7025c8d258f9b8.zip
@aws-cdk-testing/framework-integ:          └─ [+] 1be473fb31b9ca92b2826d87592d6b342ab66fd93f4ba4e1a60e5920ced9e94c.zip

This has happened in the past: #31698

@samson-keung
Copy link
Contributor

Another tricky error was the following:

@aws-cdk-testing/framework-integ: #0 building with "default" instance using docker driver
@aws-cdk-testing/framework-integ: #1 [internal] load build definition from Dockerfile
@aws-cdk-testing/framework-integ: #1 transferring dockerfile: 1.62kB done
// ... skipped ...
@aws-cdk-testing/framework-integ: bun install v1.1.30 (7996d06b)
@aws-cdk-testing/framework-integ: Resolving dependencies
@aws-cdk-testing/framework-integ: Resolved, downloaded and extracted [10]
@aws-cdk-testing/framework-integ: error: lockfile had changes, but lockfile is frozen
@aws-cdk-testing/framework-integ: note: try re-running without --frozen-lockfile and commit the updated lockfile
@aws-cdk-testing/framework-integ: /codebuild/output/src1007650594/src/github.com/aws/aws-cdk/packages/aws-cdk-lib/core/lib/asset-staging.js:350
@aws-cdk-testing/framework-integ:             throw new Error(`Failed to bundle asset ${this.node.path}, bundle output is located at ${bundleErrorDir}: ${err}`);
@aws-cdk-testing/framework-integ:             ^
@aws-cdk-testing/framework-integ: Error: Failed to bundle asset TestStack/Function/Code/Stage, bundle output is located at /codebuild/output/src1007650594/src/github.com/aws/aws-cdk/packages/@aws-cdk-testing/framework-integ/test/aws-lambda-nodejs/test/cdk-integ.out.integ.dependencies-bun.js.snapshot/bundling-temp-291e5d7802fb3cc8e8cc3f2e82a347b9cdeed43bc5c124555dc50c6d5404f0e8-error: Error: docker exited with status 1
@aws-cdk-testing/framework-integ: --> Command: docker run --rm -u "0:0" -v "/codebuild/output/src1007650594/src/github.com/aws/aws-cdk/packages/@aws-cdk-testing/framework-integ/test/aws-lambda-nodejs/test/integ-handlers/bun:/asset-input:delegated" -v "/codebuild/output/src1007650594/src/github.com/aws/aws-cdk/packages/@aws-cdk-testing/framework-integ/test/aws-lambda-nodejs/test/cdk-integ.out.integ.dependencies-bun.js.snapshot/bundling-temp-291e5d7802fb3cc8e8cc3f2e82a347b9cdeed43bc5c124555dc50c6d5404f0e8:/asset-output:delegated" -w "/" cdk-1143ce4c1dc4eeecc0d49bca6af23a15e12e8e3dcbe2763b3d624da4323686fd bash -c "esbuild --bundle \"/asset-input/dependencies-bun.ts\" --target=node20 --platform=node --outfile=\"/asset-output/index.js\" --minify --external:@aws-sdk/* --external:@smithy/* --external:axios && echo '{\"dependencies\":{\"axios\":\"1.8.1\"}}' > \"/asset-output/package.json\" && cp \"/asset-input/bun.lockb\" \"/asset-output/bun.lockb\" && cd \"/asset-output\" && bun install --frozen-lockfile --backend copyfile && rm -rf \"/asset-output/node_modules/.cache\""
@aws-cdk-testing/framework-integ:     at AssetStaging.bundle (/codebuild/output/src1007650594/src/github.com/aws/aws-cdk/packages/aws-cdk-lib/core/lib/asset-staging.js:350:19)
@aws-cdk-testing/framework-integ:     at AssetStaging.stageByBundling (/codebuild/output/src1007650594/src/github.com/aws/aws-cdk/packages/aws-cdk-lib/core/lib/asset-staging.js:220:14)
@aws-cdk-testing/framework-integ:     at stageThisAsset (/codebuild/output/src1007650594/src/github.com/aws/aws-cdk/packages/aws-cdk-lib/core/lib/asset-staging.js:87:41)
@aws-cdk-testing/framework-integ:     at Cache.obtain (/codebuild/output/src1007650594/src/github.com/aws/aws-cdk/packages/aws-cdk-lib/core/lib/private/cache.js:28:17)
@aws-cdk-testing/framework-integ:     at new AssetStaging (/codebuild/output/src1007650594/src/github.com/aws/aws-cdk/packages/aws-cdk-lib/core/lib/asset-staging.js:111:48)
@aws-cdk-testing/framework-integ:     at new Asset (/codebuild/output/src1007650594/src/github.com/aws/aws-cdk/packages/aws-cdk-lib/aws-s3-assets/lib/asset.js:36:25)
@aws-cdk-testing/framework-integ:     at AssetCode.bind (/codebuild/output/src1007650594/src/github.com/aws/aws-cdk/packages/aws-cdk-lib/aws-lambda/lib/code.js:371:26)
@aws-cdk-testing/framework-integ:     at new Function (/codebuild/output/src1007650594/src/github.com/aws/aws-cdk/packages/aws-cdk-lib/aws-lambda/lib/function.js:487:33)
@aws-cdk-testing/framework-integ:     at new NodejsFunction (/codebuild/output/src1007650594/src/github.com/aws/aws-cdk/packages/aws-cdk-lib/aws-lambda-nodejs/lib/function.js:55:13)
@aws-cdk-testing/framework-integ:     at Object.<anonymous> (/codebuild/output/src1007650594/src/github.com/aws/aws-cdk/packages/@aws-cdk-testing/framework-integ/test/aws-lambda-nodejs/test/integ.dependencies-bun.js:10:17)
@aws-cdk-testing/framework-integ: Node.js v18.20.6
@aws-cdk-testing/framework-integ:   ERROR      aws-lambda-nodejs/test/integ.dependencies-bun 40.872s

Reason for this integ.dependencies-bun integ test failure is because the integ test tests the bun bundling feature. The test bundles the axios dependency into the lambda asset. The axios version is updated in this yarn upgrade PR here which means the bun lockfile requires an update as well. But because of a bug - #32906 - the bundling logic does not allow changes in the lockfile and subsequently threw an error and cause the test to fail.

@aws-cdk-automation
Copy link
Collaborator Author

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildv2Project1C6BFA3F-wQm2hXv2jqQv
  • Commit ID: bf26b0a
  • Result: FAILED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@samson-keung
Copy link
Contributor

Too many git conflicts. Let me close this so that the workflow re-do the upgrade from the latest main branch.

Copy link

Comments on closed issues and PRs are hard for our team to see.
If you need help, please open a new issue that references this one.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 28, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
contribution/core This is a PR that came from AWS. dependencies This issue is a problem in a dependency or a pull request that updates a dependency file. p2 pr/do-not-merge This PR should not be merged at this time.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants