https://prefect.io logo
#prefect-community
Title
# prefect-community
t

Tom Manterfield

04/22/2022, 8:36 PM
I’m bumping into all sorts of issues with Deployments on 2.0, just wanted to check if these are known problems or something awry with my config?
1. If I create a deployment, it seems to refer to the local path of the flow (docs indicate the default is to upload the flow so it’s portable) 2. If I try to update the deployment by running
prefect deployment create my_deployment_spec.py
I get
prefect.exceptions.ObjectAlreadyExists
3. If I try to configure the deployment spec in yaml, on create I get
AttributeError: 'set' object has no attribute 'items'
4. There doesn’t seem to be any way to delete deployments to try again and updating is erroring as above… so I’m just sort of stuck with them.
z

Zanie

04/22/2022, 8:42 PM
1. The default is no longer to upload the flow unless you’ve configured storage. 2. This is a known issue with setting storage on the
DeploymentSpec
itself rather than configuring a default storage type 3. This is a known issue and will be resolved in the next release. 4. The deployment should be deletable via API call but is not expose on the Python client yet https://orion-docs.prefect.io/api-ref/rest-api/#/Deployments/delete_deployment_deployments__id__delete
Sorry this is a little rough around the edges still, there are significant changes being made to the “storage” of flows for deployments and it’s introduced some friction into the UX.
t

Tom Manterfield

04/22/2022, 8:45 PM
No problem! I’m mostly evaluating and trying to convince myself I can jump straight to Orion. I appreciate how responsive you all are.
Only other big outstanding question I had was around configuring storage. It seems like storage is presented in the API as ‘blocks’ that have some special inner params. Is that right? If so is there an example of them anywhere?
If I can figure that part out then I think I can contribute a Kubernetes operator that will do all the prod-level deployment automation
Storage is a real tricky bit because the CLI for it is interactive, so can’t even fall back to that without it being really ropey
z

Zanie

04/22/2022, 8:50 PM
Blocks are the part that is undergoing significant changes 😬
t

Tom Manterfield

04/22/2022, 8:50 PM
Oh good, I did NOT enjoy following that model through the code 😄
z

Zanie

04/22/2022, 8:51 PM
Yeah we did not either 🙂 that’s the tricky part about trying to push changes out while we’re still iterating on a design
I’m trying to think of a good way for you to workaround it in the meantime…
You don’t technically have to interact with blocks at all to use a deployment right now, it’s just the interface we’re exposing
t

Tom Manterfield

04/22/2022, 8:53 PM
It’s just for the creation of the storage, everything else is actually okay ish
I can’t see any place in the client, APIs etc to create that storage config in a straightforward way and couldn’t figure out the actual spec used for one when they’re added to the server
Never mind! Just found the spec by looking at the DB table
block_spec
z

Zanie

04/22/2022, 9:09 PM
This might fix the most annoying issue https://github.com/PrefectHQ/prefect/pull/5710
We’re finalizing the design changes right now so things will probably be quite different in the coming weeks
t

Tom Manterfield

04/22/2022, 9:12 PM
Okay great, thank you for the info. Worth noting my deploymentspec didn’t actually specify a storage block, so this issue seems to happen regardless (I don’t need help on this as I’m going to work around it, but just FYI)
z

Zanie

04/22/2022, 9:13 PM
Oh that’s weird
t

Tom Manterfield

04/22/2022, 9:13 PM
Just tested something, looks like the issue occurs if you don’t have storage specified on the deployment spec and don’t have default storage configured on the server
z

Zanie

04/22/2022, 9:14 PM
Ah we generate one as though it was on the deployment spec then
t

Tom Manterfield

04/22/2022, 9:14 PM
Ahh right
This has been super helpful, thank you. I think I might be able to work around everything now. I’ll see what I can put together and hopefully share with everyone.