Skip to content

feat(dashboard): add a live timing bar to canary pause steps - #4836

Open
apellex wants to merge 17 commits into
argoproj:masterfrom
apellex:apellex/pause-timing-bar
Open

feat(dashboard): add a live timing bar to canary pause steps#4836
apellex wants to merge 17 commits into
argoproj:masterfrom
apellex:apellex/pause-timing-bar

Conversation

@apellex

@apellex apellex commented Jul 11, 2026

Copy link
Copy Markdown

Adds a live "time remaining" indicator for timed canary pauses — in both the dashboard and the kubectl argo rollouts CLI — so you can see at a glance how long until a paused rollout proceeds.

Fixes #1183 — a request open since 2022 to surface pause time remaining. Neither the dashboard nor the CLI surfaced it before this PR.

Dashboard

The current pause step's card fills left-to-right as the pause elapses. Indefinite (manual) pauses are unchanged.

CLI

kubectl argo rollouts get rollout gains a Pause: line in the canary summary showing the time left on the current timed pause (e.g. Pause: 15s remaining). Indefinite pauses and non-paused steps are unaffected.

How it works

  • The controller already records the pause start time in status.pauseConditions[reason=CanaryPauseStep].startTime. This PR surfaces it on RolloutInfo as a new pauseStartTime field (populated in the info builder; proto/swagger/TS artifacts regenerated).
  • Dashboard: derives progress from that server-provided start time, so it stays accurate across page reloads rather than counting from page-load. The fill runs as a single CSS transition over the remaining time — smooth, with no per-second re-rendering.
  • CLI: computes the remaining time at print from the same field plus the step's duration.

Design choices

  • Timed pauses (e.g. pause: {duration: 40s}) → dashboard card fills (no countdown text, keeping the panel minimal); CLI shows Pause: Ns remaining.
  • Indefinite pauses (pause: {}) → unchanged in both.
  • Server-sourced timing over a client-only heuristic, so remaining time is correct after a refresh. This is the main difference from the stalled client-only attempt in UI/feat UI timeleft #4617, which counted from page-load and reset on reload.

Demo

UI
Screen Recording 2026-07-10 at 9 45 45 PM

CLI
Screen Recording 2026-07-21 at 11 22 13 AM


Checklist:

  • Either (a) I've created an enhancement proposal and discussed it with the community, (b) this is a bug fix, or (c) this is a chore. — implements the community request tracked in When paused, display how long the pause is for. #1183.
  • The title of the PR is (a) conventional with a list of types and scopes found here, (b) states what changed, and (c) suffixes the related issues number.
  • I've signed my commits with DCO
  • My builds are green. Try syncing with master if they are not.
  • I have written unit and/or e2e tests for my change. PRs without these are unlikely to be merged. — Go info builder + CLI get unit tests, plus UI jest helper tests.
  • I have run all tests locally (including the flaky ones) and they pass on my workstation — ran the affected unit suites (Go info + cmd/get, UI jest).
  • I have used LLM/AI/Agent tools for this PR but I am responsible for all code of this PR
  • I understand what the code does and WHY/HOW it works in several scenarios
  • I know if my code is just adding new functionality or changing old functionality for existing users — purely additive; no change to existing behavior.
  • My organization is added to USERS.md. — N/A

@apellex
apellex requested a review from a team as a code owner July 11, 2026 01:53
@github-actions

github-actions Bot commented Jul 11, 2026

Copy link
Copy Markdown
Contributor

Published E2E Test Results

  4 files    4 suites   4h 8m 44s ⏱️
149 tests 137 ✅  7 💤 5 ❌
606 runs  569 ✅ 28 💤 9 ❌

For more details on these failures, see this check.

Results for commit f78cf21.

♻️ This comment has been updated with latest results.

@codecov

codecov Bot commented Jul 11, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 85.23%. Comparing base (f2c5c2b) to head (f78cf21).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4836      +/-   ##
==========================================
+ Coverage   85.17%   85.23%   +0.05%     
==========================================
  Files         166      166              
  Lines       19453    19475      +22     
