Skip to content

Commit

Permalink
Restore compatibility with go v1.21
Browse files Browse the repository at this point in the history
Signed-off-by: Edgar Hernández <23639005+israel-hdez@users.noreply.github.com>
  • Loading branch information
israel-hdez committed Oct 25, 2024
1 parent 53de246 commit b7a868f
Show file tree
Hide file tree
Showing 5 changed files with 65 additions and 292 deletions.
9 changes: 6 additions & 3 deletions cmd/agent/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -313,17 +313,20 @@ func startModelPuller(logger *zap.SugaredLogger) {
go watcher.Start()
}

func buildProbe(logger *zap.SugaredLogger, probeJSON string, autodetectHTTP2 bool, multiContainerProbes bool) *readiness.Probe {
coreProbes, err := readiness.DecodeProbes(probeJSON, multiContainerProbes)
func buildProbe(logger *zap.SugaredLogger, probeJSON string, autodetectHTTP2 bool, _ bool) *readiness.Probe {
coreProbes, err := readiness.DecodeProbe(probeJSON)
if err != nil {
logger.Fatalw("Agent failed to parse readiness probe", zap.Error(err))
panic("Agent failed to parse readiness probe")
}
for _, probe := range coreProbes {
// for _, probe := range coreProbes {
{
probe := coreProbes
if probe.InitialDelaySeconds == 0 {
probe.InitialDelaySeconds = 10
}
}
// }
if autodetectHTTP2 {
return readiness.NewProbeWithHTTP2AutoDetection(coreProbes)
}
Expand Down
34 changes: 18 additions & 16 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/kserve/kserve

go 1.22.7
go 1.21

require (
cloud.google.com/go/storage v1.43.0
Expand All @@ -17,7 +17,7 @@ require (
github.com/json-iterator/go v1.1.12
github.com/kelseyhightower/envconfig v1.4.0
github.com/onsi/ginkgo/v2 v2.20.1
github.com/onsi/gomega v1.34.2
github.com/onsi/gomega v1.34.1
github.com/pkg/errors v0.9.1
github.com/spf13/cobra v1.8.1
github.com/spf13/pflag v1.0.5
Expand All @@ -28,20 +28,20 @@ require (
google.golang.org/api v0.195.0
google.golang.org/protobuf v1.34.2
gopkg.in/go-playground/validator.v9 v9.31.0
istio.io/api v1.23.0
istio.io/client-go v1.23.0
k8s.io/api v0.30.4
k8s.io/apimachinery v0.30.4
k8s.io/client-go v0.30.4
k8s.io/code-generator v0.30.4
k8s.io/component-helpers v0.30.4
istio.io/api v1.21.6
istio.io/client-go v1.21.6
k8s.io/api v0.29.10
k8s.io/apimachinery v0.29.10
k8s.io/client-go v0.29.10
k8s.io/code-generator v0.30.0-alpha.3
k8s.io/component-helpers v0.29.10
k8s.io/klog v1.0.0
k8s.io/kube-openapi v0.0.0-20240827152857-f7e401e7b4c2
k8s.io/utils v0.0.0-20240821151609-f90d01438635
knative.dev/networking v0.0.0-20240815142417-37fdbdd0854b
knative.dev/pkg v0.0.0-20240815051656-89743d9bbf7c
knative.dev/serving v0.42.2
sigs.k8s.io/controller-runtime v0.18.5
knative.dev/networking v0.0.0-20231012062757-a5958051caf8
knative.dev/pkg v0.0.0-20231023150739-56bfe0dd9626
knative.dev/serving v0.38.6
sigs.k8s.io/controller-runtime v0.17.6
sigs.k8s.io/yaml v1.4.0
)

Expand Down Expand Up @@ -71,13 +71,14 @@ require (
github.com/go-playground/locales v0.14.1 // indirect
github.com/go-playground/universal-translator v0.18.1 // indirect
github.com/go-task/slim-sprig/v3 v3.0.0 // indirect
github.com/go-test/deep v1.1.0 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/golang/protobuf v1.5.4 // indirect
github.com/google/gnostic-models v0.6.8 // indirect
github.com/google/go-containerregistry v0.20.2 // indirect
github.com/google/gofuzz v1.2.0 // indirect
github.com/google/pprof v0.0.0-20240827171923-fa2c70bbbfe5 // indirect
github.com/google/pprof v0.0.0-20240727154555-813a5fbdbec8 // indirect
github.com/google/s2a-go v0.1.8 // indirect
github.com/googleapis/enterprise-certificate-proxy v0.3.3 // indirect
github.com/googleapis/gax-go/v2 v2.13.0 // indirect
Expand Down Expand Up @@ -133,8 +134,9 @@ require (
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/apiextensions-apiserver v0.30.4 // indirect
k8s.io/gengo/v2 v2.0.0-20240826214909-a7b603a56eb7 // indirect
k8s.io/apiextensions-apiserver v0.29.10 // indirect
k8s.io/component-base v0.29.10 // indirect
k8s.io/gengo v0.0.0-20240404160639-a0386bf69313 // indirect
k8s.io/klog/v2 v2.130.1 // indirect
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect
Expand Down
Loading

0 comments on commit b7a868f

Please sign in to comment.