Skip to content

Commit

Permalink
Bump k8s v0.32 (#451)
Browse files Browse the repository at this point in the history
* 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>
  • Loading branch information
pablochacin and dependabot[bot] authored Jan 8, 2025
1 parent 65f5244 commit 14dc7bd
Show file tree
Hide file tree
Showing 53 changed files with 100 additions and 203 deletions.
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ jobs:
uses: golangci/golangci-lint-action@v6
with:
version: ${{ env.LINT_VERSION }}
args: --timeout=10m

codespell:
name: Codespell
Expand Down
18 changes: 4 additions & 14 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# v1.55.2
# v1.63.2
# Please don't remove the first line. It is used in CI to determine the golangci version
run:
deadline: 5m
Expand Down Expand Up @@ -69,24 +69,19 @@ linters-settings:
linters:
enable-all: true
disable:
- mnd # disabled because it's too strict and doesn't provide much value
- noctx # too many false positives when making simple http requests in tests
- exhaustivestruct
- exhaustruct
- gci
- gochecknoinits
- gocyclo # replaced by cyclop since it also calculates the package complexity
- godot
- godox
- goerr113 # most of the errors here are meant for humans
- err113 # most of the errors here are meant for humans
- goheader
- golint # this linter is deprecated
- gomnd
- gomodguard
- interfacer # deprecated
- ireturn
- maligned # replaced by govet 'fieldalignment'
- nlreturn
- scopelint # deprecated, replaced by exportloopref
- tagliatelle
- testpackage
- thelper
Expand All @@ -97,14 +92,9 @@ linters:
- usestdlibvars
- nosprintfhostport
- nonamedreturns
# Deprecated linters as of 1.53.3
- structcheck
- varcheck
- deadcode
- ifshort
- nosnakecase
- depguard # Dependency whitelist, needs to be configured
- inamedparam # Fails if interfaces do not have named params. Not in our code style.
- perfsprint # Suggests using strconv.* instead of fmt.* for printing numbers. Not very practical.
- protogetter # Complains when code reads var.Something if var.GetSomething() exists. Not useful.
- exportloopref
fast: false
2 changes: 1 addition & 1 deletion cmd/agent/commands/cleanup.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ func BuiltCleanupCmd(env runtime.Environment) *cobra.Command {
cmd := &cobra.Command{
Use: "cleanup",
Short: "stops any ongoing fault injection and cleans resources",
RunE: func(cmd *cobra.Command, args []string) error {
RunE: func(cmd *cobra.Command, args []string) error { //nolint:revive
runningProcess := env.Lock().Owner()
// no instance is currently running
if runningProcess == -1 {
Expand Down
2 changes: 1 addition & 1 deletion cmd/agent/commands/grpc.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ func BuildGrpcCmd(env runtime.Environment, config *agent.Config) *cobra.Command
cmd.Flags().DurationVarP(&duration, "duration", "d", 0, "duration of the disruptions")
cmd.Flags().DurationVarP(&disruption.AverageDelay, "average-delay", "a", 0, "average request delay")
cmd.Flags().DurationVarP(&disruption.DelayVariation, "delay-variation", "v", 0, "variation in request delay")
cmd.Flags().Int32VarP(&disruption.StatusCode, "status", "s", 0, "status code")
cmd.Flags().Uint32VarP(&disruption.StatusCode, "status", "s", 0, "status code")
cmd.Flags().Float32VarP(&disruption.ErrorRate, "rate", "r", 0, "error rate")
cmd.Flags().StringVarP(&disruption.StatusMessage, "message", "m", "", "error message for injected faults")
cmd.Flags().UintVarP(&port, "port", "p", 8000, "port the proxy will listen to")
Expand Down
2 changes: 1 addition & 1 deletion cmd/agent/commands/http.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ func BuildHTTPCmd(env runtime.Environment, config *agent.Config) *cobra.Command
cmd.Flags().DurationVarP(&duration, "duration", "d", 0, "duration of the disruptions")
cmd.Flags().DurationVarP(&disruption.AverageDelay, "average-delay", "a", 0, "average request delay")
cmd.Flags().DurationVarP(&disruption.DelayVariation, "delay-variation", "v", 0, "variation in request delay")
cmd.Flags().UintVarP(&disruption.ErrorCode, "error", "e", 0, "error code")
cmd.Flags().IntVarP(&disruption.ErrorCode, "error", "e", 0, "error code")
cmd.Flags().Float32VarP(&disruption.ErrorRate, "rate", "r", 0, "error rate")
cmd.Flags().StringVarP(&disruption.ErrorBody, "body", "b", "", "body for injected faults")
cmd.Flags().StringSliceVarP(&disruption.Excluded, "exclude", "x", []string{}, "comma-separated list of path(s)"+
Expand Down
2 changes: 1 addition & 1 deletion cmd/agent/commands/stress.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ func BuildStressCmd(env runtime.Environment, config *agent.Config) *cobra.Comman
Use: "stress",
Short: "resource stressor",
Long: "Stress CPU resource",
RunE: func(cmd *cobra.Command, args []string) error {
RunE: func(cmd *cobra.Command, args []string) error { //nolint:revive
agent, err := agent.Start(env, config)
if err != nil {
return fmt.Errorf("initializing agent: %w", err)
Expand Down
2 changes: 1 addition & 1 deletion cmd/e2e-cluster/commands/cleanup.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ func BuildCleanupCmd() *cobra.Command {
Use: "cleanup",
Short: "deletes an e2e test cluster ",
Long: "deletes an e2e test cluster",
RunE: func(cmd *cobra.Command, args []string) error {
RunE: func(cmd *cobra.Command, args []string) error { //nolint:revive
if name == "" {
return fmt.Errorf("--name is required")
}
Expand Down
2 changes: 1 addition & 1 deletion cmd/e2e-cluster/commands/setup.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ func BuildSetupCmd() *cobra.Command {
Use: "setup",
Short: "creates and configures an e2e test cluster ",
Long: "creates and configures an e2e test cluster with default options.",
RunE: func(cmd *cobra.Command, args []string) error {
RunE: func(cmd *cobra.Command, args []string) error { //nolint:revive
cluster, err := cluster.BuildE2eCluster(
cluster.DefaultE2eClusterConfig(),
cluster.WithEnvOverride(false),
Expand Down
32 changes: 15 additions & 17 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
module github.com/grafana/xk6-disruptor

go 1.22.7
go 1.23.0

toolchain go1.22.9
toolchain go1.23.4

require (
github.com/docker/docker v27.4.1+incompatible
Expand All @@ -15,10 +15,10 @@ require (
github.com/spf13/cobra v1.8.1
github.com/testcontainers/testcontainers-go v0.34.0
go.k6.io/k6 v0.55.2
k8s.io/api v0.31.3
k8s.io/apimachinery v0.31.3
k8s.io/client-go v0.31.3
sigs.k8s.io/kind v0.25.0
k8s.io/api v0.32.0
k8s.io/apimachinery v0.32.0
k8s.io/client-go v0.32.0
sigs.k8s.io/kind v0.26.0
)

require (
Expand All @@ -42,7 +42,7 @@ require (
github.com/go-logr/stdr v1.2.2 // indirect
github.com/go-ole/go-ole v1.2.6 // indirect
github.com/google/gnostic-models v0.6.8 // indirect
github.com/google/pprof v0.0.0-20240525223248-4bfdf5a9a2af // indirect
github.com/google/pprof v0.0.0-20241029153458-d1b30febd7db // indirect
github.com/google/safetext v0.0.0-20220905092116-b49f7bc46da2 // indirect
github.com/gorilla/websocket v1.5.3 // indirect
github.com/grpc-ecosystem/grpc-gateway/v2 v2.22.0 // indirect
Expand All @@ -62,7 +62,6 @@ require (
github.com/mstoykov/k6-taskqueue-lib v0.1.0 // indirect
github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f // indirect
github.com/onsi/ginkgo v1.16.5 // indirect
github.com/onsi/gomega v1.20.2 // indirect
github.com/opencontainers/go-digest v1.0.0 // indirect
github.com/opencontainers/image-spec v1.1.0 // indirect
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
Expand All @@ -87,6 +86,7 @@ require (
golang.org/x/sync v0.10.0 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20241015192408-796eee8c2d53 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20241015192408-796eee8c2d53 // indirect
google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.5.1 // indirect
gopkg.in/evanphx/json-patch.v4 v4.12.0 // indirect
)

Expand All @@ -98,23 +98,22 @@ require (
github.com/evanphx/json-patch/v5 v5.6.0 // indirect
github.com/fatih/color v1.18.0 // indirect
github.com/go-logr/logr v1.4.2 // indirect
github.com/go-openapi/jsonpointer v0.19.6 // indirect
github.com/go-openapi/jsonpointer v0.21.0 // indirect
github.com/go-openapi/jsonreference v0.20.2 // indirect
github.com/go-openapi/swag v0.22.4 // indirect
github.com/go-openapi/swag v0.23.0 // indirect
github.com/go-sourcemap/sourcemap v2.1.4+incompatible // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang/protobuf v1.5.4
github.com/google/gofuzz v1.2.0 // indirect
github.com/google/uuid v1.6.0 // indirect
github.com/imdario/mergo v0.3.15 // indirect
github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/jhump/protoreflect v1.17.0
github.com/josharian/intern v1.0.0 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/mailru/easyjson v0.7.7 // indirect
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect
github.com/moby/spdystream v0.4.0 // indirect
github.com/moby/spdystream v0.5.0 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/mstoykov/atlas v0.0.0-20220811071828-388f114305dd // indirect
Expand All @@ -135,12 +134,11 @@ require (
google.golang.org/protobuf v1.36.2
gopkg.in/guregu/null.v3 v3.3.0 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
k8s.io/klog/v2 v2.130.1 // indirect
k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340 // indirect
k8s.io/utils v0.0.0-20240711033017-18e509b52bc8 // indirect
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect
k8s.io/kube-openapi v0.0.0-20241105132330-32ad38e42d3f // indirect
k8s.io/utils v0.0.0-20241104100929-3ea5e8cea738 // indirect
sigs.k8s.io/json v0.0.0-20241010143419-9aa6b5e7a4b3 // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.4.2 // indirect
sigs.k8s.io/yaml v1.4.0 // indirect
)
Loading

0 comments on commit 14dc7bd

Please sign in to comment.