https://prefect.io logo
r

Rajvir Jhawar

08/01/2022, 9:00 AM
I have a few issues with the block UI page, It's was wondering if they been discussed at all yet: For example the build command has the flag "-sb" and "-ib", however in the ui (block page) there are no tags that indicate which block is used for storage/infra. It gets even more confusing in the case of the Kubernetes Job block. The k8 job tag is called "run-infrastructure" this is a technically incorrect specifier/definition as it is not the piece that runs the flow. The "-ib" flag takes in an argument in the form of "type/name": So i would have to type in "Kubernetes Job/<name>" --> Is the space unnecessary for the command? Why the space? Another issue is that when you click "copy name" it only copies the name and not the type. I would assume most people would want an option to copy the entire string so they can use it with the deployment build command.
āœ… 1
m

Mathijs Carlu

08/01/2022, 9:22 AM
ā€¢ Storage blocks are tagged with
read-path
and
write-path
, although I agree that tagging them with
storage
would be better ā€¢ All blocks tagged
run-infrastructure
can be passed as
--infra
or
-ib
ā€¢ If you're passing
-ib
, you should convert all characters in type to lowercase and change spaces to dashes, e.g.
Kubernetes Job
becomes
kubernetes-job
. This should indeed be documented
a

Anna Geller

08/01/2022, 10:46 AM
1. those tags there are methods on the block e.g. .run_infrastructure() or .read_path() 2. -ib would be kubernetes-job/name 3. re "copy name", I'd say it's more some inconvenience to also type the block type - interesting you found it too much to type? tradeoffs... 4. re all the other points, we'll make the CLI more explicit for file system blocks to be more explicit about allowed types, for infra locks there is already documentation about allowed types when you type
prefect deployment build --help
@Mathijs Carlu would this help? not sure yet if this will get accepted but would having the allowed file system blocks shown in the CLI help? https://github.com/PrefectHQ/prefect/pull/6141/files#diff-3b55e0d0b879ff61afc1994ba0ec0580f8a5f0eb4eb368b6c31000b16ff7cb86
m

Mathijs Carlu

08/01/2022, 11:14 AM
Yes, imo it would!
šŸ™Œ 1
r

Rajvir Jhawar

08/01/2022, 1:54 PM
@Anna Geller @Mathijs Carlu As always thank you for the speedy and the in-depth responses @Anna Geller in regards to your change: Wouldn't it better to have a more general help message? For instance if you keep adding new storage types this help message is going to get outdated:
help="The slug of the storage block. Use the syntax: 'block_type/block_name', where block_type must be one of 'local-file-system', 'remote-file-system', 's3', 'gcs', 'azure'",
Would it not be preferable to have something like this:
help="The slug of the storage block. Use the syntax: 'block_type/block_name', where block_type must have a tag of "storage-block" in the block's UI, ex: ...
A followup to my point about the "Copy Name" feature: If there was a "Copy Block Name" option it would have aided me learning how to format the string for the deployment build command. If I had clicked the "Copy Block Name" button I would have been able to see that the string should be formatted as:
kubernetes-job/<name>
(This point May not be super relevant it is just something I feel is a little inconsistent in terms of the UI) One last point here is that the formatting is different for different types of blocks: For instance a google storage block displays:
gcs/<name>
--> this is a direct mapping In the case of remote/local file system and k8 jobs this is not the case:
Kubernetes Job/<name>
--> this is not a direct mapping Would it not be preferable to display this instead:
kubnernetes-job/<name>
šŸ™ 1
a

Anna Geller

08/01/2022, 2:08 PM
this is not a final version and not approved yet, but I appreciate your thoughtful response - I'll check with the team and update the PR based on yours and their feedback
šŸ™Œ 1
gratitude thank you 2
just FYI: this was approved for now, but we'll add more improvements to the deployments in the next release, some are really cool!
šŸ™Œ 1
r

Rajvir Jhawar

08/02/2022, 12:00 PM
Sweeeeet looking forward to trying out those new improvements. Does prefect have cutting edge/dev build available? Kinda like an insiders edition? I assume this might be the case for club 42 members.
a

Anna Geller

08/02/2022, 12:35 PM
Club42 members get some insider info e.g. as this was the case with Cloud beta version, but we started to ship new releases multiple times per week so there's no longer need for that, but good question
5 Views