Replies: 1 comment
-
|
Totally feel you. Ran into this myself when managing multiple projects in Prefect. It can be a bit of a headache when the system feels fragmented. The distinction between blocks and variables can indeed seem like an unnecessary complication at times. Variables are great for lightweight configs, but if you're dealing with something that needs validation or encryption, blocks are worth the overhead. But yeah, consolidating everything as blocks just for the sake of simplicity in management makes sense, especially when dealing with complex projects. Regarding the inability to tag blocks, it’s a limitation that’s been a pain point for many. Prefect's UI has room for improvement here. This is where naming conventions and consistent documentation can really help, even if they're a bit of a chore. For now, one workaround could be to implement a naming scheme that inherently includes your "tags". For example, prefixing or suffixing your block and variable names with a project identifier. Something like: # block name example: "projectA-config-block"
# variable name example: "projectA_config_variable"As for the naming conventions (dashes vs underscores), it’s just one of those quirks. It helps to establish a mental model or a cheat sheet for your team to avoid mix-ups. For the future, you might want to explore using Prefect's GraphQL API to build a custom dashboard that can fetch and display all the resources associated with a project. It's a bit of work upfront, but could save time in the long run. Here's a tiny snippet to get you started with querying blocks: {
block(where: {name: {_ilike: "projectA%"}}) {
id
name
type
}
}Keep pushing for improvements on this front. Prefect's community is pretty responsive to feedback, and they can provide updates or workarounds too. If you're looking for a more integrated solution, consider opening a feature request on the Prefect GitHub to advocate for tagging capabilities or integrated views. It’s something that others would likely benefit from too. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
This is a thread I was having with @zzstoatzz on slack and he suggested creating a discussion.
I had asked why wouldn't I just convert all my "variables" to "blocks" so that they'd be easier to find.
Nate explained the overhead is a bit higher with blocks and recommended:
But, for me the overhead might be worth it just from a system management point of view. My reason for wanting to get rid of all my variables and just make blocks was really a small part of the "system config scatter" - one less kind of thing to worry about keeping track of.
Nate's search for prior discussions: https://gist.github.com/zzstoatzz/dde156aaed51b28dcdd20fea1e418cc1
Beta Was this translation helpful? Give feedback.
All reactions