-
Notifications
You must be signed in to change notification settings - Fork 35
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
Allow specifying top-level file
and format
for KVStore
#365
Conversation
Thank you for the contribution! We're actually in the midst of some discussions about how to redesign the way that Viceroy handles 'resources' needed by the service, so we'll have to hold off on reviewing this PR for a few weeks until we've reached some decisions there. The good news is that the idea you've presented here is directly in line with our goals :-) Please stay tuned, we'll get back to you soon. |
Gotcha - thanks for the feedback :) |
Overall this looks fine, but as you can probably see from the conflicts the term 'object store' shouldn't be used for this feature, it should be 'kv store' (in various forms) everywhere. If you get the PR updated I'll give it a formal review and work towards getting it merged. Thanks! |
2f2f5a2
to
5e7dbcb
Compare
This change allows keeping KVStore key/values in a separate file for easier sharing between environments, and allowing users to only gitignore the actual KVStore content without needing to ignore the whole fastly.toml file.0;9u
@kpfleming the test file is reasonably inconsistent (many tests still refer to object store). However I've fixed my changes on top of the latest I've rebased and squashed my changes into one commit. Let me know if you don't care about that (e.g. if you'll end up squashing when merging anyways) and I'll save the effort :) |
Another approach we can take is to point a KV Store to a folder and use the file-paths as the KV Store Keys and the file contents as the value -- This would allow for simpler setup for the scenario where applications are wanting to store their website static assets in a KV Store |
I have a branch which implements this at https://github.com/fastly/Viceroy/tree/jake/kv-store-folder but I stalled out on the work unfortunately |
Definitely also an option - I do wonder if keeping parity with the dictionary interface isn't a good thing though, considering |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few changes you can commit directly, and some others you can make in a followup commit. You can squash or not squash, whichever is easier for you.
We've got another PoC implementation around which does the same thing as a WASM component :-) For now I'm OK with merging the approach in this PR because it doesn't add a new 'style' of data population, it just replicates the existing style offered for config stores. We can talk about offering other styles in the larger topic of redesigning the package manifest/configuration file. |
Rename object_stores to kv_stores Co-authored-by: Kevin P. Fleming <[email protected]>
…ors, and renamed Object store to KVStore one place
@kpfleming I believe I've incorporated all of your feedback :) |
The tests all pass now, I'll add an entry for CHANGELOG.md and get this merged. |
It's very practical to be able to keep all your local configuration in separate files, if they are e.g. generated by automatic scripts. This extends the
fastly.toml
kv_store
configuration to accept either the current inline API or a newfile
andformat
table, that allows loading of an external JSON file.Part of #364