Skip to content

Conversation

@iankhou
Copy link
Contributor

@iankhou iankhou commented Mar 5, 2025

Description

When building the AWS CDK CLI, a .zip file is created in a temporary directory and moved afterward.

In certain environments, "cross-device link" fails. When the user's workspace is in a mounted volume, moving of a file fails during the build step because fs.rename() only works when the source and destination are in the same filesystem.

Screenshot 2025-03-05 at 13 08 20

Solution

Copy the source file to the destination and delete the source file. This achieves the same result, but prevents us from running into limitations across filesystems.

Testing

Ran yarn build successfully and all tests pass.


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

@iankhou iankhou added the bug label Mar 5, 2025
@iankhou iankhou self-assigned this Mar 5, 2025
@iankhou iankhou temporarily deployed to integ-approval March 5, 2025 18:13 — with GitHub Actions Inactive
@github-actions github-actions bot added the p2 label Mar 5, 2025
@aws-cdk-automation aws-cdk-automation requested a review from a team March 5, 2025 18:14
@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 85.12%. Comparing base (2f0caf4) to head (d7b87ac).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #195      +/-   ##
==========================================
+ Coverage   85.09%   85.12%   +0.02%     
==========================================
  Files         207      207              
  Lines       35723    35723              
  Branches     4632     4633       +1     
==========================================
+ Hits        30400    30410      +10     
+ Misses       5169     5159      -10     
  Partials      154      154              
Flag Coverage Δ
suite.unit 85.12% <ø> (+0.02%) ⬆️

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@aws-cdk-automation aws-cdk-automation added this pull request to the merge queue Mar 5, 2025
Merged via the queue into main with commit f59332f Mar 5, 2025
33 checks passed
@aws-cdk-automation aws-cdk-automation deleted the iankhou-fix-cross-device-link-error branch March 5, 2025 19:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants