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

fix(lambda-nodejs): do not require a frozen lockfile for bun #32908

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

blimmer
Copy link
Contributor

@blimmer blimmer commented Jan 14, 2025

Issue #32906

Closes #32906.

Reason for this change

When I implemented bun support, I accidentally used --frozen-lockfile, which caused issues when the lockfile contained additional entries other than what's being bundled in the docker container.

The issue has a small repro-case.

Description of changes

I removed the --frozen-lockfile flag, which resolved the problem.

Describe any new or updated permissions being added

N/A

Description of how you validated changes

I added an additional package to the bun.lockb file in the integration test. This caused the issue to occur in the test suite. Once I made the changes in this PR, the test started passing again.

Checklist


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license

@aws-cdk-automation aws-cdk-automation requested a review from a team January 14, 2025 01:00
@github-actions github-actions bot added bug This issue is a bug. p2 admired-contributor [Pilot] contributed between 13-24 PRs to the CDK labels Jan 14, 2025
Copy link
Collaborator

@aws-cdk-automation aws-cdk-automation left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The pull request linter has failed. See the aws-cdk-automation comment below for failure reasons. If you believe this pull request should receive an exemption, please comment and provide a justification.

A comment requesting an exemption should contain the text Exemption Request. Additionally, if clarification is needed add Clarification Request to a comment.

@blimmer blimmer changed the title fix(aws-lambda-nodejs): do not require a frozen lockfile for bun fix(lambda-nodejs): do not require a frozen lockfile for bun Jan 14, 2025
@@ -10,7 +10,7 @@ const stack = new cdk.Stack(app, 'TestStack');

const handler = new lambda.NodejsFunction(stack, 'Function', {
entry: path.join(__dirname, 'integ-handlers/bun/dependencies-bun.ts'),
runtime: Runtime.NODEJS_20_X,
runtime: Runtime.NODEJS_22_X,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just bumped this to make the PR linter happy and to force re-run the integration test.

@aws-cdk-automation aws-cdk-automation dismissed their stale review January 14, 2025 01:10

✅ Updated pull request passes all PRLinter validations. Dismissing previous PRLinter review.

Copy link

codecov bot commented Jan 14, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 81.41%. Comparing base (8ff930a) to head (14f5bba).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #32908   +/-   ##
=======================================
  Coverage   81.41%   81.41%           
=======================================
  Files         223      223           
  Lines       13721    13721           
  Branches     2416     2416           
=======================================
  Hits        11171    11171           
  Misses       2271     2271           
  Partials      279      279           
Flag Coverage Δ
suite.unit 81.41% <ø> (ø)

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

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

@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildv2Project1C6BFA3F-wQm2hXv2jqQv
  • Commit ID: 14f5bba
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

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

@aws-cdk-automation aws-cdk-automation added the pr/needs-community-review This PR needs a review from a Trusted Community Member or Core Team Member. label Jan 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
admired-contributor [Pilot] contributed between 13-24 PRs to the CDK bug This issue is a bug. p2 pr/needs-community-review This PR needs a review from a Trusted Community Member or Core Team Member.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

(aws-lambda-nodejs): bun depenedencies fail with error: lockfile had changes, but lockfile is frozen
2 participants