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

Mellanox / network-operator / 35837091782
64%

Build:
DEFAULT BRANCH: master
Ran 23 Sep 2026 08:29AM UTC
Jobs 1
Files 63
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

23 Sep 2026 08:26AM UTC coverage: 64.552% (+0.05%) from 64.503%
35837091782

push

github

web-flow
test: fix race and cleanup issues in NicClusterPolicy controller specs related to nv-iapm deletion (#3265)

Previous PR #3174 ran into issues with unit-tests with cleanups and a
race condition when removing nv-iapm from the nicclusterpolicies. i've
added this fix, then had claude pick it apart and test it to make sure
it resolve the issue. It spotted a few areas I missed that could use the
fix as well.

---

The controllers suite fails intermittently in CI with five failures that
share one root cause. Run 34412030344 is an instance, and run
34360573140, on a branch that only bumps a dependency version, shows the
same signature, so it is not specific to any one change.

The root failure is in "should create nv-ipam and delete it after
un-setting CR value". The spec reads the NicClusterPolicy, clears
spec.nvIpam and calls Update, while the reconciler writes the status of
that same object. When the reconciler wins the race the Update is
rejected:

```
Operation cannot be fulfilled on nicclusterpolicies.mellanox.com "nic-cluster-policy":
the object has been modified; please apply your changes to the latest version and try again
```

The spec then aborts before the Delete at the end of its body.
NicClusterPolicy is cluster scoped and every spec creates it under the
same name, so the leaked object makes each following spec fail on Create
with AlreadyExists, including the BeforeEach of the Upgrade Controller
suite. One conflict is reported as five failures, and none of the five
names the object that actually leaked.

What this changes:

Read-modify-write against an object the reconciler also writes is
replaced with a merge patch, which carries no resourceVersion
precondition and so cannot conflict. This is the pattern the neighboring
specs in the same file already use for the same kind of mutation. The
change is applied in three places: the nv-ipam spec, the Node taint
update, and the NicClusterPolicy toleration update.

Cleanup is registered with DeferClean... (continued)

5290 of 8195 relevant lines covered (64.55%)

49.74 hits per line

Coverage Regressions

Lines Coverage ∆ File
6
74.08
-1.16% pkg/state/state_skel.go
2
74.63
-0.75% controllers/drain_controller.go
2
87.0
-0.38% pkg/state/state_ofed.go
Jobs
ID Job ID Ran Files Coverage
1 35837091782.1 23 Sep 2026 08:29AM UTC 63
64.55
GitHub Action Run
Source Files on build 35837091782
  • Tree
  • List 63
  • Changed 7
  • Source Changed 0
  • Coverage Changed 7
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #35837091782
  • dbd1f9e6 on github
  • Prev Build on master (#35836803523)
  • Next Build on master (#36030022081)
  • 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