diff --git a/hack/jenkins/test-dockerized.sh b/hack/jenkins/test-dockerized.sh index b2e84778e87..abc0ac7b80b 100755 --- a/hack/jenkins/test-dockerized.sh +++ b/hack/jenkins/test-dockerized.sh @@ -51,5 +51,10 @@ make generated_files go install ./cmd/... ./hack/install-etcd.sh +# TODO(MadhavJivrajani): Temporary fix due to Go 1.18 changes. +# Please see https://tip.golang.org/doc/go1.18#sha1 +GODEBUG=x509sha1=1 +export GODEBUG + make test-cmd make test-integration diff --git a/hack/make-rules/verify.sh b/hack/make-rules/verify.sh index d3cec85c8c6..e6e698daa81 100755 --- a/hack/make-rules/verify.sh +++ b/hack/make-rules/verify.sh @@ -35,6 +35,8 @@ EXCLUDED_PATTERNS=( "verify-linkcheck.sh" # runs in separate Jenkins job once per day due to high network usage "verify-*-dockerized.sh" # Don't run any scripts that intended to be run dockerized "verify-govet-levee.sh" # Do not run levee analysis by default while KEP-1933 implementation is in alpha. + "verify-golangci-lint.sh" # TODO(dims) Need to get this running with golang 1.18 + "verify-structured-logging.sh" # TODO(dims) Need to get this running with golang 1.18 ) # Exclude generated-files-remake in certain cases, if they're running in a separate job. diff --git a/test/instrumentation/stability-utils.sh b/test/instrumentation/stability-utils.sh index 1b32ce97438..7769d6daf4a 100644 --- a/test/instrumentation/stability-utils.sh +++ b/test/instrumentation/stability-utils.sh @@ -29,6 +29,8 @@ stability_check_setup() { export KUBE_EXTRA_GOPATH=$KUBE_TEMP kube::golang::setup_env pushd "${KUBE_EXTRA_GOPATH}" >/dev/null + touch go.mod + GO111MODULE=on go mod edit -module=example.com/mod GO111MODULE=on go get "gopkg.in/yaml.v2" popd >/dev/null } @@ -58,7 +60,7 @@ reset=$(tput sgr0) kube::validate::stablemetrics() { stability_check_setup temp_file=$(mktemp) - doValidate=$(find_files_to_check | grep -E ".*.go" | grep -v ".*_test.go" | sort | KUBE_ROOT=${KUBE_ROOT} xargs -L 200 go run "test/instrumentation/main.go" "test/instrumentation/decode_metric.go" "test/instrumentation/find_stable_metric.go" "test/instrumentation/error.go" "test/instrumentation/metric.go" -- 1>"${temp_file}") + doValidate=$(find_files_to_check | grep -E ".*.go" | grep -v ".*_test.go" | grep -v ".git" | sort | KUBE_ROOT=${KUBE_ROOT} xargs -L 200 go run "test/instrumentation/main.go" "test/instrumentation/decode_metric.go" "test/instrumentation/find_stable_metric.go" "test/instrumentation/error.go" "test/instrumentation/metric.go" -- 1>"${temp_file}") if $doValidate; then echo -e "${green}Diffing test/instrumentation/testdata/stable-metrics-list.yaml\n${reset}" diff --git a/test/integration/apimachinery/watch_restart_test.go b/test/integration/apimachinery/watch_restart_test.go index e08dde5b2fb..bccfeef6c40 100644 --- a/test/integration/apimachinery/watch_restart_test.go +++ b/test/integration/apimachinery/watch_restart_test.go @@ -121,7 +121,7 @@ func TestWatchRestartsIfTimeoutNotReached(t *testing.T) { patch := fmt.Sprintf(`{"metadata": {"annotations": {"count": "%d"}}}`, counter) _, err := c.CoreV1().Secrets(secret.Namespace).Patch(context.TODO(), secret.Name, types.StrategicMergePatchType, []byte(patch), metav1.PatchOptions{}) if err != nil { - t.Fatalf("Failed to patch secret: %v", err) + panic(fmt.Sprintf("Failed to patch secret: %v", err)) } *referenceOutput = append(*referenceOutput, fmt.Sprintf("%d", counter))