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

Support wasi-config #2868

Open
kate-goldenring opened this issue Sep 27, 2024 · 3 comments · May be fixed by #2869
Open

Support wasi-config #2868

kate-goldenring opened this issue Sep 27, 2024 · 3 comments · May be fixed by #2869

Comments

@kate-goldenring
Copy link
Contributor

kate-goldenring commented Sep 27, 2024

WASI is moving wasi-config to phase 3 soon. We should consider moving from the spin variables interface to WASI config.

The main diff is the need to add support for get-all

Spin 3.0 may be a good opportunity to make this switch

@itowlson itowlson linked a pull request Sep 27, 2024 that will close this issue
@kate-goldenring
Copy link
Contributor Author

I did a quick check on implementation feasibility of get-all for our current providers:

@lann
Copy link
Collaborator

lann commented Sep 27, 2024

get-all isn't a huge problem for Spin because all variables must be declared in the manifest, so its really just a get-many, which can itself be implemented in terms of plain get if needed.

@kate-goldenring
Copy link
Contributor Author

@lann your point makes me think that the WASI config interface may want to rename that function. It defines get-all as getting the set of KV pairs:

    /// Gets a list of configuration key-value pairs of type `string`.
    /// 
    /// If an error occurs, an `Err(error)` is returned.
    get-all: func() -> result<list<tuple<string, string>>, error>;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 🏗 In progress
Development

Successfully merging a pull request may close this issue.

2 participants