Skip to content

fix(client): preserve terminal watch outcomes - #991

Open
Tmwakalasya wants to merge 1 commit into
uber:mainfrom
Tmwakalasya:tuntu/fix-cli-terminal-watch
Open

Tmwakalasya wants to merge 1 commit into
uber:mainfrom
Tmwakalasya:tuntu/fix-cli-terminal-watch

Conversation

@Tmwakalasya

Copy link
Copy Markdown
Contributor

Why?

An active watch can keep polling after a request has finished. For example, the gateway can record a late cancelling intent after landed; the materialized summary retains the terminal outcome, but the client currently uses the latest history status and leaves the row unsettled. A background event after an error status can also erase or replace the terminal failure explanation.

What?

Track the current outcome while digesting history. Once a terminal status is present, later nonterminal entries no longer replace its status or diagnostic. Preserve the chronological trail, including late intents and background events, and continue accepting updated terminal entries.

This addresses terminal-to-nonterminal regression in the history-based watch. It does not add request-version ordering between conflicting terminal records; the history wire type does not carry that version.

Test Plan

  • New regressions failed before the fix: landed, cancelled, and error followed by cancelling left the tracker unsettled; later events lost the terminal diagnostic.
  • ./tool/bazel test //submitqueue/client:go_default_test --test_output=errors passed.
  • ./tool/bazel test //submitqueue/client:go_default_test --@rules_go//go/config:race --test_output=errors passed.
  • make fmt, make lint, make check-tidy, and make check-gazelle passed.

The tests exercise history digestion and tracker completion locally. The full integration/e2e suites were not run.

Issue

No linked issue.

This branch has not been deployed

No deployments
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

⌂ Proxy