Skip to content

Commit

Permalink
Updates from review
Browse files Browse the repository at this point in the history
Signed-off-by: itowlson <ivan.towlson@fermyon.com>
  • Loading branch information
itowlson committed Nov 6, 2024
1 parent 3d06a63 commit e11adec
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
5 changes: 4 additions & 1 deletion content/cloud/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,11 @@ Fermyon Cloud supports Spin CLI v0.6.0 or newer. That being said, there are cert
| [Serverless AI](/spin/serverless-ai-api-guide) | Supported |
| [Service Chaining](/spin/http-outbound#local-service-chaining) | Not supported |
| [MySQL](/spin/rdbms-storage#using-mysql-and-postgresql-from-applications) | Supported |
| [PostgreSQL](/spin/rdbms-storage#using-mysql-and-postgresql-from-applications) | Supported |
| [PostgreSQL](/spin/rdbms-storage#using-mysql-and-postgresql-from-applications) | Spin 2 interface is supported; Spin 3 interface is not |
| [Outbound Redis](/spin/rust-components.md#storing-data-in-redis-from-rust-components) | Supported |
| `wasi-cloud-core` | Not supported |
| **Features** |
| Component dependencies | Not supported |
| **Extensibility** |
| [Custom Triggers](/spin/extending-and-embedding) | Not supported |

Expand Down
2 changes: 2 additions & 0 deletions content/spin/v3/migration-v2-v3.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,5 @@ The following change will not affect most application authors, but may affect yo
* If an outbound HTTP request is denied, the `HTTP-request-denied` error previously occurred immediately on the
initial `wasi:http/outgoing-handler#handle` call. It now occurs when calling `get` on the `future-incoming-response`
returned from the `handle` call.

If you're affected by these or other changes and you're looking for help, please reach out on the [Fermyon Discord](https://discord.gg/AAFNfS7NGf) for support.
8 changes: 6 additions & 2 deletions content/spin/v3/writing-apps.md
Original file line number Diff line number Diff line change
Expand Up @@ -439,6 +439,8 @@ Few of us write applications without relying on libraries. Traditionally, those
To use composition through Spin, your component must import a [WIT (Wasm Interface Type) interface](https://component-model.bytecodealliance.org/design/wit.html), and the dependency must export the same WIT interface. The details of working with WIT interfaces is language-specific, and is beyond the scope of the Spin documentation. You can learn more from the [language guides in the Component Model book](https://component-model.bytecodealliance.org/language-support.html). This section focuses on describing the dependency composition support in Spin.

> Component dependencies are not currently supported on Fermyon Cloud.
### Declaring Component Dependencies

To declare a component dependency, create a `[component.(name).dependencies]` table in your Spin manifest, and list all the WIT interfaces you import (other than the ones that Spin itself satisfies), together with the packages that you would like to use to satisfy those imports.
Expand Down Expand Up @@ -510,14 +512,16 @@ and Spin will map all of your `security:http` imports to the matching exports fr

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:
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:

```toml
[component.my-app]
dependencies_inherit_configuration = true
```

> Spin does not currently support inheritance on a component-by-component basis. If the flag is set, _all_ the dependencies will act with the permissions of the main component.
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.

> Spin does not currently support inheritance on a dependency-by-dependency or feature-by-feature basis.
## Next Steps

Expand Down

0 comments on commit e11adec

Please sign in to comment.