-
Notifications
You must be signed in to change notification settings - Fork 245
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(kernel): error raised during rename operation on win32 #1702
Conversation
When loading a new library into the jsii kernel, the provided `tarball` was extracted to a temporary directory, then moved into it's final location. On Windows, this operation could fail on an `EACCESS` or `EPERM` error (often due to malware scanners accessing the file for inspection on file systems which do not support renaming files that are being accessed). This changes how the `load` API works so taht the `tarball` is extracted directly in it's final install location, so that no rename operation is needed.
Note: the change appears much bigger than it really is because it involves changing the indentation of a large chunk of code (no longer wrapped under a |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
Guess I'm not necessarily opposed to this, but generally we do moves for a reason: to preserve atomicity. Can you elaborate why this would not be an issue in this case? Why did we do the move in the first place? |
Okay talked to Elad, it's not for atomicity reasons. Kay then. |
So the move was quite probably due to the fact the contents of the tarball is nested under an undesirable But yeah it's not for atomicity since we should be able to assume only ONE thread is running through there at a time (node being collaborative multitasking only) |
Thank you for contributing! ❤️ I will now look into making sure the PR is up-to-date, then proceed to try and merge it! |
Merging (with squash)... |
Just going to leave this right here 😛 But yeah, let's try it, probably worth the risk. |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
Merging (with squash)... |
When loading a new library into the jsii kernel, the provided
tarball
was extracted to a temporary directory, then moved into it's final
location. On Windows, this operation could fail on an
EACCESS
orEPERM
error (often due to malware scanners accessing the file forinspection on file systems which do not support renaming files that are
being accessed).
This changes how the
load
API works so taht thetarball
is extracteddirectly in it's final install location, so that no rename operation is
needed.
Fixes #992
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.