zanieb / prefect-kv

A simple key/value store built on Prefect
https://madkinsz.github.io/prefect-kv/
Apache License 2.0
22 stars 0 forks source link

Support anonymous blocks #3

Open thomafred opened 1 year ago

thomafred commented 1 year ago

Multiple KV-stores will kind of clutter up the "blocks"-view in the UI. Would it be possible to make the JSON-blocks within the KVStore-objects anonymous?

zanieb commented 1 year ago

Hm. Fair point, but then we wouldn't be able to look it up by the store name? How would a user specify a store?

thomafred commented 1 year ago

Maybe make this an optional config for the KVStore-object? In most cases I agree that it would be to be able to browse the objects, but in some cases there may be a fixed naming convention.

One such use-case is where the KVStore-name is set based on the flow/task name.

zanieb commented 1 year ago

I care less about browsing the objects and more about the ability to create another KVStore instance that refers to the same backing data.

If we use anonymous blocks, we cannot set a name. So if we used the flow/task name the store could not be anonymous. Anonymous blocks are intended to be used by creating then storing the UUID of the block somewhere for future recall. Perhaps what we're looking for is just a "hidden" field for UI purposes cc @desertaxle