-
Notifications
You must be signed in to change notification settings - Fork 70
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
Use file loader without local cache in the upload server #755
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
csegarragonz
commented
May 23, 2023
@@ -221,6 +221,76 @@ TEST_CASE_METHOD(UploadTestFixture, "Test upload and download", "[upload]") | |||
} | |||
} | |||
|
|||
TEST_CASE_METHOD(UploadTestFixture, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This test fails against the current main
branch
7a62cc5
to
2420adb
Compare
14597fe
to
d80851b
Compare
csegarragonz
commented
May 30, 2023
@@ -49,17 +55,17 @@ std::vector<uint8_t> MachineCodeGenerator::hashBytes( | |||
} | |||
|
|||
std::vector<uint8_t> MachineCodeGenerator::doCodegen( | |||
std::vector<uint8_t>& bytes, | |||
const std::string& fileName, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These two arguments in the argument list were not used, so I remove them.
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.
The behaviour of the upload server should be that, irrespective of whether the
user/function
has been uploaded before, the WASM bytes and the machine code are re-generated and uploaded to S3.To achieve this goal, at some point in the past we introduced the file loader without local cache. As a reminder, the default behaviour of the file loader is to cache files in the local filesystem.
However, we were only using the file loader without cache to upload the WASM bytes, but not to generate the machine code. A
MachineCodeGenerator
instance takes aFileLoader
in its constructor which, before, was configured to use the local cache.This means that, even though the WASM file was uploaded, the generated machine code (which was later on uploaded to S3) corresponded to a potentially old WASM file. This was causing issues and making the
quick-start
tests fail. (Why this was not caught in the GHA is a different story that I cover in #746).In this PR I fix this issue by explicitly giving
getMachineCodeGenerator
aFileLoader&
and add a regression test. I also update theFunctionLoaderTestFixture
to run upload tests for different WASM VMs.