From db9c760ee7e7d1c90bc94d96c5528054a98ee75d Mon Sep 17 00:00:00 2001 From: Benjamin Elder Date: Tue, 4 Oct 2022 16:47:25 -0700 Subject: [PATCH 1/3] remove clearly unnecessary lingering BUILD file references --- .generated_files | 1 - hack/lib/golang.sh | 6 ------ hack/verify-flags-underscore.py | 2 -- hack/verify-readonly-packages.sh | 2 +- hack/verify-vendor.sh | 2 +- 5 files changed, 2 insertions(+), 11 deletions(-) diff --git a/.generated_files b/.generated_files index 4e417ab3d25..041d0be0269 100644 --- a/.generated_files +++ b/.generated_files @@ -16,7 +16,6 @@ file-prefix zz_generated. -file-name BUILD file-name types.generated.go file-name generated.pb.go file-name generated.proto diff --git a/hack/lib/golang.sh b/hack/lib/golang.sh index 550f1971afb..fb97ee76783 100755 --- a/hack/lib/golang.sh +++ b/hack/lib/golang.sh @@ -70,7 +70,6 @@ readonly KUBE_SUPPORTED_TEST_PLATFORMS=( ) # The set of server targets that we are only building for Linux -# If you update this list, please also update build/BUILD. kube::golang::server_targets() { local targets=( cmd/kube-proxy @@ -123,7 +122,6 @@ IFS=" " read -ra KUBE_CONFORMANCE_IMAGE_TARGETS <<< "$(kube::golang::conformance readonly KUBE_CONFORMANCE_IMAGE_TARGETS # The set of server targets that we are only building for Kubernetes nodes -# If you update this list, please also update build/BUILD. kube::golang::node_targets() { local targets=( cmd/kube-proxy @@ -256,7 +254,6 @@ kube::golang::setup_platforms() { kube::golang::setup_platforms # The set of client targets that we are building for all platforms -# If you update this list, please also update build/BUILD. readonly KUBE_CLIENT_TARGETS=( cmd/kubectl cmd/kubectl-convert @@ -265,7 +262,6 @@ readonly KUBE_CLIENT_BINARIES=("${KUBE_CLIENT_TARGETS[@]##*/}") readonly KUBE_CLIENT_BINARIES_WIN=("${KUBE_CLIENT_BINARIES[@]/%/.exe}") # The set of test targets that we are building for all platforms -# If you update this list, please also update build/BUILD. kube::golang::test_targets() { local targets=( cmd/gendocs @@ -283,7 +279,6 @@ IFS=" " read -ra KUBE_TEST_TARGETS <<< "$(kube::golang::test_targets)" readonly KUBE_TEST_TARGETS readonly KUBE_TEST_BINARIES=("${KUBE_TEST_TARGETS[@]##*/}") readonly KUBE_TEST_BINARIES_WIN=("${KUBE_TEST_BINARIES[@]/%/.exe}") -# If you update this list, please also update build/BUILD. readonly KUBE_TEST_PORTABLE=( test/e2e/testing-manifests test/kubemark @@ -296,7 +291,6 @@ readonly KUBE_TEST_PORTABLE=( # Test targets which run on the Kubernetes clusters directly, so we only # need to target server platforms. # These binaries will be distributed in the kubernetes-test tarball. -# If you update this list, please also update build/BUILD. kube::golang::server_test_targets() { local targets=( cmd/kubemark diff --git a/hack/verify-flags-underscore.py b/hack/verify-flags-underscore.py index fbf16b70984..bb3dd2385d5 100755 --- a/hack/verify-flags-underscore.py +++ b/hack/verify-flags-underscore.py @@ -62,8 +62,6 @@ def get_all_files(rootdir): dirs.remove('third_party') if '.git' in dirs: dirs.remove('.git') - if 'BUILD' in files: - files.remove('BUILD') for name in files: pathname = os.path.join(root, name) diff --git a/hack/verify-readonly-packages.sh b/hack/verify-readonly-packages.sh index 4519d01890a..86fe04094c7 100755 --- a/hack/verify-readonly-packages.sh +++ b/hack/verify-readonly-packages.sh @@ -47,7 +47,7 @@ find_files() { conflicts=() while IFS=$'\n' read -r dir; do dir=${dir#./} - if kube::util::has_changes "${branch}" "^${dir}/[^/]*\$" '/\.readonly$|/BUILD$|/zz_generated|/\.generated\.|\.proto$|\.pb\.go$' >/dev/null; then + if kube::util::has_changes "${branch}" "^${dir}/[^/]*\$" '/\.readonly$|/zz_generated|/\.generated\.|\.proto$|\.pb\.go$' >/dev/null; then conflicts+=("${dir}") fi done < <(find_files | sed 's|/.readonly||') diff --git a/hack/verify-vendor.sh b/hack/verify-vendor.sh index 2b4e8f39754..05d73764caf 100755 --- a/hack/verify-vendor.sh +++ b/hack/verify-vendor.sh @@ -74,7 +74,7 @@ pushd "${KUBE_ROOT}" > /dev/null 2>&1 ret=1 fi - if ! _out="$(diff -Naupr -x "BUILD" -x "AUTHORS*" -x "CONTRIBUTORS*" vendor "${_kubetmp}/vendor")"; then + if ! _out="$(diff -Naupr -x "AUTHORS*" -x "CONTRIBUTORS*" vendor "${_kubetmp}/vendor")"; then echo "Your vendored results are different:" >&2 echo "${_out}" >&2 echo "Vendor Verify failed." >&2 From 23cdaa2ee7327dc781f5bba741bc92ed7160e563 Mon Sep 17 00:00:00 2001 From: Benjamin Elder Date: Tue, 4 Oct 2022 16:47:39 -0700 Subject: [PATCH 2/3] remove clearly unnecessary lingering bzl file references --- hack/boilerplate/boilerplate.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/hack/boilerplate/boilerplate.py b/hack/boilerplate/boilerplate.py index f082266aa8b..8473dad20e3 100755 --- a/hack/boilerplate/boilerplate.py +++ b/hack/boilerplate/boilerplate.py @@ -90,8 +90,6 @@ def file_passes(filename, refs, regexs): if generated: if extension == "go": extension = "generatego" - elif extension == "bzl": - extension = "generatebzl" if extension != "": ref = refs[extension] From f96d61d9165d824f770a648d950eb470387336ee Mon Sep 17 00:00:00 2001 From: Benjamin Elder Date: Tue, 4 Oct 2022 16:52:27 -0700 Subject: [PATCH 3/3] remove BUILD files from publishing bot rules bazel has been removed since 1.21, the rules only go back to 1.22 TODO: remove Gopkg.toml rule as well ...? --- staging/publishing/rules.yaml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/staging/publishing/rules.yaml b/staging/publishing/rules.yaml index d835d4661ea..39100441684 100644 --- a/staging/publishing/rules.yaml +++ b/staging/publishing/rules.yaml @@ -1991,10 +1991,6 @@ rules: dir: staging/src/k8s.io/pod-security-admission library: true recursive-delete-patterns: -- BUILD -- '*/BUILD' -- BUILD.bazel -- '*/BUILD.bazel' - Gopkg.toml - '*/.gitattributes' default-go-version: 1.19.1