==========================================
+ Hits        16570    16600      +30     
+ Misses       2030     2020      -10     
- Partials      853      855       +2     
Flag Coverage Δ
e2e 53.05% <ø> (+0.02%) ⬆️
unit-tests 81.70% <100.00%> (+0.05%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions

github-actions Bot commented Jul 11, 2026

Copy link
Copy Markdown
Contributor

Published Unit Test Results

2 629 tests   2 629 ✅  3m 30s ⏱️
  131 suites      0 💤
    1 files        0 ❌

Results for commit f78cf21.

♻️ This comment has been updated with latest results.

apellex added 3 commits July 15, 2026 14:02
Add a pauseStartTime field to the RolloutInfo API message, populated from
the CanaryPauseStep pause condition (RFC3339 UTC), so the UI can tell how
far a timed pause has progressed. Regenerates proto, swagger, and TS
artifacts, and covers the builder with a unit test.

Signed-off-by: Vũ (Alex) Nguyễn <vu@apella.io>
Fill the current pause step's card left-to-right as a timed pause elapses,
giving an at-a-glance sense of time remaining; indefinite pauses are
unchanged. Timing is derived client-side from the server-provided
pauseStartTime, so it stays accurate across reloads. The fill runs as a
single CSS transition over the remaining time (no per-second ticking), so
it sweeps smoothly from mount to completion. Adds pure, unit-tested helpers
(durationToSeconds, computePauseProgress) and a PauseProgressBar component.

Signed-off-by: Vũ (Alex) Nguyễn <vu@apella.io>
watchOptions is no longer valid under devServer; move it to the top-level
webpack config so `pnpm --dir ui start` runs.

Signed-off-by: Vũ (Alex) Nguyễn <vu@apella.io>
@kostis-codefresh
kostis-codefresh force-pushed the apellex/pause-timing-bar branch from e9dc2a3 to a20b1fb Compare July 15, 2026 11:02
@kostis-codefresh

Copy link
Copy Markdown
Member

Related? #4617

@apellex

apellex commented Jul 15, 2026

Copy link
Copy Markdown
Author

Related? #4617

@kostis-codefresh yes it is related, however:

  • UI/feat UI timeleft #4617 is a front-end only implementation that doesn't survive hard refresh
  • (props.step.pause as any).startTime) is problematic too because GithubComArgoprojArgoRolloutsPkgApisRolloutsV1alpha1RolloutPause carries no startTime
  • Performance-wise CSS transition is superior to full Step re-render
  • My change is minimalistic (indefinite pause stays the same, only the fill bar animates for timed pause)
  • has no activity since February

@kostis-codefresh

Copy link
Copy Markdown
Member

Hey. I took a quick look, and this seems to address only the UI. But the original issue says "In both the CLI and the UI".

Was the CLI side intentionally left out for another PR, or was it out of scope for now? I am asking because if this PR gets merged then the original issue will be autoclosed.

@apellex

apellex commented Jul 21, 2026

Copy link
Copy Markdown
Author

Hey. I took a quick look, and this seems to address only the UI. But the original issue says "In both the CLI and the UI".

Was the CLI side intentionally left out for another PR, or was it out of scope for now? I am asking because if this PR gets merged then the original issue will be autoclosed.

@kostis-codefresh Thanks for the review. Honestly it was left out because I personally don't use the CLI. I'm leaning scoping down to covering just UI for now. I can remove the issue tag. On second thought, the CLI change is minimal I will implement it as well so this PR can close #1183 completely.

@apellex
apellex force-pushed the apellex/pause-timing-bar branch from 5596a84 to 742a1dd Compare July 21, 2026 15:15
@apellex

apellex commented Jul 21, 2026

Copy link
Copy Markdown
Author

Hey. I took a quick look, and this seems to address only the UI. But the original issue says "In both the CLI and the UI".

Was the CLI side intentionally left out for another PR, or was it out of scope for now? I am asking because if this PR gets merged then the original issue will be autoclosed.

@kostis-codefresh PR description updated to include clip showing the "Pause: Xs remaining" in the CLI get --watch

Add a PauseRemaining line to the canary summary of `kubectl argo rollouts
get rollout` when the rollout is paused on a timed pause step, computed
from the pause condition start time (now on RolloutInfo) and the step
duration. Indefinite pauses and non-paused steps are unaffected. This
brings the CLI to parity with the dashboard so argoproj#1183 is fully addressed.

Signed-off-by: Vũ (Alex) Nguyễn <vu@apella.io>
@apellex
apellex force-pushed the apellex/pause-timing-bar branch from 742a1dd to cc22d06 Compare July 21, 2026 16:21
@sonarqubecloud

sonarqubecloud Bot commented Aug 7, 2026

Copy link
Copy Markdown

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.

When paused, display how long the pause is for.

2 participants