Skip to content

Commit

Permalink
Fix golangci-lint reported issue in the operator and bump the action …
Browse files Browse the repository at this point in the history
…to v6 (#1387)
  • Loading branch information
adejanovski authored Aug 21, 2024
1 parent 779d7b3 commit d60620a
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test_and_build_image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
go-version-file: 'go.mod'
cache: true
- name: golangci-lint
uses: golangci/golangci-lint-action@v4
uses: golangci/golangci-lint-action@v6
with:
version: latest
# GHA requires longer timeout
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG/CHANGELOG-1.18.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ When cutting a new release, update the `unreleased` heading to the tag being gen
## unreleased

* [CHANGE] Update cassandra-medusa to 0.22.2
* [BUGFIX] Fix golangci-lint reported issue in the operator and bump the action to v6

## v1.18.0 - 2024-07-24

Expand Down
3 changes: 2 additions & 1 deletion controllers/control/k8ssandratask_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ import (
const (
k8ssandraTaskFinalizer = "control.k8ssandra.io/finalizer"
defaultTTL = time.Duration(86400) * time.Second
invalidSpecErrorFormat = "invalid spec: %s"
)

var (
Expand Down Expand Up @@ -149,7 +150,7 @@ func (r *K8ssandraTaskReconciler) Reconcile(ctx context.Context, req ctrl.Reques
return r.reportInvalidSpec(ctx, kTask, "unknown K8ssandraCluster %s.%s", kcKey.Namespace, kcKey.Name)
}
if dcs, err := filterDcs(kc, kTask.Spec.Datacenters); err != nil {
return r.reportInvalidSpec(ctx, kTask, err.Error())
return r.reportInvalidSpec(ctx, kTask, invalidSpecErrorFormat, err.Error())
} else {
for _, dc := range dcs {
dcNamespace := utils.FirstNonEmptyString(dc.Meta.Namespace, kc.Namespace)
Expand Down

0 comments on commit d60620a

Please sign in to comment.