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

V3 content #1392

Merged
merged 25 commits into from
Nov 8, 2024
Merged

V3 content #1392

merged 25 commits into from
Nov 8, 2024

Conversation

itowlson
Copy link
Contributor

@itowlson itowlson commented Oct 8, 2024

This branch tracks work on Spin 3 updates. Initially it's a clone of the Spin 2 docs but this is where we will add / remove / tweak for the v3 stuff.

Content must go through a pre-merge checklist.

Pre-Merge Content Checklist

This documentation has been checked to ensure that:

  • The title, template, and date are all set
  • Does this PR have a new menu item (anywhere in templates/*.hbs files) that points to a document .md that is set to publish in the future? If so please only publish the .md and .hbs changes in real-time (otherwise there will be a menu item pointing to a .md file that does not exist)
  • File does not use CRLF, but uses plain LF (hint: use cat -ve <filename> | grep $'\r' | wc -l and expect 0 as a result)
  • Has passed bart check
  • Has been manually tested by running in Spin/Bartholomew (hint: use PREVIEW_MODE=1 and run npm run styles to update styling)
  • Headings are using Title Case
  • Code blocks have the programming language set to properly highlight syntax and the proper copy directive
  • Have tested with npm run test and resolved all errors
  • Relates to an existing (potentially outdated) blog article? If so please add URL in blog to point to this content.

@itowlson itowlson mentioned this pull request Oct 8, 2024
9 tasks
Copy link

github-actions bot commented Oct 8, 2024

🚀 preview deployed successfully to Fermyon Cloud and available at https://fermyon-developer-pr-1392-xcy9wthx.fermyon.app

@itowlson
Copy link
Contributor Author

itowlson commented Oct 8, 2024

@karthik2804 I had to update some logic in page_lang.hbs and spin_main.hbs to tell it to use the v3 sidebar, but I couldn't figure out how to do the if ... else if ... else ... required to handle v3, v2 and v1. Can you advise please? (See 8dd50f8 for the crimes.)

@karthik2804
Copy link
Contributor

@itowlson I opened a PR for that.

@itowlson itowlson linked an issue Oct 9, 2024 that may be closed by this pull request
@itowlson itowlson marked this pull request as ready for review November 4, 2024 20:19
@itowlson itowlson requested a review from macolso November 4, 2024 20:19
@itowlson
Copy link
Contributor Author

itowlson commented Nov 4, 2024

Is there a way to know why preview deployment is failing? All the logs say is Internal Server Error.

@vdice
Copy link
Member

vdice commented Nov 4, 2024

Are we continuing the tradition of a cli reference? If so, do we want to add to this PR? Or a follow-up? There is a toolkit that should help with scaffolding it out: https://github.com/fermyon/developer/tree/main/toolkit

@itowlson
Copy link
Contributor Author

itowlson commented Nov 4, 2024

No, I want to try getting rid of the CLI reference in its current format because it's laborious to maintain and doesn't seem to add much value. I'd maybe like to add a page that lists the commands and links to the other docs pages that cover them, which will be more stable and I feel more useful. But I can land that in a later PR.

Copy link
Member

@vdice vdice left a comment

Choose a reason for hiding this comment

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

Mostly double-checking if there any applicable docs needing updates for 3.0. Tracking any/all in follow-ups works with me -- especially if we could use other folks to contribute.

content/spin/v1/ai-sentiment-analysis-api-tutorial.md Outdated Show resolved Hide resolved
content/spin/v3/deploying-to-fermyon.md Outdated Show resolved Hide resolved
content/spin/v3/extending-and-embedding.md Outdated Show resolved Hide resolved
content/spin/v3/kv-store-api-guide.md Outdated Show resolved Hide resolved
content/spin/v3/rdbms-storage.md Outdated Show resolved Hide resolved
Signed-off-by: itowlson <[email protected]>
@vdice vdice added the spin-3.0 Changes arriving in Spin 3.0 label Nov 4, 2024
Copy link
Member

@vdice vdice left a comment

Choose a reason for hiding this comment

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

LGTM pending actual v3 release :)

Copy link
Contributor

@macolso macolso 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 to me. I left a few small suggestions that shouldn't be considered blockers.

Will Fermyon Cloud support 3.0? Either way, I think it would be good to update Cloud documentation accordingly (e.g., adding component dependencies to the Spin Limitations section)

content/spin/v3/writing-apps.md Show resolved Hide resolved

By default, dependencies do not have access to Spin resources that require permission to be given in the manifest - network hosts, key-value stores, SQLite databases, variables, etc.

If you depend on a component which requires such access, and you trust all the components that you depend on, you can grant them access to the same resources that the 'main' component has by setting the `dependencies_inherit_configuration` flag on the main component:
Copy link
Contributor

Choose a reason for hiding this comment

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

What do we mean by 'main' component? What if I have a 3 component application and I add another component through dependencies. Does it matter which of the 3 original components I select as 'main'?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

'Main' was intended to refer to the component that the dependency is a dependency of. Like the 'main' one in the, uh, component (composition), not the 'main' one in the application. I'll try to rephrase but would welcome ideas!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Okay I think this gets clearer if I talk about the 'component manifest' rather than a 'main' or 'parent' component e.g.

If a component has a dependency which requires resource access, you can grant it by setting the dependencies_inherit_configuration flag in the Spin component manifest:
...
This grants all dependencies access to all resources listed in the Spin component manifest. You should therefore set this only if you trust all dependencies.

Copy link
Contributor

Choose a reason for hiding this comment

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

I like that approach!

date = "2023-11-04T00:00:01Z"
enable_shortcodes = true
[extra]
url = "https://github.com/fermyon/developer/blob/main/content/spin/v3/migration-v2-v3.md"
Copy link
Contributor

Choose a reason for hiding this comment

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

I like promoting the visibility of this by putting it under the "Getting Started" header 👍


---

Most applications will not require changes. The following changes may affect application authors:
Copy link
Contributor

Choose a reason for hiding this comment

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

Consider adding a link to 3.0 release notes when possible. I could see a reader landing here without being familiar with 3.0 and why they should consider upgrading

Suggested change
Most applications will not require changes. The following changes may affect application authors:
Most applications upgrading to [v3.0](to-do-link-release-notes) will not require changes. The following changes may affect application authors:

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Do we know the URL for the 3.0 release notes yet @vdice?

Copy link
Member

Choose a reason for hiding this comment

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

* Some modules produced by languages with older WASI support may no longer run. This specifically affects WAGI applications
compiled with a WASI-SDK version 18 or earlier. See [https://github.com/fermyon/spin/issues/2552](https://github.com/fermyon/spin/issues/2552) for details
of the issue and for possible workarounds.

Copy link
Contributor

Choose a reason for hiding this comment

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

Do we want to add a CTA if users are still experiencing issues after the recommended mitigation strategy? Perhaps something like, "If you are affected by one of these changes and are looking for assistance, please reach out on Discord for assistance"

| [Outbound Redis](/spin/rust-components.md#storing-data-in-redis-from-rust-components) | Supported |
| `wasi-cloud-core` | Not supported |
Copy link
Member

Choose a reason for hiding this comment

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

Should we add a link to wasi cloud core? https://github.com/WebAssembly/wasi-cloud-core

| [Outbound Redis](/spin/rust-components.md#storing-data-in-redis-from-rust-components) | Supported |
| `wasi-cloud-core` | Not supported |
| **Features** |
| Component dependencies | Not supported |
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
| Component dependencies | Not supported |
| [Component dependencies](https://github.com/fermyon/spin/blob/main/docs/content/sips/020-component-dependencies.md) | Not supported |

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Linking to the docs rather than the SIP but good call 👍


## Code of Conduct

First, any contribution and interaction on any Fermyon project MUST follow our
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
First, any contribution and interaction on any Fermyon project MUST follow our
First, any contribution and interaction on the Spin project MUST follow our

## Code of Conduct

First, any contribution and interaction on any Fermyon project MUST follow our
[code of conduct](https://www.fermyon.com/code-of-conduct). Thank you for being
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
[code of conduct](https://www.fermyon.com/code-of-conduct). Thank you for being
[code of conduct](https://github.com/fermyon/spin/blob/main/CODE_OF_CONDUCT.md). Thank you for being

Signed-off-by: itowlson <[email protected]>
@vdice vdice mentioned this pull request Nov 7, 2024
10 tasks
@vdice vdice merged commit 328ecae into main Nov 8, 2024
3 checks passed
@vdice vdice deleted the v3-content branch November 8, 2024 01:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
spin-3.0 Changes arriving in Spin 3.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Spin 3.0 Documentation Toggle
5 participants