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

NVIDIA / nodewright / 27029871753

05 Jun 2026 05:27PM UTC coverage: 81.626% (-0.05%) from 81.676%
27029871753

push

github

web-flow
feat(cli): update-state + targeted reset --package (closes #257) (#258)

* refactor(cli/utils): fix SetNodeAnnotation JSON quoting; extract ConfirmYN and ListNodesWithSkyhookState

Signed-off-by: Alex Yuskauskas <ayuskauskas@nvidia.com>

* fix(cli/reset): surface list-nodes errors instead of silently no-op

The refactor to utils.ListNodesWithSkyhookState left the reset command
treating a hard list-from-apiserver failure (RBAC denied, unreachable
apiserver) the same as a per-node parse failure: a single Warning log
under --verbose, then control falls through to the "No nodes have
state" early-return. Restore the pre-refactor behavior by aborting
when the helper returns a nil result map (its signal for list
failure), while still surfacing parse-only failures as warnings.

Signed-off-by: Alex Yuskauskas <ayuskauskas@nvidia.com>

* docs(cli/utils): document ListNodesWithSkyhookState nil-map contract; use METADATA_PREFIX

Signed-off-by: Alex Yuskauskas <ayuskauskas@nvidia.com>

* feat(cli): scaffold update-state command with --add flag

Signed-off-by: Alex Yuskauskas <ayuskauskas@nvidia.com>

* feat(cli): implement update-state with validation, warnings, and --add

Signed-off-by: Alex Yuskauskas <ayuskauskas@nvidia.com>

* fix(cli/update-state): surface list errors and align tests with reset.go pattern

Mirror reset.go's list-error handling so an apiserver/RBAC failure surfaces
as a wrapped error instead of being silently swallowed under non-verbose
mode. Drop the package-level client-injection seam (newUpdateStateClient)
and inline the client construction in RunE, matching reset.go; rewrite the
runUpdateState specs to call the runner directly with a fake client like
reset_test.go does. Tighten the dry-run test to also cover the non-empty
targets path (asserts [dry-run] output and that the annotation is
unchanged), and assert Name/Version on the --add create test.

Signed-off-by: Alex Yuskauskas <ayuskauskas@nvidia.com>

* feat(cli): add --package flag to ... (continued)

336 of 414 new or added lines in 4 files covered. (81.16%)

3 existing lines in 2 files now uncovered.

8041 of 9851 relevant lines covered (81.63%)

9.3 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

83.65
/operator/internal/controller/skyhook_controller.go


Source Not Available

STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc