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

kubernetes-sigs / lws / 32169438917
61%

Build:
DEFAULT BRANCH: main
Ran 18 Aug 2026 06:11PM UTC
Jobs 1
Files 28
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

18 Aug 2026 06:09PM UTC coverage: 60.683% (+0.07%) from 60.617%
32169438917

push

github

web-flow
Verify controller ownership before GetForRole/Scale/legacy-slice0 mutate an LWS (#983)

* Verify controller ownership before GetForRole/Scale/legacy-slice0/Create mutate an LWS

GetForRole and Scale looked up an LWS by its generated name only, with
no check that the found object is actually controller-owned by the
DisaggregatedSet calling them. During rapid same-name recreation (a DS
named "foo" is deleted and a new one also named "foo" is created
before garbage collection removes the old one's LWS objects), the new
controller's reconcileRoleSimple could find and then Scale the old
"foo"'s still-present LWS - mutating an object it doesn't own. This is
the same class of bug already fixed for List via metav1.IsControlledBy;
GetForRole/Scale are a separate code path that fix didn't cover.

recreateLegacySlice0 had the identical gap: it fetched a legacy-named
LWS by raw Get with no ownership check before deleting it to make way
for the slice-aware migration.

- Added LeaderWorkerSetManager.getOwned, an ownership-filtered wrapper
  around Get (mirrors List's existing filtering). GetForRole now uses
  it for both the slice-aware and legacy-name lookups; a foreign-owned
  LWS at either name is treated as absent rather than returned.
- Scale now takes the DisaggregatedSet (instead of a bare namespace)
  and refuses to patch a same-named LWS that isn't controller-owned by
  it, returning an error instead of silently mutating a foreign object.
  Updated all three call sites (reconcileRoleSimple, scaleUpNew, and
  the scale-down path in executor.go).
- recreateLegacySlice0 uses getOwned instead of a raw Get before
  deleting a legacy-named LWS.
- Create's AlreadyExists handling now checks ownership too: if the
  taken name is owned by this DisaggregatedSet, it's a benign
  concurrent-reconcile race (no-op, as before); if foreign-owned, it
  now errors instead of silently returning success, so the reconcile
  requeues. A silent no-op here would otherwise be perma... (continued)

26 of 29 new or added lines in 3 files covered. (89.66%)

2664 of 4390 relevant lines covered (60.68%)

47.44 hits per line

Uncovered Changes

Lines Coverage ∆ File
3
92.42
-1.02% pkg/controllers/disaggregatedset/lws_manager.go
Jobs
ID Job ID Ran Files Coverage
1 32169438917.1 18 Aug 2026 06:11PM UTC 28
60.68
GitHub Action Run
Source Files on build 32169438917
  • Tree
  • List 28
  • Changed 2
  • Source Changed 0
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • 38243599 on github
  • Prev Build on main (#32156151730)
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