Heyo! The new (v0.14) "passing `flow.serialized_ha...
# prefect-community
a
Heyo! The new (v0.14) "passing
flow.serialized_hash
to
flow.register
as the `idempotency_key`" way of registering flows is very useful for CI pipelines, however it's not really viable if you have to spend a lot of time building
Docker
flow storage object before calling
flow.register()
. Can anyone please share a quick way of getting idempotency key for a specific flow name through GraphQL, if there is one? I am thinking of looping through all the available flows, and using the serialized hash to automatically filter out changed flows. Right now we are using a clunky
gitpython
solution that basically does
git diff
on flow source files between tagged releases on a Github repo. Thank you.
z
Hi! This makes sense. Per https://github.com/PrefectHQ/server/pull/116/files we store the idempotency key in the flow ‘settings’ blob so you should be able to query it without much trouble.
That said, the serialized hash cannot track changes to your code just flow metadata so it isn’t guaranteed to have changed if some code your flow depends on has changed.
a
Thank you! Ah yes I have found the sources for
serialized_hash()
and they mention that task code is not included in the serialized flow... Makes sense, the server does not need to know about that. So if the flow structure keeps exactly the same but there's a small tweak in a task, the change would not be detected -- this unfortunately does not play well with our CI process so I'll keep the git-based solution for now. Thanks again!