Skip to content

feat(ui): show banner on experiments list when scheduling is paused - #1217

Merged
andrzejfudro merged 6 commits into
mainfrom
feat/scheduling-paused-banner
Oct 13, 2026
Merged

andrzejfudro merged 6 commits into
mainfrom
feat/scheduling-paused-banner

Conversation

@andrzejfudro

@andrzejfudro andrzejfudro commented Oct 12, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

When an admin pauses scheduling, regular users on /experiments had no way of knowing it. New experiments just sat there. This PR adds a warning banner that says scheduling is paused and that new experiments will wait until an administrator resumes it.

Key Changes

  • Health service: New GetSchedulingStatus RPC (GET /v1/health/scheduling). Any authenticated user can call it, unlike the admin-only pause/resume RPCs. It returns false when the feature flag is off, reads the pause state via PauseScheduler.IsPausedCached (cached for CacheTTL with write-through updates on Pause and Resume, while IsPaused remains uncached for the admin panel), and returns a generic Internal error on storage failures while propagating client cancellations.
  • UI: HealthService.getSchedulingStatus(), plus a new isSchedulingPaused state in ExperimentsListPageStore. The page fetches it on load and on each auto-reload, without blocking the experiments fetch. The banner is a new standalone display component, SchedulingPausedBanner in common/components/. The fetch only runs when pauseSchedulingEnabled is set, and any error is logged and treated as not paused.
  • Tests/docs: Table-driven Go tests, plus store, component and service specs. Also a screenshot-test route stub and an update to the Health Service section in components.md.

Assumptions

  • Exposing a single paused/not-paused boolean to non-admins is fine; it carries no actor or timestamp metadata.
  • Refreshing on the existing auto-reload interval (30s) is fresh enough; no push channel.

Verification

  • bazel test //api:protos_breaking_test //cmd/health_service:server_test //cmd/ui:ui_unit_tests (Passed)
  • ./.githooks/pre-commit --check: all linters pass; the only addlicense hits are local untracked files outside this PR
  • Manually tested on the ... dev environment

TAG=agy
CONV=01951f96-75e9-4755-98e8-34ac53db3982

Add a non-admin GetSchedulingStatus RPC (GET /v1/health/scheduling) to the
health service so any authenticated user can see whether global scheduling
is paused. The experiments list page polls it on load and on auto-reload,
and shows a warning banner while scheduling is paused. The banner is behind
the pause_scheduling_enabled feature flag and treats errors as not paused.

TAG=agy
CONV=01951f96-75e9-4755-98e8-34ac53db3982

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

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 introduces a new GetSchedulingStatus RPC to the HealthService to retrieve the global workload scheduling pause status, along with its backend implementation, unit tests, and updated architecture documentation. On the frontend, the experiments list page is updated to fetch this status and display a warning banner when scheduling is paused. Feedback on the changes suggests logging the error when fetching the scheduling status fails in the UI store, rather than swallowing it silently, to facilitate troubleshooting.

Log the error before failing open so health service outages on the
experiments list page are diagnosable, and assert the log in the store test.

TAG=agy
CONV=01951f96-75e9-4755-98e8-34ac53db3982
Move the banner markup and styles into a reusable presentational
SchedulingPausedBanner component (with harness and tests). The experiments
list page still controls visibility via isSchedulingPaused(). Add a page
test proving experiments render while the status request is pending.

TAG=agy
CONV=01951f96-75e9-4755-98e8-34ac53db3982
@andrzejfudro
andrzejfudro marked this pull request as ready for review October 12, 2026 14:51
Comment thread cmd/health_service/server.go Resolved
Comment thread cmd/health_service/server.go Resolved
Comment thread cmd/health_service/server.go Resolved
…d requests

Add `PauseScheduler.IsPausedCached` with an in-memory `CacheTTL` cache and write-through updates on `Pause` and `Resume` after the Spanner transaction commits (keeping `IsPaused` uncached for the admin panel), remove redundant nil dependency checks in `GetSchedulingStatus`, and propagate client context cancellations without logging false-positive internal errors.

TAG=agy
CONV=01951f96-75e9-4755-98e8-34ac53db3982
@andrzejfudro
andrzejfudro force-pushed the feat/scheduling-paused-banner branch from b7aa755 to 33e0e1e Compare October 13, 2026 10:59
…d-banner

# Conflicts:
#	cmd/health_service/pause_scheduling.go
janzak-dev
janzak-dev previously approved these changes Oct 13, 2026
Comment thread cmd/health_service/pause_scheduling.go Resolved
Use `singleflight.Group` in `pauseScheduler.IsPausedCached` so concurrent cache misses share a single underlying Spanner read.

TAG=agy
CONV=01951f96-75e9-4755-98e8-34ac53db3982
@andrzejfudro
andrzejfudro force-pushed the feat/scheduling-paused-banner branch from 091395a to d791629 Compare October 13, 2026 13:41
@andrzejfudro
andrzejfudro added this pull request to the merge queue Oct 13, 2026
Merged via the queue into main with commit ff5a8df Oct 13, 2026
13 checks passed
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.

2 participants