Skip to content

Commit 14dc7bd

Browse files
Bump k8s v0.32 (#451)
* build(deps): bump the k8s group across 1 directory with 3 updates Bumps the k8s group with 3 updates in the / directory: [k8s.io/apimachinery](https://github.com/kubernetes/apimachinery), [k8s.io/client-go](https://github.com/kubernetes/client-go) and [sigs.k8s.io/kind](https://github.com/kubernetes-sigs/kind). Updates `k8s.io/apimachinery` from 0.31.3 to 0.32.0 - [Commits](kubernetes/apimachinery@v0.31.3...v0.32.0) Updates `k8s.io/client-go` from 0.31.3 to 0.32.0 - [Changelog](https://github.com/kubernetes/client-go/blob/master/CHANGELOG.md) - [Commits](kubernetes/client-go@v0.31.3...v0.32.0) Updates `sigs.k8s.io/kind` from 0.25.0 to 0.26.0 - [Release notes](https://github.com/kubernetes-sigs/kind/releases) - [Commits](kubernetes-sigs/kind@v0.25.0...v0.26.0) --- updated-dependencies: - dependency-name: k8s.io/apimachinery dependency-type: direct:production update-type: version-update:semver-minor dependency-group: k8s - dependency-name: k8s.io/client-go dependency-type: direct:production update-type: version-update:semver-minor dependency-group: k8s - dependency-name: sigs.k8s.io/kind dependency-type: direct:production update-type: version-update:semver-minor dependency-group: k8s ... Signed-off-by: dependabot[bot] <[email protected]> * bumb go version in go.mod Signed-off-by: Pablo Chacin <[email protected]> * update golang-ci and fix linting issues Signed-off-by: Pablo Chacin <[email protected]> * increase lint timeout Signed-off-by: Pablo Chacin <[email protected]> --------- Signed-off-by: dependabot[bot] <[email protected]> Signed-off-by: Pablo Chacin <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
1 parent 65f5244 commit 14dc7bd

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+100
-203
lines changed

.github/workflows/ci.yml

+1
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ jobs:
8585
uses: golangci/golangci-lint-action@v6
8686
with:
8787
version: ${{ env.LINT_VERSION }}
88+
args: --timeout=10m
8889

8990
codespell:
9091
name: Codespell

.golangci.yml

+4-14
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# v1.55.2
1+
# v1.63.2
22
# Please don't remove the first line. It is used in CI to determine the golangci version
33
run:
44
deadline: 5m
@@ -69,24 +69,19 @@ linters-settings:
6969
linters:
7070
enable-all: true
7171
disable:
72+
- mnd # disabled because it's too strict and doesn't provide much value
7273
- noctx # too many false positives when making simple http requests in tests
73-
- exhaustivestruct
7474
- exhaustruct
7575
- gci
7676
- gochecknoinits
7777
- gocyclo # replaced by cyclop since it also calculates the package complexity
7878
- godot
7979
- godox
80-
- goerr113 # most of the errors here are meant for humans
80+
- err113 # most of the errors here are meant for humans
8181
- goheader
82-
- golint # this linter is deprecated
83-
- gomnd
8482
- gomodguard
85-
- interfacer # deprecated
8683
- ireturn
87-
- maligned # replaced by govet 'fieldalignment'
8884
- nlreturn
89-
- scopelint # deprecated, replaced by exportloopref
9085
- tagliatelle
9186
- testpackage
9287
- thelper
@@ -97,14 +92,9 @@ linters:
9792
- usestdlibvars
9893
- nosprintfhostport
9994
- nonamedreturns
100-
# Deprecated linters as of 1.53.3
101-
- structcheck
102-
- varcheck
103-
- deadcode
104-
- ifshort
105-
- nosnakecase
10695
- depguard # Dependency whitelist, needs to be configured
10796
- inamedparam # Fails if interfaces do not have named params. Not in our code style.
10897
- perfsprint # Suggests using strconv.* instead of fmt.* for printing numbers. Not very practical.
10998
- protogetter # Complains when code reads var.Something if var.GetSomething() exists. Not useful.
99+
- exportloopref
110100
fast: false

cmd/agent/commands/cleanup.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ func BuiltCleanupCmd(env runtime.Environment) *cobra.Command {
1212
cmd := &cobra.Command{
1313
Use: "cleanup",
1414
Short: "stops any ongoing fault injection and cleans resources",
15-
RunE: func(cmd *cobra.Command, args []string) error {
15+
RunE: func(cmd *cobra.Command, args []string) error { //nolint:revive
1616
runningProcess := env.Lock().Owner()
1717
// no instance is currently running
1818
if runningProcess == -1 {

cmd/agent/commands/grpc.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ func BuildGrpcCmd(env runtime.Environment, config *agent.Config) *cobra.Command
9393
cmd.Flags().DurationVarP(&duration, "duration", "d", 0, "duration of the disruptions")
9494
cmd.Flags().DurationVarP(&disruption.AverageDelay, "average-delay", "a", 0, "average request delay")
9595
cmd.Flags().DurationVarP(&disruption.DelayVariation, "delay-variation", "v", 0, "variation in request delay")
96-
cmd.Flags().Int32VarP(&disruption.StatusCode, "status", "s", 0, "status code")
96+
cmd.Flags().Uint32VarP(&disruption.StatusCode, "status", "s", 0, "status code")
9797
cmd.Flags().Float32VarP(&disruption.ErrorRate, "rate", "r", 0, "error rate")
9898
cmd.Flags().StringVarP(&disruption.StatusMessage, "message", "m", "", "error message for injected faults")
9999
cmd.Flags().UintVarP(&port, "port", "p", 8000, "port the proxy will listen to")

cmd/agent/commands/http.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ func BuildHTTPCmd(env runtime.Environment, config *agent.Config) *cobra.Command
9393
cmd.Flags().DurationVarP(&duration, "duration", "d", 0, "duration of the disruptions")
9494
cmd.Flags().DurationVarP(&disruption.AverageDelay, "average-delay", "a", 0, "average request delay")
9595
cmd.Flags().DurationVarP(&disruption.DelayVariation, "delay-variation", "v", 0, "variation in request delay")
96-
cmd.Flags().UintVarP(&disruption.ErrorCode, "error", "e", 0, "error code")
96+
cmd.Flags().IntVarP(&disruption.ErrorCode, "error", "e", 0, "error code")
9797
cmd.Flags().Float32VarP(&disruption.ErrorRate, "rate", "r", 0, "error rate")
9898
cmd.Flags().StringVarP(&disruption.ErrorBody, "body", "b", "", "body for injected faults")
9999
cmd.Flags().StringSliceVarP(&disruption.Excluded, "exclude", "x", []string{}, "comma-separated list of path(s)"+

cmd/agent/commands/stress.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ func BuildStressCmd(env runtime.Environment, config *agent.Config) *cobra.Comman
2020
Use: "stress",
2121
Short: "resource stressor",
2222
Long: "Stress CPU resource",
23-
RunE: func(cmd *cobra.Command, args []string) error {
23+
RunE: func(cmd *cobra.Command, args []string) error { //nolint:revive
2424
agent, err := agent.Start(env, config)
2525
if err != nil {
2626
return fmt.Errorf("initializing agent: %w", err)

cmd/e2e-cluster/commands/cleanup.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ func BuildCleanupCmd() *cobra.Command {
1616
Use: "cleanup",
1717
Short: "deletes an e2e test cluster ",
1818
Long: "deletes an e2e test cluster",
19-
RunE: func(cmd *cobra.Command, args []string) error {
19+
RunE: func(cmd *cobra.Command, args []string) error { //nolint:revive
2020
if name == "" {
2121
return fmt.Errorf("--name is required")
2222
}

cmd/e2e-cluster/commands/setup.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ func BuildSetupCmd() *cobra.Command {
1717
Use: "setup",
1818
Short: "creates and configures an e2e test cluster ",
1919
Long: "creates and configures an e2e test cluster with default options.",
20-
RunE: func(cmd *cobra.Command, args []string) error {
20+
RunE: func(cmd *cobra.Command, args []string) error { //nolint:revive
2121
cluster, err := cluster.BuildE2eCluster(
2222
cluster.DefaultE2eClusterConfig(),
2323
cluster.WithEnvOverride(false),

go.mod

+15-17
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
module github.com/grafana/xk6-disruptor
22

3-
go 1.22.7
3+
go 1.23.0
44

5-
toolchain go1.22.9
5+
toolchain go1.23.4
66

77
require (
88
github.com/docker/docker v27.4.1+incompatible
@@ -15,10 +15,10 @@ require (
1515
github.com/spf13/cobra v1.8.1
1616
github.com/testcontainers/testcontainers-go v0.34.0
1717
go.k6.io/k6 v0.55.2
18-
k8s.io/api v0.31.3
19-
k8s.io/apimachinery v0.31.3
20-
k8s.io/client-go v0.31.3
21-
sigs.k8s.io/kind v0.25.0
18+
k8s.io/api v0.32.0
19+
k8s.io/apimachinery v0.32.0
20+
k8s.io/client-go v0.32.0
21+
sigs.k8s.io/kind v0.26.0
2222
)
2323

2424
require (
@@ -42,7 +42,7 @@ require (
4242
github.com/go-logr/stdr v1.2.2 // indirect
4343
github.com/go-ole/go-ole v1.2.6 // indirect
4444
github.com/google/gnostic-models v0.6.8 // indirect
45-
github.com/google/pprof v0.0.0-20240525223248-4bfdf5a9a2af // indirect
45+
github.com/google/pprof v0.0.0-20241029153458-d1b30febd7db // indirect
4646
github.com/google/safetext v0.0.0-20220905092116-b49f7bc46da2 // indirect
4747
github.com/gorilla/websocket v1.5.3 // indirect
4848
github.com/grpc-ecosystem/grpc-gateway/v2 v2.22.0 // indirect
@@ -62,7 +62,6 @@ require (
6262
github.com/mstoykov/k6-taskqueue-lib v0.1.0 // indirect
6363
github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f // indirect
6464
github.com/onsi/ginkgo v1.16.5 // indirect
65-
github.com/onsi/gomega v1.20.2 // indirect
6665
github.com/opencontainers/go-digest v1.0.0 // indirect
6766
github.com/opencontainers/image-spec v1.1.0 // indirect
6867
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
@@ -87,6 +86,7 @@ require (
8786
golang.org/x/sync v0.10.0 // indirect
8887
google.golang.org/genproto/googleapis/api v0.0.0-20241015192408-796eee8c2d53 // indirect
8988
google.golang.org/genproto/googleapis/rpc v0.0.0-20241015192408-796eee8c2d53 // indirect
89+
google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.5.1 // indirect
9090
gopkg.in/evanphx/json-patch.v4 v4.12.0 // indirect
9191
)
9292

@@ -98,23 +98,22 @@ require (
9898
github.com/evanphx/json-patch/v5 v5.6.0 // indirect
9999
github.com/fatih/color v1.18.0 // indirect
100100
github.com/go-logr/logr v1.4.2 // indirect
101-
github.com/go-openapi/jsonpointer v0.19.6 // indirect
101+
github.com/go-openapi/jsonpointer v0.21.0 // indirect
102102
github.com/go-openapi/jsonreference v0.20.2 // indirect
103-
github.com/go-openapi/swag v0.22.4 // indirect
103+
github.com/go-openapi/swag v0.23.0 // indirect
104104
github.com/go-sourcemap/sourcemap v2.1.4+incompatible // indirect
105105
github.com/gogo/protobuf v1.3.2 // indirect
106106
github.com/golang/protobuf v1.5.4
107107
github.com/google/gofuzz v1.2.0 // indirect
108108
github.com/google/uuid v1.6.0 // indirect
109-
github.com/imdario/mergo v0.3.15 // indirect
110109
github.com/inconshreveable/mousetrap v1.1.0 // indirect
111110
github.com/jhump/protoreflect v1.17.0
112111
github.com/josharian/intern v1.0.0 // indirect
113112
github.com/json-iterator/go v1.1.12 // indirect
114113
github.com/mailru/easyjson v0.7.7 // indirect
115114
github.com/mattn/go-colorable v0.1.13 // indirect
116115
github.com/mattn/go-isatty v0.0.20 // indirect
117-
github.com/moby/spdystream v0.4.0 // indirect
116+
github.com/moby/spdystream v0.5.0 // indirect
118117
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
119118
github.com/modern-go/reflect2 v1.0.2 // indirect
120119
github.com/mstoykov/atlas v0.0.0-20220811071828-388f114305dd // indirect
@@ -135,12 +134,11 @@ require (
135134
google.golang.org/protobuf v1.36.2
136135
gopkg.in/guregu/null.v3 v3.3.0 // indirect
137136
gopkg.in/inf.v0 v0.9.1 // indirect
138-
gopkg.in/yaml.v2 v2.4.0 // indirect
139137
gopkg.in/yaml.v3 v3.0.1 // indirect
140138
k8s.io/klog/v2 v2.130.1 // indirect
141-
k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340 // indirect
142-
k8s.io/utils v0.0.0-20240711033017-18e509b52bc8 // indirect
143-
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect
144-
sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect
139+
k8s.io/kube-openapi v0.0.0-20241105132330-32ad38e42d3f // indirect
140+
k8s.io/utils v0.0.0-20241104100929-3ea5e8cea738 // indirect
141+
sigs.k8s.io/json v0.0.0-20241010143419-9aa6b5e7a4b3 // indirect
142+
sigs.k8s.io/structured-merge-diff/v4 v4.4.2 // indirect
145143
sigs.k8s.io/yaml v1.4.0 // indirect
146144
)

0 commit comments

Comments
 (0)