Skip to content

fix: Clean up nolint directives marked as TODO - Part 3#832

Open
cbumb wants to merge 14 commits intoNVIDIA:mainfrom
cbumb:728_nolint-cleanup_3
Open

fix: Clean up nolint directives marked as TODO - Part 3#832
cbumb wants to merge 14 commits intoNVIDIA:mainfrom
cbumb:728_nolint-cleanup_3

Conversation

@cbumb
Copy link
Contributor

@cbumb cbumb commented Feb 11, 2026

Summary

Refactors nolint directives by lowering complexity and improving structure. No intended behavior change.
Modules updated in this PR:

janitor

Type of Change

  • 🐛 Bug fix
  • ✨ New feature
  • 💥 Breaking change
  • 📚 Documentation
  • 🔧 Refactoring
  • 🔨 Build/CI

Component(s) Affected

  • Core Services
  • Documentation/CI
  • Fault Management
  • Health Monitors
  • Janitor
  • Other: ____________

Testing

  • Tests pass locally
  • Manual testing completed
  • No breaking changes (or documented)

Checklist

  • Self-review completed
  • Documentation updated (if needed)
  • Ready for review

Summary by CodeRabbit

  • Refactor
    • Startup, CLI and server wiring reorganized for clearer, modular initialization; controller setup made more composable.
  • Style
    • Localized lint annotations and tightened formatting.
  • Bug Fixes
    • Config loading now reliably falls back to built-in defaults when no config file is present.
  • Behavior
    • Default settings now apply to additional node operations; controllers now requeue on transient CSP errors with backoff.
  • Documentation
    • Shortened column descriptions for target node and status.
  • Tests
    • Added coverage for transient CSP/gRPC error handling.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 11, 2026

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Refactors main startup into modular helpers for flags/TLS/config-server wiring; tightens per-line lint directives in API types; refactors config defaults into focused helpers; adds transient gRPC error handling and status helpers to RebootNode controller; replaces inline field indexers with dedicated helper indexers. No exported/public signatures changed.

Changes

Cohort / File(s) Summary
Main initialization & TLS
janitor/main.go
Large restructure: introduce runFlags, parseFlags, resolvePodNamespace, setupConfigServer, tlsAndServers, setupTLSAndServers; centralize TLS, cert-watcher, webhook/metrics wiring; run() now orchestrates modular helpers and starts config server + manager concurrently.
RebootNode controller logic & tests
janitor/pkg/controller/rebootnode_controller.go, janitor/pkg/controller/rebootnode_controller_test.go
Decompose Reconcile into helpers, add status update helper (updateRebootNodeStatusIfChanged), node readiness checks, transient gRPC error classification/handling and backoff, deletion sentinel errRebootNodeDeleted; tests added/expanded for transient gRPC error behavior.
Field indexers & utils
janitor/pkg/controller/utils.go
Replace inline indexers with podNodeNameIndexer(obj) and gpuResetNodeNameIndexer(obj); remove Job owner-based indexer; update ConfigureFieldIndexers usage/messages.
API type linting annotations
janitor/api/v1alpha1/gpureset_types.go, janitor/api/v1alpha1/rebootnode_types.go, janitor/api/v1alpha1/terminatenode_types.go
Remove file-level nolint directives; add targeted per-line nolint (e.g., GPUSelector.UUIDs nolint:lll) and shorten two kubebuilder:printcolumn descriptions on GPUReset.
Config loading & defaults
janitor/pkg/config/config.go, janitor/pkg/config/default.go
config.go: use errors.As to detect missing config file and fall back to defaults. default.go: split applyConfigDefaults into focused helpers (applyGlobalDefaults, applyTimeoutDefaults, applyManualModeDefaults, applyExclusionsDefaults, applyCSPProviderHostDefaults) and propagate defaults to additional controllers (e.g., TerminateNode).

Sequence Diagram(s)

sequenceDiagram
participant CLI as CLI / Flags
participant Config as Config Loader & Server
participant TLS as tlsAndServers
participant Cert as Cert Watcher
participant Manager as Controller Manager

CLI->>Config: parseFlags -> load config
Config->>TLS: provide config, ports, cert paths
TLS->>Cert: start certificate watchers
Cert-->>TLS: supply TLS assets
TLS->>Manager: configure webhook & metrics servers with TLS
Manager->>Config: start config server concurrently
Manager-->>CLI: start manager (blocks)
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~75 minutes

Poem

🐰 I tidy flags and stitch the TLS,
I trim long lints and hush excess,
Servers hum and watchers peep,
Indexers hop and tests won't sleep,
A carrot-coded, joyous press.

🚥 Pre-merge checks | ✅ 3 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 18.18% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (3 passed)
Check name Status Explanation
Merge Conflict Detection ✅ Passed ✅ No merge conflicts detected when merging into main
Title check ✅ Passed The title accurately describes the main objective of the PR: cleaning up nolint directives (Part 3). It directly summarizes the primary change reflected in the commit message and file modifications.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link

Merging this branch will decrease overall coverage

Impacted Packages Coverage Δ 🤖
github.com/nvidia/nvsentinel/janitor/pkg/controller 17.69% (-0.02%) 👎

Coverage by file

Changed files (no unit tests)

Changed File Coverage Δ Total Covered Missed 🤖
github.com/nvidia/nvsentinel/janitor/pkg/controller/rebootnode_controller.go 17.33% (ø) 854 148 706

Please note that the "Total", "Covered", and "Missed" counts above refer to code statements instead of lines of code. The value in brackets refers to the test coverage of that file in the old version of the code.

@cbumb cbumb self-assigned this Feb 12, 2026
@github-actions
Copy link

Merging this branch will increase overall coverage

Impacted Packages Coverage Δ 🤖
github.com/nvidia/nvsentinel/fault-quarantine/pkg/breaker 30.06% (ø)
github.com/nvidia/nvsentinel/fault-remediation/pkg/config 29.79% (ø)
github.com/nvidia/nvsentinel/fault-remediation/pkg/initializer 0.00% (ø)
github.com/nvidia/nvsentinel/fault-remediation/pkg/reconciler 20.88% (ø)
github.com/nvidia/nvsentinel/fault-remediation/pkg/remediation 28.10% (ø)
github.com/nvidia/nvsentinel/health-monitors/csp-health-monitor/pkg/csp/gcp 0.00% (ø)
github.com/nvidia/nvsentinel/health-monitors/csp-health-monitor/pkg/event 0.00% (ø)
github.com/nvidia/nvsentinel/health-monitors/syslog-health-monitor 0.00% (ø)
github.com/nvidia/nvsentinel/health-monitors/syslog-health-monitor/pkg/syslog-monitor 0.00% (ø)
github.com/nvidia/nvsentinel/janitor/pkg/controller 17.96% (+0.11%) 👍
github.com/nvidia/nvsentinel/tests 0.00% (ø)
github.com/nvidia/nvsentinel/tests/helpers 0.00% (ø)

Coverage by file

Changed files (no unit tests)

Changed File Coverage Δ Total Covered Missed 🤖
github.com/nvidia/nvsentinel/fault-quarantine/pkg/breaker/breaker.go 30.06% (ø) 835 251 584
github.com/nvidia/nvsentinel/fault-remediation/pkg/config/config.go 29.79% (ø) 339 101 238
github.com/nvidia/nvsentinel/fault-remediation/pkg/initializer/init.go 0.00% (ø) 342 0 342
github.com/nvidia/nvsentinel/fault-remediation/pkg/reconciler/reconciler.go 20.88% (ø) 1312 274 1038
github.com/nvidia/nvsentinel/fault-remediation/pkg/remediation/remediation.go 28.10% (ø) 1356 381 975
github.com/nvidia/nvsentinel/health-monitors/csp-health-monitor/pkg/csp/gcp/gcp.go 0.00% (ø) 0 0 0
github.com/nvidia/nvsentinel/health-monitors/csp-health-monitor/pkg/event/gcp_normalizer.go 0.00% (ø) 0 0 0
github.com/nvidia/nvsentinel/health-monitors/csp-health-monitor/pkg/event/processor.go 0.00% (ø) 0 0 0
github.com/nvidia/nvsentinel/health-monitors/syslog-health-monitor/main.go 0.00% (ø) 0 0 0
github.com/nvidia/nvsentinel/health-monitors/syslog-health-monitor/pkg/syslog-monitor/fake_journal.go 0.00% (ø) 0 0 0
github.com/nvidia/nvsentinel/health-monitors/syslog-health-monitor/pkg/syslog-monitor/journal_stub.go 0.00% (ø) 0 0 0
github.com/nvidia/nvsentinel/health-monitors/syslog-health-monitor/pkg/syslog-monitor/syslogmonitor.go 0.00% (ø) 0 0 0
github.com/nvidia/nvsentinel/janitor/pkg/controller/gpureset_controller.go 18.61% (+0.06%) 3601 670 (+2) 2931 (-2) 👍
github.com/nvidia/nvsentinel/tests/helpers/fault_remediation.go 0.00% (ø) 0 0 0
github.com/nvidia/nvsentinel/tests/helpers/health_events_analyzer.go 0.00% (ø) 0 0 0
github.com/nvidia/nvsentinel/tests/helpers/kube.go 0.00% (ø) 0 0 0

Please note that the "Total", "Covered", and "Missed" counts above refer to code statements instead of lines of code. The value in brackets refers to the test coverage of that file in the old version of the code.

Changed unit test files

  • github.com/nvidia/nvsentinel/fault-remediation/pkg/config/config_test.go
  • github.com/nvidia/nvsentinel/fault-remediation/pkg/remediation/remediation_test.go
  • github.com/nvidia/nvsentinel/janitor/pkg/controller/gpureset_controller_test.go
  • github.com/nvidia/nvsentinel/tests/csp_health_monitor_test.go
  • github.com/nvidia/nvsentinel/tests/fault_management_test.go
  • github.com/nvidia/nvsentinel/tests/fault_remediation_test.go
  • github.com/nvidia/nvsentinel/tests/gpu_health_monitor_test.go
  • github.com/nvidia/nvsentinel/tests/gpu_reset_test.go
  • github.com/nvidia/nvsentinel/tests/janitor_test.go
  • github.com/nvidia/nvsentinel/tests/log_collector_test.go
  • github.com/nvidia/nvsentinel/tests/node_drainer_test.go
  • github.com/nvidia/nvsentinel/tests/scale_test.go
  • github.com/nvidia/nvsentinel/tests/smoke_test.go

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🤖 Fix all issues with AI agents
In `@janitor/pkg/controller/rebootnode_controller.go`:
- Around line 180-200: handleRebootInProgress currently treats any error from
checkNodeReadyFromCSP as a permanent failure by calling
resultForNodeReadyFailed; change it to distinguish transient gRPC/network errors
from permanent failures: inspect nodeReadyErr (from checkNodeReadyFromCSP) for
transient gRPC codes (e.g., Unavailable, DeadlineExceeded) and in those cases
return a requeue (e.g., ctrl.Result{RequeueAfter: shortBackoff}) instead of
calling resultForNodeReadyFailed, while preserving the existing behavior for
non-transient errors; keep other flows (resultForNodeReadySucceeded,
resultForNodeReadyTimeout and getRebootTimeout) unchanged.
- Around line 330-367: The code currently sends the reboot via
RebootNodeReconciler.CSPClient.SendRebootSignal then only mutates the in-memory
RebootNode condition via RebootNode.SetCondition, which can be lost if the
subsequent status persistence (updateRebootNodeStatusIfChanged) fails and causes
a duplicate signal on retry; after a successful CSPClient.SendRebootSignal call,
set the SignalSent condition (as you already do) and immediately persist that
condition to the API (e.g., call r.Client.Status().Update(ctx, rebootNode) or
reuse updateRebootNodeStatusIfChanged to persist the status) before returning;
if that status update fails, return the error so reconciliation retries the
status persistence path (or handle a dedicated interim condition like
SignalPending if you prefer), ensuring the unique symbols involved are
sendRebootSignalAndSetCondition, RebootNode.SetCondition,
r.Client.Status().Update (or updateRebootNodeStatusIfChanged), and
CSPClient.SendRebootSignal.
- Line 57: The `nolint` directive preceding the kubebuilder RBAC marker is
inconsistent (it uses "// nolint:lll") and may not be recognized by linters;
update the comment to use the compact form "//nolint:lll // kubebuilder RBAC
marker must stay on one line" to match the other directive ("//nolint:dupl") and
ensure the linter suppression is applied for the rebootnode_controller.go RBAC
comment.
🧹 Nitpick comments (4)
janitor/pkg/controller/rebootnode_controller.go (2)

141-176: Good pattern for status updates, but returned errors lack wrapping context.

The updateRebootNodeStatusIfChanged helper is well-structured (re-fetch → copy status → update). However, the errors returned on lines 162 and 170 are bare — they lose the context of which operation failed when surfaced to the caller.

Proposed fix: wrap errors with context
-		slog.Error("failed to refresh RebootNode before status update", "error", err)
-
-		return err
+		slog.Error("failed to refresh RebootNode before status update", "error", err)
+
+		return fmt.Errorf("refreshing RebootNode %q before status update: %w", rebootNode.Name, err)
 	}
 
 	freshRebootNode.Status = rebootNode.Status
 
 	if err := r.Status().Update(ctx, &freshRebootNode); err != nil {
-		slog.Error("failed to update RebootNode status", "error", err)
-
-		return err
+		slog.Error("failed to update RebootNode status", "error", err)
+
+		return fmt.Errorf("updating RebootNode %q status: %w", rebootNode.Name, err)
 	}

As per coding guidelines, "Wrap errors with context using fmt.Errorf("context: %w", err) in Go code".


369-395: SetupWithManager uses insecure gRPC credentials with no configuration escape hatch.

grpc.WithTransportCredentials(insecure.NewCredentials()) is hardcoded. This may be intentional for in-cluster sidecar communication, but there's no flag or config to enable TLS for the CSP connection. Worth a brief inline comment explaining why insecure is acceptable here.

janitor/main.go (2)

350-358: Config handler may send a partial response with incorrect status on encode failure.

w.Header().Set("Content-Type", ...) is written before Encode. If Encode starts writing the body and then fails mid-stream, the http.Error on line 355 will not be able to set the 500 status code (headers already flushed). For a small config struct this is unlikely, but encoding to a buffer first is more robust.

Proposed fix: buffer before writing
 	configHandler := http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
-		w.Header().Set("Content-Type", "application/json")
-
-		if err := json.NewEncoder(w).Encode(cfg); err != nil {
+		data, err := json.Marshal(cfg)
+		if err != nil {
 			slog.Error("Failed to encode configuration as JSON", "error", err)
 			http.Error(w, "Internal Server Error", http.StatusInternalServerError)
-
 			return
 		}
+
+		w.Header().Set("Content-Type", "application/json")
+		w.Write(data)
 	})

333-341: Port parsing fallback is fragile for malformed addresses.

If net.SplitHostPort fails (e.g., address is just ":8082" without a host on some edge), the fallback trims a leading : manually. This works for the common :PORT case, but consider using strings.TrimPrefix for clarity and to avoid a potential panic if portStr is empty after the SplitHostPort error path.

Proposed fix
+	"strings"
 ...
 	_, portStr, err := net.SplitHostPort(configAddr)
 	if err != nil {
-		portStr = configAddr
-
-		if portStr != "" && portStr[0] == ':' {
-			portStr = portStr[1:]
-		}
+		portStr = strings.TrimPrefix(configAddr, ":")
 	}

@github-actions
Copy link

Merging this branch will increase overall coverage

Impacted Packages Coverage Δ 🤖
github.com/nvidia/nvsentinel/janitor 0.00% (ø)
github.com/nvidia/nvsentinel/janitor/pkg/controller 17.87% (+0.03%) 👍

Coverage by file

Changed files (no unit tests)

Changed File Coverage Δ Total Covered Missed 🤖
github.com/nvidia/nvsentinel/janitor/main.go 0.00% (ø) 1233 (+106) 0 1233 (+106)
github.com/nvidia/nvsentinel/janitor/pkg/controller/rebootnode_controller.go 17.05% (-0.28%) 915 (+61) 156 (+8) 759 (+53) 👎

Please note that the "Total", "Covered", and "Missed" counts above refer to code statements instead of lines of code. The value in brackets refers to the test coverage of that file in the old version of the code.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In `@janitor/pkg/controller/rebootnode_controller.go`:
- Around line 363-404: The successful path in sendRebootSignalAndSetCondition
persists the SignalSent condition via updateRebootNodeStatusIfChanged, but
reconcileHelper then calls updateRebootNodeStatusIfChanged again with the stale
originalRebootNode causing duplicate API writes; change
sendRebootSignalAndSetCondition to return an additional boolean (e.g.,
statusPersisted bool) indicating it already performed the status update (or
alter it to update originalRebootNode in-place after persisting), update the
call site in reconcileHelper to check that flag and skip the outer
updateRebootNodeStatusIfChanged when true, and update function signatures and
callers accordingly (refer to sendRebootSignalAndSetCondition, reconcileHelper,
and updateRebootNodeStatusIfChanged).
🧹 Nitpick comments (1)
janitor/pkg/controller/rebootnode_controller.go (1)

