Skip to content

Reduce severity for state requests cancelled by runner - #40254

Merged
shunping merged 1 commit into
apache:masterfrom
parveensania:log
Sep 25, 2026
Merged

shunping merged 1 commit into
apache:masterfrom
parveensania:log

Conversation

@parveensania

Copy link
Copy Markdown
Contributor

Addresses #34705
R: @scwhittle

Description

  • Adds ErrorReason (ERROR_REASON_UNSPECIFIED, CANCELLED) to StateResponse in beam_fn_api.proto to distinguish runner-initiated work item cancellations (e.g. during autoscaling or load-balancing) from unexpected state errors.
  • When StateResponse.error_reason == CANCELLED, skips ERROR logging and logs at INFO level in SdkHarness._execute while still returning InstructionResponse.error to the runner.

Next Steps:

  • Server-side runner changes and Java SDK implementation will follow in subsequently.

@github-actions

Copy link
Copy Markdown
Contributor

Assigning reviewers:

R: @shunping for label python.

This pull request likely touches a core component ("core" label). Please review with scrutiny.

Note: If you would like to opt out of this review, comment assign to next reviewer.

Available commands:

  • stop reviewer notifications - opt out of the automated review tooling
  • remind me after tests pass - tag the comment author after tests pass
  • waiting on author - shift the attention set back to the author (any comment or push by the author will return the attention set to the reviewers)

The PR bot will only process comments in the main thread (not review comments).

@scwhittle scwhittle left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks! The approach looks good to me, but I will let someone more famliar with Python SDK to approve implementation specifics.

@shunping shunping left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM. Thanks!

@shunping
shunping merged commit 6317b19 into apache:master Sep 25, 2026
115 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants