From 3470453e01046f8828df8417d215872e88ad665d Mon Sep 17 00:00:00 2001 From: Davanum Srinivas Date: Tue, 22 Mar 2022 21:33:52 -0400 Subject: [PATCH] Fix for verify: generated-stable-metrics problem Signed-off-by: Davanum Srinivas --- test/instrumentation/stability-utils.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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}"