148-181: Consider wrapping returned errors with context.

Lines 167 and 175 return raw errors after logging. While the slog.Error calls provide some traceability, callers (and any error-aggregation tooling) lose the context about what operation failed. Per the coding guidelines, errors should be wrapped with fmt.Errorf("context: %w", err).

Suggested wrapping
-		slog.Error("failed to refresh RebootNode before status update", "error", err)
-
-		return err
+		return fmt.Errorf("failed to refresh RebootNode before status update: %w", err)
 	}
 
 	freshRebootNode.Status = rebootNode.Status
 
 	if err := r.Status().Update(ctx, &freshRebootNode); err != nil {
-		slog.Error("failed to update RebootNode status", "error", err)
-
-		return err
+		return fmt.Errorf("failed to update RebootNode status: %w", err)
 	}

The slog.Error calls can be kept if desired, but the wrapping ensures structured error propagation.

As per coding guidelines, **/*.go: "Wrap errors with context using fmt.Errorf("context: %w", err) in Go code".

@github-actions
Copy link

Merging this branch will decrease overall coverage

Impacted Packages Coverage Δ 🤖
github.com/nvidia/nvsentinel/janitor/pkg/controller 17.64% (-0.21%) 👎

Coverage by file

Changed files (no unit tests)

Changed File Coverage Δ Total Covered Missed 🤖
github.com/nvidia/nvsentinel/janitor/pkg/controller/rebootnode_controller.go 15.49% (-1.84%) 988 (+134) 153 (+5) 835 (+129) 👎

Please note that the "Total", "Covered", and "Missed" counts above refer to code statements instead of lines of code. The value in brackets refers to the test coverage of that file in the old version of the code.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Fix all issues with AI agents
In `@janitor/pkg/controller/rebootnode_controller.go`:
- Around line 110-149: The early-return in reconcileHelper currently returns any
error from handleRebootNotStarted directly, which lets the sentinel
errRebootNodeDeleted surface; change that early-return so that after calling
handleRebootNotStarted (the branch where you get result, err, statusPersisted)
you check if errors.Is(err, errRebootNodeDeleted) and if so return
ctrl.Result{}, nil, otherwise return ctrl.Result{}, err—this mirrors the outer
status-update path and prevents errRebootNodeDeleted from being treated as a
reconcile error; locate symbols handleRebootNotStarted, reconcileHelper,
updateRebootNodeStatusIfChanged, and errRebootNodeDeleted to implement the
check.
- Around line 369-410: In sendRebootSignalAndSetCondition: don't treat all
SendRebootSignal errors as permanent failures — detect transient gRPC errors
using the existing isTransientGRPCError helper (same check used in IsNodeReady)
and, when transient, return a requeue (e.g., ctrl.Result{RequeueAfter: 30 *
time.Second}) without setting CompletionTime or marking the RebootNode condition
to Failed; only set the False/Failed condition, call SetCompletionTime, and
increment metrics.GlobalMetrics for ActionTypeReboot/StatusFailed when the error
is non-transient (permanent).
🧹 Nitpick comments (3)
janitor/pkg/controller/rebootnode_controller.go (2)

151-186: Errors from Get and Status().Update are returned without context wrapping.

Lines 170-172 and 177-180 return raw errors. The coding guidelines require wrapping with fmt.Errorf("context: %w", err) to aid debugging when the error surfaces in the reconciler call stack.

Proposed fix
 	if err := r.Get(ctx, objectKey, &freshRebootNode); err != nil {
 		if apierrors.IsNotFound(err) {
 			slog.Info("Post-reconciliation status update: not found, object assumed deleted", "node", rebootNode.Name)
 
 			return errRebootNodeDeleted
 		}
 
 		slog.Error("failed to refresh RebootNode before status update", "error", err)
 
-		return err
+		return fmt.Errorf("refreshing RebootNode before status update: %w", err)
 	}
 
 	freshRebootNode.Status = rebootNode.Status
 
 	if err := r.Status().Update(ctx, &freshRebootNode); err != nil {
 		slog.Error("failed to update RebootNode status", "error", err)
 
-		return err
+		return fmt.Errorf("updating RebootNode status: %w", err)
 	}

As per coding guidelines: "Wrap errors with context using fmt.Errorf("context: %w", err) in Go code".


324-338: Non-idiomatic Go return signature: (ctrl.Result, error, bool) — error should be last.

Go convention places error as the final return value. The (ctrl.Result, error, bool) ordering in handleRebootNotStarted and sendRebootSignalAndSetCondition will surprise readers and can lead to accidental misuse at call sites.

Suggested signature change
-func (r *RebootNodeReconciler) handleRebootNotStarted(
-	ctx context.Context, originalRebootNode, rebootNode *janitordgxcnvidiacomv1alpha1.RebootNode, node *corev1.Node,
-) (ctrl.Result, error, bool) {
+func (r *RebootNodeReconciler) handleRebootNotStarted(
+	ctx context.Context, originalRebootNode, rebootNode *janitordgxcnvidiacomv1alpha1.RebootNode, node *corev1.Node,
+) (result ctrl.Result, statusPersisted bool, err error) {

Apply the same change to sendRebootSignalAndSetCondition and update all call sites accordingly.

janitor/pkg/controller/rebootnode_controller_test.go (1)

170-175: AfterEach will fail and obscure the real test failure if the RebootNode was deleted.

AfterEach unconditionally calls Expect(err).NotTo(HaveOccurred()) on Get. If a future test exercises deletion paths (or a test happens to clean up the resource), the AfterEach assertion will fail, masking the actual outcome.

Suggested resilience improvement
 	AfterEach(func() {
 		err := k8sClient.Get(ctx, types.NamespacedName{Name: testRebootNode.Name}, testRebootNode)
-		Expect(err).NotTo(HaveOccurred())
+		if err != nil {
+			return // object already gone; nothing to validate
+		}
 		// Ensure that the RebootNode conditions are valid
 		checkStatusConditions(testRebootNode.Status.Conditions)
 	})

@github-actions
Copy link

Merging this branch will increase overall coverage

Impacted Packages Coverage Δ 🤖
github.com/nvidia/nvsentinel/janitor/pkg/controller 18.19% (+0.35%) 👍

Coverage by file

Changed files (no unit tests)

Changed File Coverage Δ Total Covered Missed 🤖
github.com/nvidia/nvsentinel/janitor/pkg/controller/rebootnode_controller.go 18.25% (+0.92%) 1003 (+149) 183 (+35) 820 (+114) 👍

Please note that the "Total", "Covered", and "Missed" counts above refer to code statements instead of lines of code. The value in brackets refers to the test coverage of that file in the old version of the code.

Changed unit test files

  • github.com/nvidia/nvsentinel/janitor/pkg/controller/rebootnode_controller_test.go

@github-actions
Copy link

Merging this branch will increase overall coverage

Impacted Packages Coverage Δ 🤖
github.com/nvidia/nvsentinel/janitor/pkg/controller 18.15% (+0.31%) 👍

Coverage by file

Changed files (no unit tests)

Changed File Coverage Δ Total Covered Missed 🤖
github.com/nvidia/nvsentinel/janitor/pkg/controller/rebootnode_controller.go 17.81% (+0.48%) 1039 (+185) 185 (+37) 854 (+148) 👍

Please note that the "Total", "Covered", and "Missed" counts above refer to code statements instead of lines of code. The value in brackets refers to the test coverage of that file in the old version of the code.

@cbumb cbumb force-pushed the 728_nolint-cleanup_3 branch 2 times, most recently from 691c494 to 0f9316d Compare February 17, 2026 07:14
@cbumb cbumb changed the title WIP - 728 nolint cleanup 3 fix: Clean up nolint directives marked as TODO - Part 3 Feb 17, 2026
@github-actions
Copy link

Merging this branch will increase overall coverage

Impacted Packages Coverage Δ 🤖
github.com/nvidia/nvsentinel/janitor 0.00% (ø)
github.com/nvidia/nvsentinel/janitor/pkg/controller 18.12% (+0.28%) 👍

Coverage by file

Changed files (no unit tests)

Changed File Coverage Δ Total Covered Missed 🤖
github.com/nvidia/nvsentinel/janitor/main.go 0.00% (ø) 1233 (+106) 0 1233 (+106)
github.com/nvidia/nvsentinel/janitor/pkg/controller/rebootnode_controller.go 17.81% (+0.48%) 1039 (+185) 185 (+37) 854 (+148) 👍

Please note that the "Total", "Covered", and "Missed" counts above refer to code statements instead of lines of code. The value in brackets refers to the test coverage of that file in the old version of the code.

@XRFXLP XRFXLP requested a review from jtschelling February 18, 2026 05:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant