Merge pull request #100246 from umangachapagain/logcheck-perf

logcheck: pass all packages at once to logcheck
This commit is contained in:
Kubernetes Prow Robot 2021-03-17 02:18:57 -07:00 committed by GitHub
commit 2f3ea9b7c5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -45,16 +45,13 @@ kube::util::check-file-in-alphabetical-order "${migrated_packages_file}"
migrated_packages=() migrated_packages=()
while IFS='' read -r line; do while IFS='' read -r line; do
migrated_packages+=("$line") migrated_packages+=("$KUBE_ROOT/$line")
done < <(cat "${migrated_packages_file}") done < <(cat "${migrated_packages_file}")
# TODO: Improve concurrancy here
ret=0 ret=0
for package in "${migrated_packages[@]}"; do GOOS=linux logcheck "${migrated_packages[@]}" || ret=$?
GOOS=linux logcheck "$KUBE_ROOT/$package" || ret=$? GOOS=windows logcheck "${migrated_packages[@]}" || ret=$?
GOOS=windows logcheck "$KUBE_ROOT/$package" || ret=$?
done
if [ $ret -eq 0 ]; then if [ $ret -eq 0 ]; then
echo "Structured logging static check is passed :)." echo "Structured logging static check is passed :)."