Skip to content

Fix inaccurate docs (batch 2) - #234

Merged
itowlson merged 3 commits into
spinframework:mainfrom
ChihweiLHBird:zhiwei/doc-improve-2
Aug 4, 2026
Merged

Fix inaccurate docs (batch 2) #234
itowlson merged 3 commits into
spinframework:mainfrom
ChihweiLHBird:zhiwei/doc-improve-2

Conversation

@ChihweiLHBird

@ChihweiLHBird ChihweiLHBird commented Jul 30, 2026

Copy link
Copy Markdown
Contributor
  • build.md: state that SPIN_ALWAYS_BUILD must be set to true, not other values like 1 or yes
  • kv-store-api-guide.md:
    • Remove the error::invalid-store (spin change)
    • Remove close operations along with the notes explaining close's absence (spin change)
  • 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 from the latest Spin CLI
  • python-components.md: fix variable name in Python components documentation

@ChihweiLHBird
ChihweiLHBird marked this pull request as draft July 30, 2026 06:13
@ChihweiLHBird
ChihweiLHBird marked this pull request as ready for review July 30, 2026 06:21
`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**

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

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.

@itowlson itowlson left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks for all these!

Comment thread content/v4/build.md
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.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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.)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

That's really a good idea! Let me explore what option do we have.

@itowlson

itowlson commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

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>
Comment thread content/v4/python-components.md Outdated
# 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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

That's a good idea, let me change that

@ChihweiLHBird ChihweiLHBird Aug 3, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

How about future_result, to distinguish the awaitable future result from the received result?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

future_result feels a bit verbose to me - but I guess for expository code that's okay.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Thanks! I just changed it. Does it look good now?

Signed-off-by: Zhiwei Liang <zhiwei.liang@zliang.me>
@itowlson
itowlson merged commit 803dee0 into spinframework:main Aug 4, 2026
3 checks passed
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.

2 participants