https://prefect.io logo
#prefect-server
Title
# prefect-server
m

Milton

03/25/2021, 3:24 PM
Congrats on the release of 0.14.13! I am just wondering if we could use prefect build to validate the flows/tasks in our code before registering them? Or are you planing to do something like prefect validate?
z

Zanie

03/25/2021, 3:28 PM
What do you mean by validate? 🙂
🙂 1
j

Jim Crist-Harif

03/25/2021, 3:28 PM
Depends on what you mean by validate? Importing a flow should check that it's syntactically valid (but can't check that it won't have runtime errors). Other errors you might encounter during registration usually have to do with infrastructure used to host the flow (e.g. does the docker image build, can you push the source to s3, etc...). These are generally hard to check uniformly without actually doing these operations (which is why we don't support a
--dry-run
flag). So you could use
prefect build
to build your flows, and if they build properly they'll almost certainly register properly (unless there's a bug in prefect). But (depending on your flow configuration)
prefect build
may still have side effects you wouldn't want for validation alone (push a container to a registry, upload to s3, etc...).
m

Milton

03/25/2021, 3:56 PM
I assume importing a flow is part of the prefect build process right? I wonder what else it does in terms of validation. (Sorry for being lazy and not reading the code)
z

Zanie

03/25/2021, 4:06 PM
Yep, it imports it and builds the storage object which would interact with your storage backend (ie upload the serialized flow). We don't really have any other mechanism for validation.
m

Milton

03/25/2021, 4:54 PM
Got it! Thanks both you for the help!
2 Views