Commit 026200f
authored
Breaking change to current_retry_interval (#11203)
## What changed?
- current_retry_interval=nil after dispatch to Matching. Previously we were returning the
predicted next retry interval
- current_retry_interval and next_attempt_schedule_time both nil when paused
Consider an activity that's in retry backoff before attempt 2. This
retry interval is 5s and the next one, if there is another, will be 10s.
`current_retry_interval`:
```
SCHEDULED (dispatched to matching) STARTED (attempt completed/failed)
before 5s 10s nil
after 5s nil nil
```
`next_attempt_schedule_time` for comparison:
```
SCHEDULED (dispatched to matching at t) STARTED (attempt completed/failed)
t nil nil
```
## Why?
I think that the current behavior is a bug.
## How did you test it?
- [x] added new unit test(s)
## Potential risks
Breaking change: someone could be relying on the old behavior
<!-- CURSOR_SUMMARY -->
---
> [!NOTE]
> **Medium Risk**
> Intentional breaking change to
DescribeWorkflowExecution/DescribeActivityExecution metadata; clients
that relied on post-dispatch predicted retry intervals will see
different values.
>
> **Overview**
> **Breaking change:** `current_retry_interval` on pending activities is
no longer a predicted *next* backoff after the retry has been dispatched
to Matching. It is set only while the server is still waiting to
dispatch the retry (`ScheduledTime` in the future and not paused), as
the elapsed time from last attempt completion to that schedule
time—aligned with when `next_attempt_schedule_time` is set.
>
> Once the backoff elapses and the task is in Matching (or the activity
is **paused**), both `current_retry_interval` and
`next_attempt_schedule_time` are **nil**, including for paused
activities that would still be “backing off” internally.
>
> Coverage moves to a focused unit test on `GetPendingActivityInfo`, a
workflow-vs-standalone parity suite (`TestParityCurrentRetryInterval`),
removal of the older standalone-only test, and XDC pause/failover
expectations updated to expect nil `CurrentRetryInterval`.
>
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
5676d92. Bugbot is set up for automated
code reviews on this repo. Configure
[here](https://www.cursor.com/dashboard/bugbot).</sup>
<!-- /CURSOR_SUMMARY -->1 parent b2fab54 commit 026200f
5 files changed
Lines changed: 491 additions & 212 deletions
File tree
- service/history/workflow
- tests
- xdc
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
120 | 120 | | |
121 | 121 | | |
122 | 122 | | |
123 | | - | |
124 | | - | |
| 123 | + | |
| 124 | + | |
125 | 125 | | |
126 | 126 | | |
127 | 127 | | |
128 | 128 | | |
129 | | - | |
| 129 | + | |
130 | 130 | | |
131 | | - | |
132 | | - | |
133 | | - | |
| 131 | + | |
134 | 132 | | |
135 | 133 | | |
136 | 134 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
294 | 294 | | |
295 | 295 | | |
296 | 296 | | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
297 | 327 | | |
298 | 328 | | |
299 | 329 | | |
| |||
0 commit comments