mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-22 19:31:44 +00:00
Fix for verify: generated-stable-metrics problem
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
This commit is contained in:
parent
1ce55e3afe
commit
3470453e01
@ -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}"
|
||||
|
Loading…
Reference in New Issue
Block a user