Skip to content

fix(workloadapi): notify watchers when retries stop#436

Open
maxlambrecht wants to merge 1 commit intospiffe:mainfrom
maxlambrecht:fix/workloadapi-watch-retry-errors
Open

fix(workloadapi): notify watchers when retries stop#436
maxlambrecht wants to merge 1 commit intospiffe:mainfrom
maxlambrecht:fix/workloadapi-watch-retry-errors

Conversation

@maxlambrecht
Copy link
Copy Markdown
Member

What

  • Make RetryHandler.scheduleRetry return whether a retry was actually scheduled.
  • Notify Workload API watchers when retry scheduling fails due to executor shutdown, rejected scheduling, or exhausted retries.
  • Replace string-based retry classification with explicit gRPC status classification.
  • Treat INVALID_ARGUMENT, CANCELLED, PERMISSION_DENIED, UNAUTHENTICATED, UNIMPLEMENTED, and FAILED_PRECONDITION as terminal watch errors.
  • Add focused tests for terminal and retryable status handling.

Why

Watch retry handling could silently drop a watch when scheduleRetry could not actually enqueue retry work. Some terminal gRPC statuses were also retried indefinitely, including client-side CANCELLED during shutdown.

How tested

  • ./gradlew :java-spiffe-core:test --tests 'io.spiffe.workloadapi.StreamObserversTest' --tests 'io.spiffe.workloadapi.retry.RetryHandlerTest' --tests 'io.spiffe.workloadapi.DefaultWorkloadApiClientRetryableErrorTest'
  • ./gradlew :java-spiffe-core:test --tests 'io.spiffe.workloadapi.*'

Signed-off-by: Max Lambrecht <maxlambrecht@gmail.com>
@maxlambrecht maxlambrecht requested a review from rturner3 as a code owner May 9, 2026 20:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant