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

NVIDIA / nodewright / 31751043259
79%

Build:
DEFAULT BRANCH: main
Ran 13 Aug 2026 11:00PM UTC
Jobs 1
Files 59
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

13 Aug 2026 10:42PM UTC coverage: 78.877% (-0.02%) from 78.9%
31751043259

push

github

web-flow
test(operator): close webhook-cache race in DeploymentPolicy webhook specs (#467)

The NodeWright and Skyhook validating webhooks resolve spec.deploymentPolicy
through the manager's client, which reads from the informer cache. The
DeploymentPolicy webhook specs create a policy with k8sClient, which reads
straight from the apiserver, and then immediately create a CR referencing it.
When the informer has not yet observed the policy, admission denies the create
with `deploymentPolicy "..." not found`, producing spurious red on unrelated
PRs.

Expose the manager's client as cachedClient in each webhook suite and add
waitForPolicyInWebhookCache, which waits for the policy to appear in that same
cache before the referencing create. Because it is the exact informer the
webhook reads, once the wait returns the webhook cannot miss the policy.

Waiting on the cache rather than retrying the create keeps a genuine validation
error failing fast with its own message instead of spinning for the timeout.

Four call sites were racing, not one: both affected specs in
api/nodewright/v1alpha1 and the identical pair in the legacy api/v1alpha1
package. The remaining policy-referencing specs invoke the webhook struct
directly, and those instances are wired with k8sClient, so they do not race.

Verified by instrumenting the helper with an attempt counter: across six runs
the cache had not yet observed the policy on first read in two of them.

Fixes #456

Signed-off-by: Brian Lockwood <lockwobr@gmail.com>

10168 of 12891 relevant lines covered (78.88%)

7.93 hits per line

Coverage Regressions

Lines Coverage ∆ File
3
83.6
-0.12% operator/internal/controller/skyhook_controller.go
Jobs
ID Job ID Ran Files Coverage
1 31751043259.1 13 Aug 2026 11:00PM UTC 59
78.88
GitHub Action Run
Source Files on build 31751043259
  • Tree
  • List 59
  • Changed 1
  • Source Changed 0
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #31751043259
  • e50e52d1 on github
  • Prev Build on main (#31746429771)
  • Next Build on main (#31759335068)
  • Delete
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