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(cdk-assets): asset concurrency leaves a corrupted archive #24026

Merged
merged 1 commit into from
Feb 6, 2023

Conversation

rix0rrr
Copy link
Contributor

@rix0rrr rix0rrr commented Feb 6, 2023

This is a re-roll of #23677 which was reverted in #23994 because the randomUUID() function from the original solution was not available in Node versions below 14.17 (and we advertise compatibility with Node 14.*).

We didn't actually need a UUID, just any random string, so replace it with a function that generates a random string in a different way.


Resolves #23290

A very simple fix for the issue where builds with --concurrency specified can lead to corrupt archives. Rather than use the outputFile as the basis for the temp file name we simply use a random string.


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

@rix0rrr rix0rrr requested a review from a team February 6, 2023 09:38
@rix0rrr rix0rrr self-assigned this Feb 6, 2023
@gitpod-io
Copy link

gitpod-io bot commented Feb 6, 2023

@aws-cdk-automation aws-cdk-automation requested a review from a team February 6, 2023 09:38
@github-actions github-actions bot added bug This issue is a bug. effort/small Small work item – less than a day of effort p1 labels Feb 6, 2023
@rix0rrr rix0rrr added pr-linter/exempt-test The PR linter will not require test changes pr-linter/exempt-integ-test The PR linter will not require integ test changes and removed bug This issue is a bug. p1 effort/small Small work item – less than a day of effort labels Feb 6, 2023
@mergify mergify bot added the contribution/core This is a PR that came from AWS. label Feb 6, 2023
#23677)

Resolves #23290

A very simple fix for the issue where builds with `--concurrency` specified can lead to corrupt archives. Rather than use the outputFile as the basis for the temp file name we simply use a random UUID.

Please note that I was unable to run the integration tests in this instance, which are likely necessary given that this change impacts the behavior of the archiver.
@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

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

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

@mergify
Copy link
Contributor

mergify bot commented Feb 6, 2023

Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@mergify mergify bot merged commit 989454f into main Feb 6, 2023
@mergify mergify bot deleted the huijbers/re-roll-assets branch February 6, 2023 10:20
@vaclavbarta
Copy link

Thanks for re-roll fixing @rix0rrr

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contribution/core This is a PR that came from AWS. pr-linter/exempt-integ-test The PR linter will not require integ test changes pr-linter/exempt-test The PR linter will not require test changes
Projects
None yet
5 participants