From a5717b1658cf9373eb910420dbb799ed3bcd2951 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 4 May 2026 16:01:21 +0200 Subject: [PATCH] chore(deps): update golangci/golangci-lint docker tag to v2.12.0 (#881) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This PR contains the following updates: | Package | Update | Change | |---|---|---| | [golangci/golangci-lint](https://redirect.github.com/golangci/golangci-lint) | minor | `v2.11.4` → `v2.12.0` | --- ### Release Notes
golangci/golangci-lint (golangci/golangci-lint) ### [`v2.12.0`](https://redirect.github.com/golangci/golangci-lint/blob/HEAD/CHANGELOG.md#v2120) [Compare Source](https://redirect.github.com/golangci/golangci-lint/compare/v2.11.4...v2.12.0) *Released on 2026-05-01* 1. New linters - Add `clickhouselint` linter 2. Linters new features or changes - `dupl`: from [`f665c8d`](https://redirect.github.com/golangci/golangci-lint/commit/f665c8d69b32) to [`c99c5cf`](https://redirect.github.com/golangci/golangci-lint/commit/c99c5cf5c202) (extended detection) - `funcorder`: from 0.5.0 to 0.6.0 (new option: `function`) - `goconst`: add an option to ignore strings from tests - `goconst`: from 1.8.2 to 1.10.0 (extended detection) - `gomodguard_v2`: from 1.4.1 to 2.1.0 (major version with new configuration) - `gosec`: from [`619ce21`](https://redirect.github.com/golangci/golangci-lint/commit/619ce2117e08) to 2.26.1 (new checks: `G124`, `G708`, `G709`, `G710`) - `govet`: add `inline` analyzer - `makezero`: from 2.1.0 to 2.2.1 (support slice type aliases) - `paralleltest`: expose `checkcleanup` option - `sloglint`: from 0.11.1 to 0.12.0 (new options: `allowed-keys`, `custom-funcs`) - `wsl_v5`: from 5.6.0 to 5.8.0 (new option: `cuddle-max-statements`; new checks: `after-decl`, `after-defer`, `after-expr`, `after-go`, `cuddle-group`) 3. Linters bug fixes - `forbidigo`: from 2.3.0 to 2.3.1 - `godot`: from 1.5.4 to 1.5.6 - `govet-modernize`: from 0.43.0 to 0.44.0 - `ireturn`: from 0.4.0 to 0.4.1 - `rowserrcheck`: from 1.1.1 to [`c5f79b8`](https://redirect.github.com/golangci/golangci-lint/commit/c5f79b8) 4. Misc. - Decrease cache entropy - Embed the JSON schema in the binary - Filter env vars when cloning the repository with the `custom` command
--- ### Configuration 📅 **Schedule**: (UTC) - Branch creation - At any time (no schedule defined) - Automerge - At any time (no schedule defined) 🚦 **Automerge**: Enabled. ♻ **Rebasing**: Never, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR was generated by [Mend Renovate](https://mend.io/renovate/). View the [repository job log](https://developer.mend.io/github/cloudnative-pg/plugin-barman-cloud). --------- Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Signed-off-by: Leonardo Cecchi Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Leonardo Cecchi --- Taskfile.yml | 2 +- internal/cnpgi/operator/lifecycle.go | 7 ++++++- internal/cnpgi/operator/lifecycle_test.go | 4 ++-- internal/cnpgi/operator/specs/role.go | 2 ++ 4 files changed, 11 insertions(+), 4 deletions(-) diff --git a/Taskfile.yml b/Taskfile.yml index 6a4e05c..d530484 100644 --- a/Taskfile.yml +++ b/Taskfile.yml @@ -23,7 +23,7 @@ tasks: # renovate: datasource=git-refs depName=golangci-lint lookupName=https://github.com/sagikazarmark/daggerverse currentValue=main DAGGER_GOLANGCI_LINT_SHA: 5f2dc1bd1014cf79757f4605f2f731ed962d4da7 # renovate: datasource=docker depName=golangci/golangci-lint versioning=semver - GOLANGCI_LINT_VERSION: v2.11.4 + GOLANGCI_LINT_VERSION: v2.12.0 cmds: - > GITHUB_REF= dagger -sc "github.com/sagikazarmark/daggerverse/golangci-lint@${DAGGER_GOLANGCI_LINT_SHA} diff --git a/internal/cnpgi/operator/lifecycle.go b/internal/cnpgi/operator/lifecycle.go index 8a0bbb5..b25af55 100644 --- a/internal/cnpgi/operator/lifecycle.go +++ b/internal/cnpgi/operator/lifecycle.go @@ -41,6 +41,9 @@ import ( "github.com/cloudnative-pg/plugin-barman-cloud/internal/cnpgi/operator/config" ) +// fullRecoveryJobName is the name of the restore job. +const fullRecoveryJobName = "full-recovery" + // LifecycleImplementation is the implementation of the lifecycle handler type LifecycleImplementation struct { lifecycle.UnimplementedOperatorLifecycleServer @@ -48,6 +51,8 @@ type LifecycleImplementation struct { } // GetCapabilities exposes the lifecycle capabilities +// +//nolint:goconst func (impl LifecycleImplementation) GetCapabilities( _ context.Context, _ *lifecycle.OperatorLifecycleCapabilitiesRequest, @@ -186,7 +191,7 @@ func reconcileJob( contextLogger.Debug("starting job reconciliation") jobRole := getCNPGJobRole(&job) - if jobRole != "full-recovery" && + if jobRole != fullRecoveryJobName && jobRole != "snapshot-recovery" { contextLogger.Debug("job is not a recovery job, skipping") return nil, nil diff --git a/internal/cnpgi/operator/lifecycle_test.go b/internal/cnpgi/operator/lifecycle_test.go index 9d70a84..1d76bf7 100644 --- a/internal/cnpgi/operator/lifecycle_test.go +++ b/internal/cnpgi/operator/lifecycle_test.go @@ -139,10 +139,10 @@ var _ = Describe("LifecycleImplementation", func() { Spec: batchv1.JobSpec{Template: corev1.PodTemplateSpec{ ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{ - utils.JobRoleLabelName: "full-recovery", + utils.JobRoleLabelName: fullRecoveryJobName, }, }, - Spec: corev1.PodSpec{Containers: []corev1.Container{{Name: "full-recovery"}}}, + Spec: corev1.PodSpec{Containers: []corev1.Container{{Name: fullRecoveryJobName}}}, }}, } jobJSON, _ := json.Marshal(job) diff --git a/internal/cnpgi/operator/specs/role.go b/internal/cnpgi/operator/specs/role.go index 9d61a7b..a53278d 100644 --- a/internal/cnpgi/operator/specs/role.go +++ b/internal/cnpgi/operator/specs/role.go @@ -47,6 +47,8 @@ func BuildRole( } // BuildRoleRules builds the RBAC PolicyRules for the given ObjectStores. +// +//nolint:goconst func BuildRoleRules(barmanObjects []barmancloudv1.ObjectStore) []rbacv1.PolicyRule { secretsSet := stringset.New() barmanObjectsSet := stringset.New()