Skip to content

fix(framework): Make retry waits cancellable - #7915

Draft
tanertopal wants to merge 2 commits into
agent/shutdown-exit-foundationfrom
agent/shutdown-retry-cancellation
Draft

fix(framework): Make retry waits cancellable#7915
tanertopal wants to merge 2 commits into
agent/shutdown-exit-foundationfrom
agent/shutdown-retry-cancellation

Conversation

@tanertopal

@tanertopal tanertopal commented Aug 18, 2026

Copy link
Copy Markdown
Member

What changed

  • add an explicit RetryInvoker.disable_retries() API
  • allow retry implementations to interrupt an active wait
  • re-check retry limits after an interrupted wait
  • protect mutable retry state with reentrant synchronization

Why

Lowering max_tries does not wake an invocation that is already sleeping in backoff. Shutdown needs an explicit operation that prevents new retries and interrupts current waits.

Stack

Umbrella/reference: #7895 — Prevent task executor shutdown deadlock

Merge the stack in order. After the previous PR merges, retarget this PR to main.

Validation

  • pytest py/flwr/supercore/retry/retry_invoker_test.py
  • Ruff and Black on the changed retry modules
  • git diff --check

@github-actions github-actions Bot added the Maintainer Used to determine what PRs (mainly) come from Flower maintainers. label Aug 18, 2026
@tanertopal
tanertopal force-pushed the agent/shutdown-exit-foundation branch from f6e59e5 to 1aa34cf Compare August 18, 2026 16:11
@tanertopal
tanertopal force-pushed the agent/shutdown-retry-cancellation branch from 324924d to 4b67ca0 Compare August 18, 2026 16:11
@tanertopal
tanertopal force-pushed the agent/shutdown-exit-foundation branch from 1aa34cf to 959c61a Compare August 18, 2026 16:24
@tanertopal
tanertopal force-pushed the agent/shutdown-retry-cancellation branch from 4b67ca0 to 218f3ee Compare August 18, 2026 16:25
@tanertopal
tanertopal force-pushed the agent/shutdown-exit-foundation branch 2 times, most recently from 31b4f44 to 1f4725a Compare August 21, 2026 11:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Maintainer Used to determine what PRs (mainly) come from Flower maintainers.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant