Skip to content

Make Reflector Watch retry backoff abortable #3288

Description

@coderabbitai

Summary

Make the regular Watch retry backoff abortable in packages/kube-client/lib/cache/Reflector.js.

Rationale

Reflector.listAndWatch() retries connection-refused and HTTP 429 Watch request errors. Its retry delay does not receive this.signal. If cancellation occurs during this delay, the reflector waits for the backoff timer to complete.

The WatchList retry path already passes this.signal to delay().

Affected area

  • packages/kube-client/lib/cache/Reflector.js
  • Reflector.listAndWatch()

Required change

Pass the reflector abort signal to the retry backoff delay for retriable regular Watch request errors. Keep the behavior aligned with the WatchList retry path.

Acceptance criteria

  • Aborting the reflector interrupts the regular Watch retry backoff without waiting for the full timer duration.
  • The abort error remains handled as an expected cancellation by the existing run loop.
  • Add or update focused test coverage if suitable with the related client-go ports.

Backlinks

Activity

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions