-
Notifications
You must be signed in to change notification settings - Fork 561
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
[v23.3.x] transform: validate wasm binaries at deploy time #16498
Merged
rockwotj
merged 11 commits into
redpanda-data:v23.3.x
from
rockwotj:vbotbuildovich/backport-16290-v23.3.x-479
Feb 8, 2024
Merged
[v23.3.x] transform: validate wasm binaries at deploy time #16498
rockwotj
merged 11 commits into
redpanda-data:v23.3.x
from
rockwotj:vbotbuildovich/backport-16290-v23.3.x-479
Feb 8, 2024
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
For testing, it will be nice to be able to define these tests using the WAT format. Enable the feature. Signed-off-by: Tyler Rockwood <rockwood@redpanda.com> (cherry picked from commit 0c830a5)
Signed-off-by: Tyler Rockwood <rockwood@redpanda.com> (cherry picked from commit c2f6741)
We upgraded wasmtime and the features we use, so update the crates too Signed-off-by: Tyler Rockwood <rockwood@redpanda.com> (cherry picked from commit 73ff2a1)
This was referenced Feb 6, 2024
Parsing wasm modules uses leb128 for numbers, so introduce a decoder for this with good tests. Signed-off-by: Tyler Rockwood <rockwood@redpanda.com> (cherry picked from commit 1c7baea)
eb3a4cb
to
fa9ee23
Compare
This will allow us to extract imports and exports, so we can validate our ABI during deploys. Signed-off-by: Tyler Rockwood <rockwood@redpanda.com> (cherry picked from commit 3b1a131)
Signed-off-by: Tyler Rockwood <rockwood@redpanda.com> (cherry picked from commit 8077547)
Support validating a wasm module without the expensive of compiling and running it. The validation is mostly a smoke test of the different things that could go wrong. It's still possible to have a module that does something "wrong" from an ABI prospective. I think this is good enough because at some point you have to run the module to make sure it does the right thing. Signed-off-by: Tyler Rockwood <rockwood@redpanda.com> (cherry picked from commit c6273ab)
This does valiation of the WebAssembly binary during deploys. Signed-off-by: Tyler Rockwood <rockwood@redpanda.com> (cherry picked from commit 438b339)
In the case of deploys errors could come from multiple different subsystems, so we will be consistent and always return std::error_code for all public methods in the transform subsystem. Signed-off-by: Tyler Rockwood <rockwood@redpanda.com> (cherry picked from commit 6784b5e)
Have more understandable error messages for users when they deploy functions, this will also help ducktape distinguish between them. Signed-off-by: Tyler Rockwood <rockwood@redpanda.com> (cherry picked from commit fccae9c)
Signed-off-by: Tyler Rockwood <rockwood@redpanda.com> (cherry picked from commit e714c01)
fa9ee23
to
707f317
Compare
/ci-repeat |
oleiman
approved these changes
Feb 8, 2024
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.
lgtm
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.
Backport of PR #16290 the main conflicts were because #16185 was not backported, so I just had to remove those conflicts, and also fix some includes