Hi all, I'm trying out Prefect Orion (v2.0b3) and ...
# prefect-community
m
Hi all, I'm trying out Prefect Orion (v2.0b3) and was following the orion tutorials. I am having issues updating an existing deployment, which the docs mentioned can be done by
prefect deployment create
. Getting a
prefect.exceptions.ObjectAlreadyExists
error. Is this expected?
k
I’ve only seen this happen when you do something like create a deployment to an Orion instance inside a container. Is that what you are doing?
And I couldn’t even properly replicate it. Could you tell me more about your setup?
m
I'm testing prefect in a conda env in virtualbox guest ubuntu 20.04 on a windows host machine. Basically created a deployment following this https://orion-docs.prefect.io/tutorials/deployments/, then changed the deployment spec parameters and rerun
prefect deployment create
, which failed
k
Did you configure a storage?
m
Nope
The only prefect config I changed was setting
PREFECT_ORION_API_HOST='0.0.0.0'
to allow my host to access the prefect UI on the browser, not sure if that affects this
k
Could you try resetting the database and seeing if that works?
You could also just try the Cloud 2.0 directly. It might be easier to use.
m
Still had the same issue after resetting, fails the second time I run
prefect deployment create
Tried Cloud 2.0, same issue. Oh well. Attaching a screenshot here of the error tracebacks for reference (same error for both ephemeral and cloud)
k
Ok I don’t think there are any engineers I can ping right now but I’ll ask them tom
a
I am just going to bump that I have dug into the source code and have a feeling it's not handled with the intended logic in mind. I had the same problem and could exactly where it was happening with no error handling / try except despite the behavior clearly being that it should update the existing object on conflict.
🙌 1
For the team, here is the exact line of code / location where the logic as its described is not coded to do what it says. https://github.com/PrefectHQ/prefect/blob/66815a2a52783d0cd6fde7575859a886b1a10116/src/prefect/client.py#L856 Here is the API piece thats invoked so you can close the loop and see there is no handling to update the block as expected/desired. https://github.com/PrefectHQ/prefect/blob/orion/src/prefect/orion/api/blocks.py#L29 Hope this helps make it ez, I did the digging already 🙂
k
Will forward @Alexander Butler! Thank you for investigating