Conversation
...cs/content/en/developing-applications/building-blocks/workflow/workflow-features-concepts.md
Outdated
Show resolved
Hide resolved
...cs/content/en/developing-applications/building-blocks/workflow/workflow-features-concepts.md
Outdated
Show resolved
Hide resolved
|
|
||
| ### Patching | ||
|
|
||
| This is a narrower way of versioning workflows, as it allows introducing non-deterministic changes to the workflow code without duplicating the whole workflow code. |
There was a problem hiding this comment.
Why is the change non deterministic?
There was a problem hiding this comment.
Rephrased. I meant that the changes would be non-deterministic if we didn't have this versioning scheme.
...cs/content/en/developing-applications/building-blocks/workflow/workflow-features-concepts.md
Outdated
Show resolved
Hide resolved
Signed-off-by: Albert Callarisa <albert@diagrid.io>
Signed-off-by: Albert Callarisa <albert@diagrid.io>
Signed-off-by: Albert Callarisa <albert@diagrid.io>
9f73980 to
c07c0bf
Compare
WhitWaldo
left a comment
There was a problem hiding this comment.
I've got a few comments (mostly suggestion for rephrasing) as well
|
|
||
| ## Versioning | ||
|
|
||
| Workflows can run for very long periods of time, and during that time we want to still be able to introduce changes to the workflow code. When the changes are non-deterministic, we need to use a versioning scheme to version the workflow code so existing workflows can continue running in the old version of the code while new workflows run in the new version of the code. |
There was a problem hiding this comment.
While workflows can certainly run for a long period of time, I'd suggest highlighting this as one of several scenarios instead of articulating it as the only one. Also likely is that workflows are running and mid-flight when an application upgrade is deployed, requiring versioning.
There was a problem hiding this comment.
Rephrased, what do you think now?
...cs/content/en/developing-applications/building-blocks/workflow/workflow-features-concepts.md
Outdated
Show resolved
Hide resolved
...cs/content/en/developing-applications/building-blocks/workflow/workflow-features-concepts.md
Outdated
Show resolved
Hide resolved
...cs/content/en/developing-applications/building-blocks/workflow/workflow-features-concepts.md
Outdated
Show resolved
Hide resolved
...cs/content/en/developing-applications/building-blocks/workflow/workflow-features-concepts.md
Outdated
Show resolved
Hide resolved
...cs/content/en/developing-applications/building-blocks/workflow/workflow-features-concepts.md
Outdated
Show resolved
Hide resolved
...cs/content/en/developing-applications/building-blocks/workflow/workflow-features-concepts.md
Outdated
Show resolved
Hide resolved
...cs/content/en/developing-applications/building-blocks/workflow/workflow-features-concepts.md
Outdated
Show resolved
Hide resolved
|
|
||
| There are multiple reasons for workflows to get stalled when using this versioning scheme: | ||
| - Removing (or renaming) a patch check. | ||
| - Changing the order of patch checks. It's required to keep the same order of checks throughout the workflow code. |
There was a problem hiding this comment.
Duplicate patch checks should stall too as it suggests that the check may have moved between replays as well.
There was a problem hiding this comment.
It's possible to check the same patch multiple times, as long as the final list of evaluated patches remains consistent across reruns. So, for example, the list can potentially be "patch1", "patch2", "patch2", "patch3"
There was a problem hiding this comment.
Sure, but also the order of the patches, right? This is what I was asking about whether the patches need to be reported as standalone events instead of metadata on the event is that the standalone events would allow us to infer the order in which patches are applied between other events. By just building a list of all the patches observed from the event source, shouldn't we infer that a patch is called out of order (even if just duplicated) if we see a list of "patch1", "patch2", "patch3" and then an ask comes in for "patch1" even though it's already been evaluated and in the event history?
...cs/content/en/developing-applications/building-blocks/workflow/workflow-features-concepts.md
Outdated
Show resolved
Hide resolved
Signed-off-by: Albert Callarisa <albert@diagrid.io>
Signed-off-by: Albert Callarisa <albert@diagrid.io>
...cs/content/en/developing-applications/building-blocks/workflow/workflow-features-concepts.md
Outdated
Show resolved
Hide resolved
...cs/content/en/developing-applications/building-blocks/workflow/workflow-features-concepts.md
Outdated
Show resolved
Hide resolved
...cs/content/en/developing-applications/building-blocks/workflow/workflow-features-concepts.md
Show resolved
Hide resolved
Signed-off-by: Albert Callarisa <albert@diagrid.io>
Signed-off-by: Albert Callarisa <albert@diagrid.io>
Signed-off-by: Albert Callarisa <albert@diagrid.io>
At the moment I just added the Go code, as it's the only SDK that supports it. We'll need to add more code examples as we add support.