Looking for clarification on this part of the documentation:
Specifically, when can we deploy workflow.deprecate_patch("my-patch").
Looks like there is 4 states:
Initial (pre-patch)
Patched
Deprecated
Removed Patched / Final
When going from Patched → Deprecated, the docs says:
After ensuring that all Workflows started with pre_patch_activity code have left retention, you can deprecate the patch.
It says “retention”, does it mean that we cannot deploy a deprecated_patch’d code until ALL pre-patch workflows (even completed ones) is removed from Temporal History? Or could we safely deploy a deprecated_patch’d as soon as all workflows are running the Patched code (regardless if there are any pre-patched workflows that are completed in Temporal History)?
Also, the same question apply for Deprecated → Removed Patched. It also uses the word
”retention”.
i think for both cases you mention, if for your use case you do not need to query (workflow query) closed executions, you can deploy when there are no running workflows. otherwise until they are removed (closed workflows removed when they hit namespace retention period)
This will be an issue for manual workflow queries - so queries coming from the UI/Frontend service of temporal is not going to be an issue - is that right?
If you mean querying an execution from ui, yeah thats also a workflow query and if you query completed, query would cause event history replay that can lead to NDE and failure to deliver query response.