[hermes] ananke: go:S1192 #142
Loading…
x
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
SonarQube reports go:S1192 in
internal/cluster/orchestrator_longhorn_reconcile.go. The build is green; this is a standing finding, not a failure.What is wrong
The namespace string literal "longhorn-system" is duplicated across three kubectl invocations (queryLonghornNodes, queryLonghornManagerDaemonSet, and longhornManagerPodsByNode), so a rename or typo fix would have to touch every occurrence. Sonar rule go:S1192 asks for a single named constant instead.
Ariadne opened no pull request for it: no automated patch was possible for this finding.
Facts
internal/cluster/orchestrator_longhorn_reconcile.go:136)Suggested fix (not applied)
Hermes could not open a pull request for this, so the change below was not written, validated, or pushed anywhere. It is a starting point for whoever picks this up, not a reviewed patch.
internal/cluster/orchestrator_longhorn_reconcile.go— Introduce a package-level constant for the Longhorn namespace and use it in all three kubectl calls. This removes the triplicated literal without changing behaviour: the same string is still passed as the -n argument. Add the constant after the import block, then replace each "-n", "longhorn-system" occurrence with "-n", longhornNamespace.Links
/api/admin/audit/events, event typeshermes_autotriage_incidentandhermes_autotriage_diagnosis.Filed automatically by Ariadne from a Hermes Agent diagnosis (run run_042b9c0f7a31476791b5c9daa8d05a51). Hermes has no write access to this repository; no files or infrastructure were changed.