Skip to content

feat(web): tune legacy polling intervals and switch to sequential short polling for async jobs - #916

Merged
kyasbal merged 1 commit into
GoogleCloudPlatform:mainfrom
kyasbal:push-nqkrsoqqlkpq
Aug 27, 2026
Merged

kyasbal merged 1 commit into
GoogleCloudPlatform:mainfrom
kyasbal:push-nqkrsoqqlkpq

Conversation

@kyasbal

@kyasbal kyasbal commented Aug 27, 2026

Copy link
Copy Markdown
Member

Summary

This PR adjusts the polling intervals and timing behavior in legacy-polling.interceptor.ts when legacy polling fallback is active:

  1. State Observation RPCs:

    • WatchPopup: Reduced polling interval from 1000ms to 500ms for faster UI popup notifications.
    • WatchInspections: Reduced polling interval from 1000ms to 500ms for faster reflection of inspection list changes.
  2. Async Job RPCs:

    • OpenWorkbench & FilterTimeline: Removed client-side fixed wait delays (delay(300, req.signal)) inside the polling loop, adopting sequential short polling. Because requests are sequentially awaited (while (!req.signal.aborted)), concurrency is strictly limited to at most 1 in-flight request at all times.
  3. Tests:

    • Added test case adapts OpenWorkbench and yields stages until READY to verify multi-stage polling progression and clean termination without cancellations in legacy-polling.interceptor.spec.ts.

Testing

  • make test-web (All 862 tests pass)
  • make lint-web
  • make format-web
  • make test-go
  • make pre-commit
…rt polling for async jobs

- Reduce polling interval for WatchPopup and WatchInspections from 1000ms to 500ms for quicker UI updates.
- Remove client-side artificial delay in OpenWorkbench and FilterTimeline legacy polling adapters, relying on sequential short polling with at most 1 in-flight request.
- Add unit test verifying OpenWorkbench polling progression until READY stage.
@kyasbal kyasbal added the type:feature New feature or request label Aug 27, 2026

@gemini-code-assist gemini-code-assist Bot 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.

Code Review

This pull request adds a unit test for adapting OpenWorkbench and reduces the polling delay from 1000ms to 500ms in adaptWatchPopup and adaptWatchInspections. It also removes the polling delays entirely in adaptOpenWorkbench and adaptFilterTimeline. The review feedback warns that completely removing these delays can cause tight polling loops (busy-waiting), potentially leading to high CPU usage and server load, and suggests retaining a small delay of 100ms instead.

@kyasbal
kyasbal merged commit 99f151c into GoogleCloudPlatform:main Aug 27, 2026
16 checks passed
@kyasbal
kyasbal deleted the push-nqkrsoqqlkpq branch August 27, 2026 05:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type:feature New feature or request

1 participant