Fix inaccurate docs (batch 2) - #234
Conversation
| `get_keys` **Operation** | ||
| - This returns a stream containing the keys, and a future containing a `Result`. You _must_ check the future when the stream ends, to determine if the stream ended normally, or was terminated prematurely due to an error. | ||
|
|
||
| `open` and `close` **Operations** |
There was a problem hiding this comment.
I removed this open and close **Operations**, even though open is still there, the note is entirely about close. So, I guess it's the right way to remove it. But let me know if open is still needed.
| To use a build profile, pass the `--profile <name>` flag to the Spin command you're running. For example, `spin build --profile debug` or `spin up --profile debug`. | ||
|
|
||
| > When you have build profiles in play, you run the risk of accidentally running `spin build` with a profile and then running `spin up` or `spin registry push` without a profile, not realising that you are running or pushing the default profile rather than the one you just built! Spin will warn you if you do this. But a safer technique is to provide `--build` as part of the `up` or `registry` push command, e.g. `spin up --profile debug --build`, `spin registry push --profile publish --build`. This guarantees that the right profile has been freshly built. You can set the `SPIN_ALWAYS_BUILD` environment variable to tell Spin to _always_ use the `--build` option. | ||
| > When you have build profiles in play, you run the risk of accidentally running `spin build` with a profile and then running `spin up` or `spin registry push` without a profile, not realising that you are running or pushing the default profile rather than the one you just built! Spin will warn you if you do this. But a safer technique is to provide `--build` as part of the `up` or `registry` push command, e.g. `spin up --profile debug --build`, `spin registry push --profile publish --build`. This guarantees that the right profile has been freshly built. You can set the `SPIN_ALWAYS_BUILD` environment variable to `true` to tell Spin to _always_ use the `--build` option. |
There was a problem hiding this comment.
I am wondering if, rather than patching up the docs, we can make clap accept any value of the env var. (My original intent was you should be able to set it to e.g. 1 or whatever.)
There was a problem hiding this comment.
That's really a good idea! Let me explore what option do we have.
|
The broken link is because some genius moved a URL and instead of putting a 301 redirect in place they put a 404 with JavaScript to change the location. Did we fight the REST wars for nothing ETA: er what I meant was we can ignore the link checker CI failure, I just got a bit distracted |
- build.md: state that SPIN_ALWAYS_BUILD must be set to `true` - kv-store-api-guide.md: remove the `error::invalid-store` and `close` operations, which no longer exist in the key-value interface, along with the notes explaining close's absence - language-support-overview.md: mark the Redis trigger (TypeScript) and MQTT (Go) as supported - troubleshooting-application-dev.md: update the spin doctor example to the current diagnosis and fix prompt Signed-off-by: Zhiwei Liang <zhiwei.liang@zliang.me>
Signed-off-by: Zhiwei Liang <zhiwei.liang@zliang.me>
0fcd8ea to
6f84198
Compare
| # do something with `batch` | ||
|
|
||
| result = await result.read() # check if the key stream hit an error | ||
| result = await future.read() # check if the key stream hit an error |
There was a problem hiding this comment.
On reflection I am wondering if we should change line 499 to name the result future result (because future isn't very informative). What do we do elsewhere?
There was a problem hiding this comment.
That's a good idea, let me change that
There was a problem hiding this comment.
How about future_result, to distinguish the awaitable future result from the received result?
There was a problem hiding this comment.
future_result feels a bit verbose to me - but I guess for expository code that's okay.
There was a problem hiding this comment.
Thanks! I just changed it. Does it look good now?
Signed-off-by: Zhiwei Liang <zhiwei.liang@zliang.me>
256a57e to
11dbb64
Compare
build.md: state thatSPIN_ALWAYS_BUILDmust be set totrue, not other values like1oryeskv-store-api-guide.md:error::invalid-store(spin change)closeoperations along with the notes explaining close's absence (spin change)language-support-overview.md: mark the Redis trigger (TypeScript) and MQTT (Go) as supportedtroubleshooting-application-dev.md: update the spin doctor example to the current diagnosis and fix prompt from the latest Spin CLIpython-components.md: fix variable name in Python components documentation