We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Version
Fastly CLI version v10.14.1 (b392688) Built with go version go1.22.7 linux/amd64 (2024-09-17) Viceroy version: viceroy 0.12.1
What happened
Viceroy recently added support for loading KV store data from a file in fastly/Viceroy#365, and equivalent secret store support in fastly/Viceroy#428.
Previously in TOML you could specify entries like:
[local_server] kv_stores.store_name = [{ key = "a_key", data = "hello world" }]
ie, an array. But now you can also define it as an object like so:
[local_server] kv_stores.store_name = {file = "entries.json", format = "json"}
ie, an object. Secret store's syntax will be the same.
The CLI doesn't like this and throws an error:
✗ Verifying fastly.toml ERROR: (0, 0): Can't convert file = "entries.json" format = "json" (*toml.Tree) to a tree.
This is probably because the struct definition for local_server tries to deserialize into a map[string][]LocalKVStore here: https://github.com/fastly/cli/blob/b3926881fe8d74598c72978a65ffa5d6c90a82b4/pkg/manifest/local_server.go. This probably needs to be changed to accept either a struct or a slice.
local_server
map[string][]LocalKVStore
The workaround is to move these KV/secret store definitions to a separate toml file and run viceroy with them directly.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Version
Fastly CLI version v10.14.1 (b392688)
Built with go version go1.22.7 linux/amd64 (2024-09-17)
Viceroy version: viceroy 0.12.1
What happened
Viceroy recently added support for loading KV store data from a file in fastly/Viceroy#365, and equivalent secret store support in fastly/Viceroy#428.
Previously in TOML you could specify entries like:
ie, an array. But now you can also define it as an object like so:
ie, an object. Secret store's syntax will be the same.
The CLI doesn't like this and throws an error:
This is probably because the struct definition for
local_server
tries to deserialize into amap[string][]LocalKVStore
here: https://github.com/fastly/cli/blob/b3926881fe8d74598c72978a65ffa5d6c90a82b4/pkg/manifest/local_server.go. This probably needs to be changed to accept either a struct or a slice.The workaround is to move these KV/secret store definitions to a separate toml file and run viceroy with them directly.
The text was updated successfully, but these errors were encountered: