We have a couple of long-running workflows, which currently use workflow.GetVersion for backwards compatibility. The workflows usually sit in a loop handling signals. It would be very nice if it was possible to upgrade the signal handler code safely so that new signals run with the latest version while history is processed with the version used at that point in time.
Right now, workflow.GetVersion will always return the same value, so it gets locked into a specific behavior. It would be great if there was an alternative GetVersion, which would switch to the latest version once the history has been replayed, or some similar solution.
Moving this issue to features because this applies to more then just the Go SDK. All SDKs should have similar features to make versioning signal handler easier.
We have a couple of long-running workflows, which currently use
workflow.GetVersion
for backwards compatibility. The workflows usually sit in a loop handling signals. It would be very nice if it was possible to upgrade the signal handler code safely so that new signals run with the latest version while history is processed with the version used at that point in time.Right now,
workflow.GetVersion
will always return the same value, so it gets locked into a specific behavior. It would be great if there was an alternativeGetVersion
, which would switch to the latest version once the history has been replayed, or some similar solution.For reference here's the conversation from Slack: https://temporalio.slack.com/archives/CTRCR8RBP/p1721843534985449