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

[Merged by Bors] - Report error to client when SPU is given invalid WASM module #1713

Closed

Conversation

nicholastmosher
Copy link
Contributor

@nicholastmosher nicholastmosher commented Oct 1, 2021

Closes #1143.

When supplying an invalid WASM module to the consumer, the client will now return with the following error:

$ flvd consume fruits -B --filter=Cargo.toml          # note that Cargo.toml is not a valid WASM file
Consuming records starting 10 from the end of topic 'fruits'
Error:
   0: Fluvio client error
   1: SmartStream error
   2: WASM Module error: failed to parse WebAssembly module

Action items:

  • Implement error delivery
  • Add integration test

@nicholastmosher nicholastmosher marked this pull request as ready for review October 1, 2021 19:57
Copy link
Contributor

@sehz sehz left a comment

Choose a reason for hiding this comment

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

Looks good. Just couple of nits

crates/fluvio-dataplane-protocol/src/error_code.rs Outdated Show resolved Hide resolved
crates/fluvio-spu/src/services/public/stream_fetch.rs Outdated Show resolved Hide resolved
Copy link
Contributor

@sehz sehz left a comment

Choose a reason for hiding this comment

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

LGTM

@sehz
Copy link
Contributor

sehz commented Oct 1, 2021

bors r+

bors bot pushed a commit that referenced this pull request Oct 1, 2021
Closes #1143.

When supplying an invalid WASM module to the consumer, the client will now return with the following error:

```
$ flvd consume fruits -B --filter=Cargo.toml          # note that Cargo.toml is not a valid WASM file
Consuming records starting 10 from the end of topic 'fruits'
Error:
   0: Fluvio client error
   1: SmartStream error
   2: WASM Module error: failed to parse WebAssembly module
```

Action items:

- [x] Implement error delivery
- [x] Add integration test
@bors
Copy link

bors bot commented Oct 1, 2021

Build failed:

@nicholastmosher
Copy link
Contributor Author

Oh interesting, I didn't actually know what the crate_version check did until now! Cool catch, and nice script @tjtelan!

bors r+

bors bot pushed a commit that referenced this pull request Oct 2, 2021
Closes #1143.

When supplying an invalid WASM module to the consumer, the client will now return with the following error:

```
$ flvd consume fruits -B --filter=Cargo.toml          # note that Cargo.toml is not a valid WASM file
Consuming records starting 10 from the end of topic 'fruits'
Error:
   0: Fluvio client error
   1: SmartStream error
   2: WASM Module error: failed to parse WebAssembly module
```

Action items:

- [x] Implement error delivery
- [x] Add integration test
@bors
Copy link

bors bot commented Oct 2, 2021

Pull request successfully merged into master.

Build succeeded:

@bors bors bot changed the title Report error to client when SPU is given invalid WASM module [Merged by Bors] - Report error to client when SPU is given invalid WASM module Oct 2, 2021
@bors bors bot closed this Oct 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bug: SPU should return error if smart stream WASM file is invalid
2 participants