mirror of
https://github.com/argoproj/argo-cd.git
synced 2026-02-20 01:28:45 +01:00
chore: update golangci-lint to v2.8.0 (#26354)
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
This commit is contained in:
4
.github/workflows/ci-build.yaml
vendored
4
.github/workflows/ci-build.yaml
vendored
@@ -110,8 +110,8 @@ jobs:
|
||||
- name: Run golangci-lint
|
||||
uses: golangci/golangci-lint-action@1e7e51e771db61008b38414a730f564565cf7c20 # v9.2.0
|
||||
with:
|
||||
# renovate: datasource=go packageName=github.com/golangci/golangci-lint versioning=regex:^v(?<major>\d+)\.(?<minor>\d+)\.(?<patch>\d+)?$
|
||||
version: v2.5.0
|
||||
# renovate: datasource=go packageName=github.com/golangci/golangci-lint/v2 versioning=regex:^v(?<major>\d+)\.(?<minor>\d+)\.(?<patch>\d+)?$
|
||||
version: v2.8.0
|
||||
args: --verbose
|
||||
|
||||
test-go:
|
||||
|
||||
@@ -89,7 +89,7 @@ func NewApplicationGetResourceCommand(clientOpts *argocdclient.ClientOptions) *c
|
||||
// Get manifests of resources
|
||||
// If resource name is "" find all resources of that kind
|
||||
var resources []unstructured.Unstructured
|
||||
var fetchedStr string
|
||||
var resourceNames []string
|
||||
for _, r := range tree.Nodes {
|
||||
if (resourceName != "" && r.Name != resourceName) || (group != "" && r.Group != group) || r.Kind != kind {
|
||||
continue
|
||||
@@ -119,14 +119,11 @@ func NewApplicationGetResourceCommand(clientOpts *argocdclient.ClientOptions) *c
|
||||
obj = filterFieldsFromObject(obj, filteredFields)
|
||||
}
|
||||
|
||||
fetchedStr += obj.GetName() + ", "
|
||||
resourceNames = append(resourceNames, obj.GetName())
|
||||
resources = append(resources, *obj)
|
||||
}
|
||||
fetchedStr := strings.Join(resourceNames, ", ")
|
||||
printManifests(&resources, len(filteredFields) > 0, resourceName == "", output)
|
||||
|
||||
if fetchedStr != "" {
|
||||
fetchedStr = strings.TrimSuffix(fetchedStr, ", ")
|
||||
}
|
||||
log.Infof("Resources '%s' fetched", fetchedStr)
|
||||
}
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/bin/bash
|
||||
set -eux -o pipefail
|
||||
|
||||
# renovate: datasource=go packageName=github.com/golangci/golangci-lint
|
||||
GOLANGCI_LINT_VERSION=2.5.0
|
||||
# renovate: datasource=go packageName=github.com/golangci/golangci-lint/v2
|
||||
GOLANGCI_LINT_VERSION=2.8.0
|
||||
|
||||
GO111MODULE=on go install "github.com/golangci/golangci-lint/v2/cmd/golangci-lint@v${GOLANGCI_LINT_VERSION}"
|
||||
|
||||
1
manifests/core-install-with-hydrator.yaml
generated
1
manifests/core-install-with-hydrator.yaml
generated
@@ -3191,6 +3191,7 @@ spec:
|
||||
observedAt:
|
||||
description: |-
|
||||
ObservedAt indicates when the application state was updated without querying latest git state
|
||||
|
||||
Deprecated: controller no longer updates ObservedAt field
|
||||
format: date-time
|
||||
type: string
|
||||
|
||||
1
manifests/core-install.yaml
generated
1
manifests/core-install.yaml
generated
@@ -3191,6 +3191,7 @@ spec:
|
||||
observedAt:
|
||||
description: |-
|
||||
ObservedAt indicates when the application state was updated without querying latest git state
|
||||
|
||||
Deprecated: controller no longer updates ObservedAt field
|
||||
format: date-time
|
||||
type: string
|
||||
|
||||
1
manifests/crds/application-crd.yaml
generated
1
manifests/crds/application-crd.yaml
generated
@@ -3190,6 +3190,7 @@ spec:
|
||||
observedAt:
|
||||
description: |-
|
||||
ObservedAt indicates when the application state was updated without querying latest git state
|
||||
|
||||
Deprecated: controller no longer updates ObservedAt field
|
||||
format: date-time
|
||||
type: string
|
||||
|
||||
1
manifests/ha/install-with-hydrator.yaml
generated
1
manifests/ha/install-with-hydrator.yaml
generated
@@ -3191,6 +3191,7 @@ spec:
|
||||
observedAt:
|
||||
description: |-
|
||||
ObservedAt indicates when the application state was updated without querying latest git state
|
||||
|
||||
Deprecated: controller no longer updates ObservedAt field
|
||||
format: date-time
|
||||
type: string
|
||||
|
||||
1
manifests/ha/install.yaml
generated
1
manifests/ha/install.yaml
generated
@@ -3191,6 +3191,7 @@ spec:
|
||||
observedAt:
|
||||
description: |-
|
||||
ObservedAt indicates when the application state was updated without querying latest git state
|
||||
|
||||
Deprecated: controller no longer updates ObservedAt field
|
||||
format: date-time
|
||||
type: string
|
||||
|
||||
1
manifests/install-with-hydrator.yaml
generated
1
manifests/install-with-hydrator.yaml
generated
@@ -3191,6 +3191,7 @@ spec:
|
||||
observedAt:
|
||||
description: |-
|
||||
ObservedAt indicates when the application state was updated without querying latest git state
|
||||
|
||||
Deprecated: controller no longer updates ObservedAt field
|
||||
format: date-time
|
||||
type: string
|
||||
|
||||
1
manifests/install.yaml
generated
1
manifests/install.yaml
generated
@@ -3191,6 +3191,7 @@ spec:
|
||||
observedAt:
|
||||
description: |-
|
||||
ObservedAt indicates when the application state was updated without querying latest git state
|
||||
|
||||
Deprecated: controller no longer updates ObservedAt field
|
||||
format: date-time
|
||||
type: string
|
||||
|
||||
@@ -714,6 +714,7 @@ message ApplicationStatus {
|
||||
optional OperationState operationState = 7;
|
||||
|
||||
// ObservedAt indicates when the application state was updated without querying latest git state
|
||||
//
|
||||
// Deprecated: controller no longer updates ObservedAt field
|
||||
optional .k8s.io.apimachinery.pkg.apis.meta.v1.Time observedAt = 8;
|
||||
|
||||
@@ -2059,6 +2060,7 @@ message ResourceDiff {
|
||||
optional string liveState = 6;
|
||||
|
||||
// Diff contains the JSON patch representing the difference between the live and target resource.
|
||||
//
|
||||
// Deprecated: Use NormalizedLiveState and PredictedLiveState instead to compute differences.
|
||||
optional string diff = 7;
|
||||
|
||||
|
||||
@@ -1193,6 +1193,7 @@ type ApplicationStatus struct {
|
||||
// OperationState contains information about any ongoing operations, such as a sync
|
||||
OperationState *OperationState `json:"operationState,omitempty" protobuf:"bytes,7,opt,name=operationState"`
|
||||
// ObservedAt indicates when the application state was updated without querying latest git state
|
||||
//
|
||||
// Deprecated: controller no longer updates ObservedAt field
|
||||
ObservedAt *metav1.Time `json:"observedAt,omitempty" protobuf:"bytes,8,opt,name=observedAt"`
|
||||
// SourceType specifies the type of this application
|
||||
@@ -2191,6 +2192,7 @@ type ResourceDiff struct {
|
||||
// LiveState contains the JSON-serialized resource manifest of the resource currently running in the cluster.
|
||||
LiveState string `json:"liveState,omitempty" protobuf:"bytes,6,opt,name=liveState"`
|
||||
// Diff contains the JSON patch representing the difference between the live and target resource.
|
||||
//
|
||||
// Deprecated: Use NormalizedLiveState and PredictedLiveState instead to compute differences.
|
||||
Diff string `json:"diff,omitempty" protobuf:"bytes,7,opt,name=diff"`
|
||||
// Hook indicates whether this resource is a hook resource (e.g., pre-sync or post-sync hooks).
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
"go"
|
||||
],
|
||||
"matchPackageNames": [
|
||||
"github.com/golangci/golangci-lint",
|
||||
"github.com/golangci/golangci-lint/v2",
|
||||
"github.com/vektra/mockery/v3"
|
||||
],
|
||||
"enabled": true
|
||||
|
||||
@@ -1004,7 +1004,7 @@ func TestNoAppEnumeration(t *testing.T) {
|
||||
assert.EqualError(t, err, "rpc error: code = NotFound desc = applications.argoproj.io \"doest-not-exist\" not found", "when the request specifies a project, we can return the standard k8s error message")
|
||||
})
|
||||
|
||||
//nolint:staticcheck,SA1019 // RunResourceAction is deprecated, but we still need to support it for backward compatibility.
|
||||
//nolint:staticcheck // SA1019: RunResourceAction is deprecated, but we still need to support it for backward compatibility.
|
||||
t.Run("RunResourceAction", func(t *testing.T) {
|
||||
_, err := appServer.RunResourceAction(adminCtx, &application.ResourceActionRunRequest{Name: ptr.To("test"), ResourceName: ptr.To("test"), Group: ptr.To("apps"), Kind: ptr.To("Deployment"), Namespace: ptr.To("test"), Action: ptr.To("restart")})
|
||||
require.NoError(t, err)
|
||||
|
||||
@@ -127,6 +127,7 @@ func (s *Server) getConnectionState(ctx context.Context, url string, project str
|
||||
}
|
||||
|
||||
// List returns list of repositories
|
||||
//
|
||||
// Deprecated: Use ListRepositories instead
|
||||
func (s *Server) List(ctx context.Context, q *repositorypkg.RepoQuery) (*v1alpha1.RepositoryList, error) {
|
||||
return s.ListRepositories(ctx, q)
|
||||
@@ -425,6 +426,7 @@ func (s *Server) GetHelmCharts(ctx context.Context, q *repositorypkg.RepoQuery)
|
||||
}
|
||||
|
||||
// Create creates a repository or repository credential set
|
||||
//
|
||||
// Deprecated: Use CreateRepository() instead
|
||||
func (s *Server) Create(ctx context.Context, q *repositorypkg.RepoCreateRequest) (*v1alpha1.Repository, error) {
|
||||
return s.CreateRepository(ctx, q)
|
||||
@@ -535,6 +537,7 @@ func (s *Server) CreateWriteRepository(ctx context.Context, q *repositorypkg.Rep
|
||||
}
|
||||
|
||||
// Update updates a repository or credential set
|
||||
//
|
||||
// Deprecated: Use UpdateRepository() instead
|
||||
func (s *Server) Update(ctx context.Context, q *repositorypkg.RepoUpdateRequest) (*v1alpha1.Repository, error) {
|
||||
return s.UpdateRepository(ctx, q)
|
||||
@@ -591,6 +594,7 @@ func (s *Server) UpdateWriteRepository(ctx context.Context, q *repositorypkg.Rep
|
||||
}
|
||||
|
||||
// Delete removes a repository from the configuration
|
||||
//
|
||||
// Deprecated: Use DeleteRepository() instead
|
||||
func (s *Server) Delete(ctx context.Context, q *repositorypkg.RepoQuery) (*repositorypkg.RepoResponse, error) {
|
||||
return s.DeleteRepository(ctx, q)
|
||||
|
||||
Reference in New Issue
Block a user