• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

kubernetes-sigs / lws / 43714526985
88%

Build:
DEFAULT BRANCH: main
Ran 15 Nov 2026 12:38PM UTC
Jobs 1
Files 42
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

15 Nov 2026 12:34PM UTC coverage: 88.378% (+0.05%) from 88.333%
43714526985

push

github

web-flow
feat(metrics): add pod controller counters for group recreations (#1286)

* feat(metrics): add pod controller counters for group recreations

Register lws_group_recreations_total, lws_group_restart_budget_exhausted_total
and lws_group_restart_backoffs_total with the controller-runtime registry, and
increment them where the pod controller records the RecreateGroup,
ReplicaRestartBudgetExceeded and GroupRestartBackoff events. The
LeaderWorkerSet controller removes the series of a deleted LeaderWorkerSet.

* test(metrics): move the controller tests, unregister in TestRegister

Move the metrics tests of the pod and LeaderWorkerSet controllers from
controller_metrics_test.go into pod_controller_test.go and
leaderworkerset_controller_test.go.

TestRegister registered the collectors with the controller-runtime registry
and kept them, so its second run under the unit job's -count 3 panicked on
duplicate registration. Unregister them on cleanup.

* fix(metrics): start series at 0 and count each leader once

The LeaderWorkerSet controller creates a LeaderWorkerSet's series at 0
when it first reconciles it, so that rate() and increase() see its first
recreation, exhaustion or backoff.

The pod controller counts a recreation or a backoff once per leader pod.
A reconcile working from a lagging cache can delete a leader that is
already terminating, or mark its pending recreation again: the event
repeats, the count no longer does. The RecreateGroupOnPodRestart
integration spec counted 2 for one recreation.

* fix(metrics): count each exhausted group once

terminateExhaustedGroup runs for every failed pod of the group. When the
cache shows the exhausted marker but not yet the leader's deletion, it
deletes the terminating leader again and the exhaustion was counted
twice. Count it once per leader pod, like recreations and backoffs.

Also from review: honorLabels on the ServiceMonitor so the counters keep
the LeaderWorkerSet's namespace label, the counted-leaders cache... (continued)

59 of 61 new or added lines in 4 files covered. (96.72%)

3 existing lines in 1 file now uncovered.

10859 of 12287 relevant lines covered (88.38%)

31589.94 hits per line

Uncovered Changes

Lines Coverage ∆ File
2
43.51
-0.72% cmd/main.go

Coverage Regressions

Lines Coverage ∆ File
3
43.51
-0.72% cmd/main.go
Jobs
ID Job ID Ran Files Coverage
1 43714526985.1 15 Nov 2026 12:38PM UTC 42
88.38
GitHub Action Run
Source Files on build 43714526985
  • Tree
  • List 42
  • Changed 3
  • Source Changed 0
  • Coverage Changed 3
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • 5f5d11a1 on github
  • Prev Build on main (#43681057522)
  • Next Build on main (#43714538905)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc