Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(deps): update golangci/golangci-lint docker tag to v1.56.1 #2290

Merged
merged 1 commit into from
Feb 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/go.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
uses: golangci/golangci-lint-action@3cfe3a4abbb849e10058ce4af15d205b6da42804 # v4.0.0
with:
# renovate: datasource=docker depName=golangci/golangci-lint
version: v1.55.2
version: v1.56.1
args: --config=.golangci.yml --verbose
skip-cache: true

Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ GO_IMAGE_VERSION = 1.22.0-alpine3.19
GO_IMAGE_SHA = sha256:8e96e6cff6a388c2f70f5f662b64120941fcd7d4b89d62fec87520323a316bd9

# renovate: datasource=docker depName=golangci/golangci-lint
GOLANGCILINT_WANT_VERSION = v1.55.2
GOLANGCILINT_IMAGE_SHA = sha256:e699df940be1810b08ba6ec050bfc34cc1931027283b5a7f607fb6a67b503876
GOLANGCILINT_WANT_VERSION = v1.56.1
GOLANGCILINT_IMAGE_SHA = sha256:30faf70f689bfce7be639f79076c689db45df48549d43ad265ce965612a6bebf
GOLANGCILINT_VERSION = $(shell golangci-lint version --format short 2>/dev/null)

$(TARGET):
Expand Down
36 changes: 18 additions & 18 deletions connectivity/suite.go
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ func Run(ctx context.Context, ct *check.ConnectivityTest, extra Hooks) error {
WithScenarios(
tests.PodToPod(),
).
WithExpectations(func(a *check.Action) (egress, ingress check.Result) {
WithExpectations(func(_ *check.Action) (egress, ingress check.Result) {
return check.ResultOK.ExpectMetricsIncrease(ct.CiliumAgentMetrics(), "cilium_forward_count_total"),
check.ResultOK.ExpectMetricsIncrease(ct.CiliumAgentMetrics(), "cilium_forward_count_total")
})
Expand Down Expand Up @@ -402,7 +402,7 @@ func Run(ctx context.Context, ct *check.ConnectivityTest, extra Hooks) error {
tests.PodToPod(),
tests.PodToPodWithEndpoints(),
).
WithExpectations(func(a *check.Action) (egress, ingress check.Result) {
WithExpectations(func(_ *check.Action) (egress, ingress check.Result) {
return check.ResultDefaultDenyEgressDrop, check.ResultNone
})

Expand All @@ -412,7 +412,7 @@ func Run(ctx context.Context, ct *check.ConnectivityTest, extra Hooks) error {
tests.PodToPod(),
tests.PodToPodWithEndpoints(),
).
WithExpectations(func(a *check.Action) (egress, ingress check.Result) {
WithExpectations(func(_ *check.Action) (egress, ingress check.Result) {
return check.ResultDefaultDenyEgressDrop, check.ResultNone
})

Expand All @@ -422,7 +422,7 @@ func Run(ctx context.Context, ct *check.ConnectivityTest, extra Hooks) error {
tests.PodToPod(),
tests.PodToCIDR(),
).
WithExpectations(func(a *check.Action) (egress, ingress check.Result) {
WithExpectations(func(_ *check.Action) (egress, ingress check.Result) {
return check.ResultPolicyDenyEgressDrop, check.ResultNone
})

Expand All @@ -433,7 +433,7 @@ func Run(ctx context.Context, ct *check.ConnectivityTest, extra Hooks) error {
// https://github.com/cilium/cilium/blob/88c4dddede2a3b5b9a7339c1316a0dedd7229a26/pkg/policy/api/entity.go#L126
tests.PodToPod(tests.WithDestinationLabelsOption(map[string]string{"name": "echo-same-node"})),
).
WithExpectations(func(a *check.Action) (egress, ingress check.Result) {
WithExpectations(func(_ *check.Action) (egress, ingress check.Result) {
return check.ResultOK, check.ResultOK
})

Expand All @@ -442,7 +442,7 @@ func Run(ctx context.Context, ct *check.ConnectivityTest, extra Hooks) error {
WithScenarios(
tests.PodToPod(tests.WithDestinationLabelsOption(map[string]string{"name": "echo-other-node"})),
).
WithExpectations(func(a *check.Action) (egress, ingress check.Result) {
WithExpectations(func(_ *check.Action) (egress, ingress check.Result) {
return check.ResultDefaultDenyEgressDrop, check.ResultNone
})
}
Expand All @@ -452,7 +452,7 @@ func Run(ctx context.Context, ct *check.ConnectivityTest, extra Hooks) error {
WithScenarios(
tests.PodToHost(),
).
WithExpectations(func(a *check.Action) (egress, ingress check.Result) {
WithExpectations(func(_ *check.Action) (egress, ingress check.Result) {
return check.ResultOK, check.ResultNone
})

Expand Down Expand Up @@ -611,7 +611,7 @@ func Run(ctx context.Context, ct *check.ConnectivityTest, extra Hooks) error {
WithScenarios(
tests.FromCIDRToPod(),
).
WithExpectations(func(a *check.Action) (egress, ingress check.Result) {
WithExpectations(func(_ *check.Action) (egress, ingress check.Result) {
return check.ResultOK, check.ResultNone
})
}
Expand Down Expand Up @@ -993,7 +993,7 @@ func Run(ctx context.Context, ct *check.ConnectivityTest, extra Hooks) error {
WithScenarios(
tests.PodToWorldWithTLSIntercept(),
).
WithExpectations(func(a *check.Action) (egress, ingress check.Result) {
WithExpectations(func(_ *check.Action) (egress, ingress check.Result) {
return check.ResultDropCurlHTTPError, check.ResultNone
})

Expand All @@ -1007,7 +1007,7 @@ func Run(ctx context.Context, ct *check.ConnectivityTest, extra Hooks) error {
WithScenarios(
tests.PodToWorldWithTLSIntercept("-H", "X-Very-Secret-Token: 42"),
).
WithExpectations(func(a *check.Action) (egress, ingress check.Result) {
WithExpectations(func(_ *check.Action) (egress, ingress check.Result) {
return check.ResultOK, check.ResultNone
})

Expand Down Expand Up @@ -1044,7 +1044,7 @@ func Run(ctx context.Context, ct *check.ConnectivityTest, extra Hooks) error {
WithScenarios(
tests.PodToPod(),
).
WithExpectations(func(a *check.Action) (egress, ingress check.Result) {
WithExpectations(func(_ *check.Action) (egress, ingress check.Result) {
return check.ResultDropCurlTimeout, check.ResultDropAuthRequired
})

Expand All @@ -1068,7 +1068,7 @@ func Run(ctx context.Context, ct *check.ConnectivityTest, extra Hooks) error {
WithScenarios(
tests.PodToIngress(),
).
WithExpectations(func(a *check.Action) (egress check.Result, ingress check.Result) {
WithExpectations(func(_ *check.Action) (egress check.Result, ingress check.Result) {
return check.ResultDefaultDenyEgressDrop, check.ResultNone
})

Expand All @@ -1078,7 +1078,7 @@ func Run(ctx context.Context, ct *check.ConnectivityTest, extra Hooks) error {
WithScenarios(
tests.PodToIngress(),
).
WithExpectations(func(a *check.Action) (egress check.Result, ingress check.Result) {
WithExpectations(func(_ *check.Action) (egress check.Result, ingress check.Result) {
return check.ResultDefaultDenyEgressDrop, check.ResultNone
})

Expand All @@ -1088,7 +1088,7 @@ func Run(ctx context.Context, ct *check.ConnectivityTest, extra Hooks) error {
WithScenarios(
tests.PodToIngress(),
).
WithExpectations(func(a *check.Action) (egress check.Result, ingress check.Result) {
WithExpectations(func(_ *check.Action) (egress check.Result, ingress check.Result) {
return check.ResultDefaultDenyEgressDrop, check.ResultNone
})

Expand Down Expand Up @@ -1116,7 +1116,7 @@ func Run(ctx context.Context, ct *check.ConnectivityTest, extra Hooks) error {
WithScenarios(
tests.OutsideToIngressService(),
).
WithExpectations(func(a *check.Action) (egress check.Result, ingress check.Result) {
WithExpectations(func(_ *check.Action) (egress check.Result, ingress check.Result) {
return check.ResultDefaultDenyEgressDrop, check.ResultNone
})

Expand All @@ -1128,7 +1128,7 @@ func Run(ctx context.Context, ct *check.ConnectivityTest, extra Hooks) error {
WithScenarios(
tests.OutsideToIngressService(),
).
WithExpectations(func(a *check.Action) (egress check.Result, ingress check.Result) {
WithExpectations(func(_ *check.Action) (egress check.Result, ingress check.Result) {
return check.ResultDefaultDenyEgressDrop, check.ResultNone
})

Expand All @@ -1140,7 +1140,7 @@ func Run(ctx context.Context, ct *check.ConnectivityTest, extra Hooks) error {
WithScenarios(
tests.OutsideToIngressService(),
).
WithExpectations(func(a *check.Action) (egress check.Result, ingress check.Result) {
WithExpectations(func(_ *check.Action) (egress check.Result, ingress check.Result) {
return check.ResultDefaultDenyEgressDrop, check.ResultNone
})

Expand All @@ -1151,7 +1151,7 @@ func Run(ctx context.Context, ct *check.ConnectivityTest, extra Hooks) error {
tests.PodToPod(), // connects to other Pods directly, no DNS
tests.PodToWorld(), // resolves set domain-name defaults to one.one.one.one
).
WithExpectations(func(a *check.Action) (egress check.Result, ingress check.Result) {
WithExpectations(func(_ *check.Action) (egress check.Result, ingress check.Result) {
return check.ResultDropCurlTimeout, check.ResultNone
})

Expand Down
2 changes: 1 addition & 1 deletion connectivity/tests/health.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ func (s *ciliumHealth) Name() string {
func (s *ciliumHealth) Run(ctx context.Context, t *check.Test) {
for name, pod := range t.Context().CiliumPods() {
pod := pod
t.NewGenericAction(s, name).Run(func(a *check.Action) {
t.NewGenericAction(s, name).Run(func(_ *check.Action) {
runHealthProbe(ctx, t, &pod)
})
}
Expand Down
4 changes: 2 additions & 2 deletions internal/cli/cmd/bgp.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ func newCmdBgpPeers() *cobra.Command {
Aliases: []string{"neighbors"},
Short: "Lists BGP peering state",
Long: "This command lists the BGP state from all nodes in the cluster - requires cilium >= v1.13.2",
RunE: func(cmd *cobra.Command, args []string) error {
RunE: func(_ *cobra.Command, _ []string) error {
params.CiliumNamespace = namespace

s := bgp.NewStatus(k8sClient, params)
Expand Down Expand Up @@ -72,7 +72,7 @@ func newCmdBgpRoutes() *cobra.Command {
Get IPv4 unicast routes advertised to a specific peer:
cilium bgp routes advertised ipv4 unicast peer 10.0.0.1`,

RunE: func(cmd *cobra.Command, args []string) error {
RunE: func(_ *cobra.Command, args []string) error {
params.CiliumNamespace = namespace

s := bgp.NewStatus(k8sClient, params)
Expand Down
26 changes: 13 additions & 13 deletions internal/cli/cmd/clustermesh.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ func newCmdClusterMeshEnable() *cobra.Command {
Use: "enable",
Short: "Enable ClusterMesh ability in a cluster",
Long: ``,
RunE: func(cmd *cobra.Command, args []string) error {
RunE: func(_ *cobra.Command, _ []string) error {
params.Namespace = namespace

cm := clustermesh.NewK8sClusterMesh(k8sClient, params)
Expand Down Expand Up @@ -88,7 +88,7 @@ func newCmdClusterMeshDisable() *cobra.Command {
Use: "disable",
Short: "Disable ClusterMesh ability in a cluster",
Long: ``,
RunE: func(cmd *cobra.Command, args []string) error {
RunE: func(_ *cobra.Command, _ []string) error {
params.Namespace = namespace

cm := clustermesh.NewK8sClusterMesh(k8sClient, params)
Expand All @@ -111,7 +111,7 @@ func newCmdClusterMeshConnect() *cobra.Command {
Use: "connect",
Short: "Connect to a remote cluster",
Long: ``,
RunE: func(cmd *cobra.Command, args []string) error {
RunE: func(_ *cobra.Command, _ []string) error {
params.Namespace = namespace

cm := clustermesh.NewK8sClusterMesh(k8sClient, params)
Expand All @@ -136,7 +136,7 @@ func newCmdClusterMeshDisconnect() *cobra.Command {
Use: "disconnect",
Short: "Disconnect from a remote cluster",
Long: ``,
RunE: func(cmd *cobra.Command, args []string) error {
RunE: func(_ *cobra.Command, _ []string) error {
params.Namespace = namespace
cm := clustermesh.NewK8sClusterMesh(k8sClient, params)
if err := cm.Disconnect(context.Background()); err != nil {
Expand All @@ -160,7 +160,7 @@ func newCmdClusterMeshStatus() *cobra.Command {
Use: "status",
Short: "Show status of ClusterMesh",
Long: ``,
RunE: func(cmd *cobra.Command, args []string) error {
RunE: func(_ *cobra.Command, _ []string) error {
params.Namespace = namespace

if params.Output == status.OutputJSON {
Expand Down Expand Up @@ -227,7 +227,7 @@ func newCmdExternalWorkloadCreate() *cobra.Command {
Use: "create <name...>",
Short: "Create new external workloads",
Long: ``,
RunE: func(cmd *cobra.Command, args []string) error {
RunE: func(_ *cobra.Command, args []string) error {
params.Namespace = namespace

if labels != "" {
Expand Down Expand Up @@ -263,7 +263,7 @@ func newCmdExternalWorkloadDelete() *cobra.Command {
Use: "delete <name...>",
Short: "Delete named external workloads",
Long: ``,
RunE: func(cmd *cobra.Command, args []string) error {
RunE: func(_ *cobra.Command, args []string) error {
cm := clustermesh.NewK8sClusterMesh(k8sClient, params)
if err := cm.DeleteExternalWorkload(context.Background(), args); err != nil {
fatalf("Unable to remove external workloads: %s", err)
Expand All @@ -286,7 +286,7 @@ func newCmdExternalWorkloadInstall() *cobra.Command {
Use: "install [output-file]",
Short: "Creates a shell script to install external workloads",
Long: ``,
RunE: func(cmd *cobra.Command, args []string) error {
RunE: func(_ *cobra.Command, args []string) error {
params.Namespace = namespace

cm := clustermesh.NewK8sClusterMesh(k8sClient, params)
Expand Down Expand Up @@ -328,7 +328,7 @@ func newCmdExternalWorkloadStatus() *cobra.Command {
Use: "status [name...]",
Short: "Show status of external workloads",
Long: ``,
RunE: func(cmd *cobra.Command, args []string) error {
RunE: func(_ *cobra.Command, args []string) error {
params.Namespace = namespace

cm := clustermesh.NewK8sClusterMesh(k8sClient, params)
Expand All @@ -353,7 +353,7 @@ func newCmdClusterMeshEnableWithHelm() *cobra.Command {
Use: "enable",
Short: "Enable ClusterMesh ability in a cluster using Helm",
Long: ``,
RunE: func(cmd *cobra.Command, args []string) error {
RunE: func(_ *cobra.Command, _ []string) error {
params.Namespace = namespace
ctx := context.Background()
if err := clustermesh.EnableWithHelm(ctx, k8sClient, params); err != nil {
Expand All @@ -379,7 +379,7 @@ func newCmdClusterMeshDisableWithHelm() *cobra.Command {
Use: "disable",
Short: "Disable ClusterMesh ability in a cluster using Helm",
Long: ``,
RunE: func(cmd *cobra.Command, args []string) error {
RunE: func(_ *cobra.Command, _ []string) error {
params.Namespace = namespace
ctx := context.Background()
if err := clustermesh.DisableWithHelm(ctx, k8sClient, params); err != nil {
Expand All @@ -401,7 +401,7 @@ func newCmdClusterMeshConnectWithHelm() *cobra.Command {
Use: "connect",
Short: "Connect to a remote cluster",
Long: ``,
RunE: func(cmd *cobra.Command, args []string) error {
RunE: func(_ *cobra.Command, _ []string) error {
params.Namespace = namespace
cm := clustermesh.NewK8sClusterMesh(k8sClient, params)
if err := cm.ConnectWithHelm(context.Background()); err != nil {
Expand All @@ -424,7 +424,7 @@ func newCmdClusterMeshDisconnectWithHelm() *cobra.Command {
cmd := &cobra.Command{
Use: "disconnect",
Short: "Disconnect from a remote cluster",
Run: func(cmd *cobra.Command, args []string) {
Run: func(_ *cobra.Command, _ []string) {
params.Namespace = namespace
cm := clustermesh.NewK8sClusterMesh(k8sClient, params)
if err := cm.DisconnectWithHelm(context.Background()); err != nil {
Expand Down
2 changes: 1 addition & 1 deletion internal/cli/cmd/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ func NewCiliumCommand(hooks Hooks) *cobra.Command {
k8sClient = c
return nil
},
Run: func(cmd *cobra.Command, args []string) {
Run: func(cmd *cobra.Command, _ []string) {
cmd.Help()
},
Use: "cilium",
Expand Down
6 changes: 3 additions & 3 deletions internal/cli/cmd/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ func newCmdConfigView() *cobra.Command {
Use: "view",
Short: "View current configuration",
Long: ``,
RunE: func(cmd *cobra.Command, args []string) error {
RunE: func(_ *cobra.Command, _ []string) error {
params.Namespace = namespace

check := config.NewK8sConfig(k8sClient, params)
Expand All @@ -64,7 +64,7 @@ func newCmdConfigSet() *cobra.Command {
Short: "Set a key/value pair in the configuration",
Long: ``,
Args: cobra.ExactArgs(2),
RunE: func(cmd *cobra.Command, args []string) error {
RunE: func(_ *cobra.Command, args []string) error {
params.Namespace = namespace

check := config.NewK8sConfig(k8sClient, params)
Expand All @@ -89,7 +89,7 @@ func newCmdConfigDelete() *cobra.Command {
Short: "Delete a key in the configuration",
Long: ``,
Args: cobra.ExactArgs(1),
RunE: func(cmd *cobra.Command, args []string) error {
RunE: func(_ *cobra.Command, args []string) error {
params.Namespace = namespace

check := config.NewK8sConfig(k8sClient, params)
Expand Down
4 changes: 2 additions & 2 deletions internal/cli/cmd/connectivity.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ var params = check.Parameters{
var tests []string

func RunE(hooks Hooks) func(cmd *cobra.Command, args []string) error {
return func(cmd *cobra.Command, args []string) error {
return func(cmd *cobra.Command, _ []string) error {
params.CiliumNamespace = namespace

for _, test := range tests {
Expand Down Expand Up @@ -209,7 +209,7 @@ func newCmdConnectivityPerf(hooks Hooks) *cobra.Command {
Use: "perf",
Short: "Test network performance",
Long: ``,
PreRun: func(cmd *cobra.Command, args []string) {
PreRun: func(_ *cobra.Command, _ []string) {
// This is a bit of hack that allows us to override default values
// of these parameters that are not visible in perf subcommand options
// as we can't have different defaults specified in test and perf subcommands
Expand Down
2 changes: 1 addition & 1 deletion internal/cli/cmd/context.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (

func newCmdContext() *cobra.Command {
cmd := &cobra.Command{
Run: func(cmd *cobra.Command, args []string) {
Run: func(_ *cobra.Command, _ []string) {
if contextName == "" {
contextName = k8sClient.RawConfig.CurrentContext
}
Expand Down
Loading
Loading