Skip to content

Extract flow-run state proposal orchestration - #22948

Open
desertaxle wants to merge 2 commits into
mainfrom
flow-run-state-proposals/foundation
Open

Extract flow-run state proposal orchestration#22948
desertaxle wants to merge 2 commits into
mainfrom
flow-run-state-proposals/foundation

Conversation

@desertaxle

@desertaxle desertaxle commented Aug 26, 2026

Copy link
Copy Markdown
Member

Related to #21932

This PR moves flow-run state proposal retries and response interpretation into dedicated sync and async proposer classes. Existing propose_state entry points remain compatibility facades, so callers retain current behavior while follow-up PRs migrate to the narrower request interface.

Details
  • Binds one state-request operation instead of requiring a complete Prefect client.
  • Keeps WAIT retries and server-authoritative ACCEPT, REJECT, paused-rejection, and ABORT handling behind the proposer interface.
  • Shares response interpretation across sync and async implementations.
  • Adds one contract suite covering both implementations with in-memory request adapters.

Follow-up #22946 uses this interface to order heartbeat admission with each state request.

Checklist

  • This pull request references any related issue by including "closes <link to issue>"
  • If this is a complex change, a maintainer has confirmed the proposed approach on the linked issue.
  • If this pull request adds or changes functionality, it includes tests or explains why tests are not needed.
  • If this pull request changes user-facing behavior, it updates documentation or explains why documentation is not needed.
    • This refactors internal proposal ownership without changing user-facing behavior.
  • If this pull request removes docs files, it includes redirect settings in mint.json.
  • If this pull request adds functions or classes, it includes helpful docstrings.

@desertaxle desertaxle changed the title flow run state proposals/foundation Extract flow-run state proposal orchestration Aug 26, 2026
@github-actions github-actions Bot added the bug Something isn't working label Aug 26, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a6deb89d1f

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/prefect/utilities/flow_run_state_proposals.py Outdated
@codspeed-hq

codspeed-hq Bot commented Aug 26, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 8 untouched benchmarks
⏩ 1 skipped benchmark1


Comparing flow-run-state-proposals/foundation (582e5db) with main (50a2a27)

Open in CodSpeed

Footnotes

  1. 1 benchmark was skipped, so the baseline result was used instead. If it was deleted from the codebase, click here and archive it to remove it from the performance reports.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Zombie-detection automation false-positives on healthy completed flows

1 participant