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

docs(wasm): support http(s) fetch of Wasm files #3625

Merged
merged 5 commits into from
Aug 7, 2023

Conversation

evacchi
Copy link
Contributor

@evacchi evacchi commented Jul 24, 2023

Signed-off-by: Edoardo Vacchi [email protected]

Thank you for helping make the Dapr documentation better!

Please follow this checklist before submitting:

  • Commits are signed with Developer Certificate of Origin (DCO - learn more)
  • Read the contribution guide
  • Commands include options for Linux, MacOS, and Windows within codetabs
  • New file and folder names are globally unique
  • Page references use shortcodes instead of markdown or URL links
  • Images use HTML style and have alternative text
  • Places where multiple code/command options are given have codetabs

In addition, please fill out the following to help reviewers understand this pull request:

Description

Update wasm middleware/bindings in accordance to dapr/components-contrib#3005

Issue reference

Related issue: dapr/components-contrib#2700

@evacchi evacchi requested review from a team as code owners July 24, 2023 09:06
Comment on lines 88 to 101

```yaml
apiVersion: dapr.io/v1alpha1
kind: Component
metadata:
name: wasm
spec:
type: bindings.wasm
version: v1
metadata:
- name: url
value: "https://github.com/vmware-labs/webassembly-language-runtimes/releases/download/ruby%2F3.2.0%2B20230215-1349da9/ruby-3.2.0-slim.wasm"
```
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I was not able to test this snippet though (see discord thread)

Copy link
Contributor Author

@evacchi evacchi Jul 24, 2023

Choose a reason for hiding this comment

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

I have updated the documentation to actually reflect the implementation. The issue is the original example was tokenizing naively at ,, causing the following arglist to be split incorrectly:

    "args": "-ne,'print \"Hello, \"; print'" => [-ne] ['print "Hello] [ "; print]

a working example is instead:

    "args": "-ne,print \"Hello \"; print" => [-ne] [print "Hello "; print]

notice how quotes are currently being ignored. This is obviously suboptimal and should be fixed :)

Copy link
Collaborator

@hhunter-ms hhunter-ms left a comment

Choose a reason for hiding this comment

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

initial review

@evacchi evacchi requested review from hhunter-ms and Taction July 25, 2023 09:01
@github-actions
Copy link

Stale PR, paging all reviewers

@github-actions github-actions bot added the stale label Jul 31, 2023
@msfussell msfussell removed the stale label Jul 31, 2023
@msfussell
Copy link
Member

@Taction - Can you please review this?

value: "https://github.com/vmware-labs/webassembly-language-runtimes/releases/download/ruby%2F3.2.0%2B20230215-1349da9/ruby-3.2.0-slim.wasm"
```

Assuming that you started your Wasm Binding at port 3500, you'd run:
Copy link
Member

Choose a reason for hiding this comment

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

Assuming that you started your Dapr at port 3500 with the Wasm Binding, you'd run:

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I am rephrasing because now that I am re-reading that, the phrasing was awkward to begin with:

Assuming that you wanted to start your Dapr at port 3500 with the Wasm Binding, you'd run:

@Taction
Copy link
Member

Taction commented Aug 3, 2023

LGTM overall, just a nit change.

Signed-off-by: Edoardo Vacchi <[email protected]>
Copy link
Member

@msfussell msfussell left a comment

Choose a reason for hiding this comment

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

@Taction @evacchi - Thanks for these reviews and great updates. LGTM

@hhunter-ms hhunter-ms merged commit 7718285 into dapr:v1.11 Aug 7, 2023
@evacchi evacchi deleted the wasm-http-fetch branch August 7, 2023 18:36
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.

4 participants