Commit 8baa851
Trampolining: addition of fields to remove the infinite loops for pinned wfs (#721)
_**READ BEFORE MERGING:** All PRs require approval by both Server AND
SDK teams before merging! This is why the number of required approvals
is "2" and not "1"--two reviewers from the same team is NOT sufficient.
If your PR is not approved by someone in BOTH teams, it may be summarily
reverted._
<!-- Describe what has changed in this PR -->
-WISOTT
<!-- Tell your future self why have you made these changes -->
- Users that could using trampolining in the near future could run into
a problem, which shall only surface if the workflow author does not have
AutoUpgrade as the initial CAN behaviour for their Pinned workflows. As
of today, if a user does hit this case, they would have the pinned
workflow CAN'ing infinite number of times. This is because a pinned
workflow would commence on the pinned version (since it would have
inherited pinned version set to true) and if the pinned version is
different than a worker-deployment's current version, the
targetDeploymentVersionChanged would be set to true in the server. This
would then result in the workflow just CAN'ing all the time!
- This change aims to change that by only allowing at-most one CAN for
such pinned workflow executions, and it does so by remembering what the
initial version was at the start of the continue-as-new.
<!-- Are there any breaking changes on binary or code level? -->
**Breaking changes**
<!-- If this breaks the Server, please provide the Server PR to merge
right after this PR was merged. -->
- [PR!](temporalio/temporal#9374)
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>1 parent 57364bd commit 8baa851
3 files changed
Lines changed: 53 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12040 | 12040 | | |
12041 | 12041 | | |
12042 | 12042 | | |
| 12043 | + | |
| 12044 | + | |
| 12045 | + | |
| 12046 | + | |
| 12047 | + | |
| 12048 | + | |
| 12049 | + | |
| 12050 | + | |
| 12051 | + | |
12043 | 12052 | | |
12044 | 12053 | | |
12045 | 12054 | | |
| |||
17719 | 17728 | | |
17720 | 17729 | | |
17721 | 17730 | | |
| 17731 | + | |
| 17732 | + | |
| 17733 | + | |
| 17734 | + | |
17722 | 17735 | | |
17723 | 17736 | | |
17724 | 17737 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9226 | 9226 | | |
9227 | 9227 | | |
9228 | 9228 | | |
| 9229 | + | |
| 9230 | + | |
| 9231 | + | |
| 9232 | + | |
| 9233 | + | |
| 9234 | + | |
| 9235 | + | |
| 9236 | + | |
9229 | 9237 | | |
9230 | 9238 | | |
9231 | 9239 | | |
| |||
16528 | 16536 | | |
16529 | 16537 | | |
16530 | 16538 | | |
| 16539 | + | |
| 16540 | + | |
| 16541 | + | |
| 16542 | + | |
| 16543 | + | |
| 16544 | + | |
| 16545 | + | |
| 16546 | + | |
| 16547 | + | |
| 16548 | + | |
| 16549 | + | |
| 16550 | + | |
| 16551 | + | |
| 16552 | + | |
16531 | 16553 | | |
16532 | 16554 | | |
16533 | 16555 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
184 | 184 | | |
185 | 185 | | |
186 | 186 | | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
187 | 205 | | |
188 | 206 | | |
189 | 207 | | |
| |||
0 commit comments