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

[v23.3.x] transform: validate wasm binaries at deploy time #16498

Conversation

rockwotj
Copy link
Contributor

@rockwotj rockwotj commented Feb 6, 2024

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

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)
@rockwotj rockwotj added this to the v23.3.x-next milestone Feb 6, 2024
@rockwotj rockwotj added the kind/backport PRs targeting a stable branch label Feb 6, 2024
@rockwotj rockwotj marked this pull request as ready for review February 6, 2024 15:46
@rockwotj rockwotj requested review from gousteris and removed request for a team February 6, 2024 15:46
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)
@rockwotj rockwotj force-pushed the vbotbuildovich/backport-16290-v23.3.x-479 branch 2 times, most recently from eb3a4cb to fa9ee23 Compare February 6, 2024 21:45
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)
@rockwotj rockwotj force-pushed the vbotbuildovich/backport-16290-v23.3.x-479 branch from fa9ee23 to 707f317 Compare February 7, 2024 02:17
@rockwotj
Copy link
Contributor Author

rockwotj commented Feb 8, 2024

/ci-repeat

@rockwotj rockwotj requested a review from oleiman February 8, 2024 04:07
Copy link
Member

@oleiman oleiman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@rockwotj rockwotj merged commit d5def7f into redpanda-data:v23.3.x Feb 8, 2024
18 checks passed
@piyushredpanda piyushredpanda modified the milestones: v23.3.x-next, v23.3.6 Feb 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/build area/redpanda kind/backport PRs targeting a stable branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants