-
Notifications
You must be signed in to change notification settings - Fork 824
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 filesystem access when running python with wasmer run-unstable .
#3920
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Michael-F-Bryan
changed the title
Finish implementing filesystem merging in WasiEnv::use_package()
Fix filesystem access when running python with May 26, 2023
wasmer run-unstable .
syrusakbary
reviewed
May 27, 2023
Michael-F-Bryan
force-pushed
the
fs-union-fix
branch
from
May 29, 2023 09:30
4743f1e
to
e20bee2
Compare
…iFsRoot::Backing(..)
Michael-F-Bryan
force-pushed
the
fs-union-fix
branch
from
May 30, 2023 14:55
bec9178
to
3bfd328
Compare
ptitSeb
reviewed
May 30, 2023
ptitSeb
approved these changes
May 30, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This fixes
wasmer run-unstable .
for CPython by...webc
that includes the fixes for https://github.com/wasmerio/pirita/pull/115 and https://github.com/wasmerio/pirita/pull/117--use
flagContext
When you are setting up a WASI instance and add a
BinaryPackage
to aWasiEnv
(e.g. viaWasiEnvBuilder::use_webc()
), we will merge the package's filesystem (i.e. all its volumes, and those of its dependencies) into the root filesystem being constructed for our new WASI instance (WasiFsRoot
).When you use the sandboxed filesystem (a
virtual_fs::TmpFileSystem
) viaWasiEnvBuilder::set_sandbox_fs()
, this merging is done like normal becauseTmpFileSystem
has a very efficientunion()
method.However, we don't get that unioning behaviour when the user supplies their own filesystem instance. Instead, the WASI instance will use an opaque
WasiFsRoot::Backing
and the only way for that package's files to become available is by manually copying the bytes from each file across (that's what this PR is doing).The Python use case wasn't working because #3852 left that manual copy operation as a TODO.