I have a long running temporal workflow, some instance of which can continue running indefinitely. I understand that workflows are deterministic, however is there a way to update my workflow logic without restarting it? I understand versioning is an option however for my indefinitely running workflows I do not know if that is a possibility.
Also following up the above topic, if I had a long running workflow W1 which called activity A1 and the activity returned an object O1 with 3 fields. If I added a 4th field to object when returning from the activity, would that classify my workflow as non-deterministic?
Lastly if my workflow continued-as-new would that be counted as a new version?
Sounds like you will have to address event history size and count limits for single execution in your case. Once an execution hits these limits it would get terminated by service.
You should be able to apply changes using versioning. Did you run into any issues with it? Temporal test env also provides WorkflowReplayer that you could use to test your versioned changes against event history of your running executions to catch any nondeterministic issues.
For activity question, no that wouldnt be a change you have to version.
Continueasnew completes current exec and atomically creates new one with same wfid. The continued exec is a new execution and it would run your workflow code from beginning. It does not increment versions as those directives are in your workflow code so you control it.