-
Notifications
You must be signed in to change notification settings - Fork 260
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
chore(examples): migrate to v2 manifest #1962
Conversation
7ab87fb
to
160387f
Compare
Signed-off-by: Vaughn Dice <vaughn.dice@fermyon.com>
160387f
to
ff8b738
Compare
Sorry, I had meant to get a |
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.
Only suggestion is very non-blocking and since your eyes must be bleeding by now I'm good with picking it up at some much later date!
[component.trigger] | ||
route = "/outbound" | ||
[component.build] | ||
|
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.
Non-blocking style suggestion: I would omit the blank line between the component data and the build section - especially when there are multiple components, the visual grouping helps keep the eye track them as a unit
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.
Oh thank you @itowlson -- I meant to ask about preferred style for the manifests. Indeed, I'd like to align these to represent our suggested formatting. I see the templates you've updated follow your suggestion above, so I'll do the same. Let me know if there are any other style suggestions -- might as well implement them in this PR.
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.
workdir = "outbound-http" | ||
command = "cargo build --target wasm32-wasi --release" | ||
|
||
[[component]] | ||
id = "outbound-http-to-same-app" | ||
[component.outbound-http-to-same-app] | ||
source = "outbound-http-to-same-app/target/wasm32-wasi/release/outbound_http_to_same_app.wasm" | ||
# To make outbound calls to components in the same Spin app, use the special value self. | ||
# This is not yet supported in cloud. |
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 comment might be out of date
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.
Indeed, I'm pretty sure it is. I'll create a separate PR to remove...
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.
> [the Wasm examples](https://github.com/tinygo-org/tinygo/tree/release/src/examples/wasm). | ||
|
||
Building this as a WebAssembly module can be done using the `tinygo` compiler: | ||
# Spin component in TinyGo |
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.
omg it's like I read this three files ago. "you are in a mazy of twisty HTTP samples, all alike"
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.
😂 good point... let me see about a more specific title.
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.
Signed-off-by: Vaughn Dice <vaughn.dice@fermyon.com>
Signed-off-by: Vaughn Dice <vaughn.dice@fermyon.com>
Signed-off-by: Vaughn Dice <vaughn.dice@fermyon.com>
Signed-off-by: Vaughn Dice <vaughn.dice@fermyon.com>
cf4e880
to
62ff297
Compare
Signed-off-by: Vaughn Dice <vaughn.dice@fermyon.com>
Ref #1947
I tried to keep all changes to just the
spin.toml
manifest file for each example, but cracked and had to include the following add'l changes as I tested/ran the examples:config-tinygo
tovariables-tinygo
in line with pre-existingvariables-rust
and our no longer using "config" in the manifest