![]() This came up when updating go-oidc. After updating go-oidc (with its dependency tree), cloud.google.com/go was no longer used as a package import, but still listed in the module dependency graph; as a result, "go mod vendor" no longer pulled in cloud.google.com/go itself, but update-vendor-licenses.sh still wanted a license file for it since it appeared in the list of modules. This scenario is already supposed to be handled: when a module doesn't contain any *files* as first-level content, if the number of subdirectories it contains *equals* the number of submodules it contains (excluding itself), the module is skipped. This fails for cloud.google.com/go because several submodules are included in the module dependency graph but aren't actually used, and therefore not vendored. Updating the test to check that the number of subdirectories is less than or equal to the number of expected submodules fixes this. The correct fix would be to process the submodules first, keeping a note of which ones really have content, then check that the top-level module only contains subdirectories corresponding to those modules; but it's not clear to me that this is worth the effort (especially in a shell script). Signed-off-by: Stephen Kitt <skitt@redhat.com> |
||
---|---|---|
.. | ||
boilerplate | ||
conformance | ||
e2e-internal | ||
gen-swagger-doc | ||
jenkins | ||
lib | ||
make-rules | ||
testdata | ||
tools | ||
verify-flags | ||
.descriptions_failures | ||
.import-aliases | ||
.spelling_failures | ||
benchmark-go.sh | ||
build-cross.sh | ||
build-go.sh | ||
cherry_pick_pull.sh | ||
dev-build-and-push.sh | ||
dev-build-and-up.sh | ||
dev-push-conformance.sh | ||
e2e-node-test.sh | ||
generate-docs.sh | ||
get-build.sh | ||
ginkgo-e2e.sh | ||
grab-profiles.sh | ||
install-etcd.sh | ||
lint-dependencies.sh | ||
list-feature-tests.sh | ||
local-up-cluster.sh | ||
logcheck.conf | ||
module-graph.sh | ||
OWNERS | ||
pin-dependency.sh | ||
print-workspace-status.sh | ||
README.md | ||
run-in-gopath.sh | ||
run-prometheus-on-etcd-scrapes.sh | ||
serve-prom-scrapes.sh | ||
test-go.sh | ||
test-integration.sh | ||
unwanted-dependencies.json | ||
update-all.sh | ||
update-codegen.sh | ||
update-conformance-yaml.sh | ||
update-generated-api-compatibility-data.sh | ||
update-generated-device-plugin-dockerized.sh | ||
update-generated-device-plugin.sh | ||
update-generated-docs.sh | ||
update-generated-dynamic-resource-allocation-dockerized.sh | ||
update-generated-dynamic-resource-allocation.sh | ||
update-generated-kms-dockerized.sh | ||
update-generated-kms.sh | ||
update-generated-kubelet-plugin-registration-dockerized.sh | ||
update-generated-kubelet-plugin-registration.sh | ||
update-generated-pod-resources-dockerized.sh | ||
update-generated-pod-resources.sh | ||
update-generated-protobuf-dockerized.sh | ||
update-generated-protobuf.sh | ||
update-generated-runtime-dockerized.sh | ||
update-generated-runtime.sh | ||
update-generated-stable-metrics.sh | ||
update-generated-swagger-docs.sh | ||
update-gofmt.sh | ||
update-import-aliases.sh | ||
update-internal-modules.sh | ||
update-kustomize.sh | ||
update-mocks.sh | ||
update-netparse-cve.sh | ||
update-openapi-spec.sh | ||
update-translations.sh | ||
update-vendor-licenses.sh | ||
update-vendor.sh | ||
update-yamlfmt.sh | ||
verify-all.sh | ||
verify-api-groups.sh | ||
verify-boilerplate.sh | ||
verify-cli-conventions.sh | ||
verify-codegen.sh | ||
verify-conformance-requirements.sh | ||
verify-conformance-yaml.sh | ||
verify-description.sh | ||
verify-e2e-test-ownership.sh | ||
verify-external-dependencies-version.sh | ||
verify-flags-underscore.py | ||
verify-generated-device-plugin.sh | ||
verify-generated-docs.sh | ||
verify-generated-dynamic-resource-allocation.sh | ||
verify-generated-kms.sh | ||
verify-generated-kubelet-plugin-registration.sh | ||
verify-generated-pod-resources.sh | ||
verify-generated-protobuf.sh | ||
verify-generated-runtime.sh | ||
verify-generated-stable-metrics.sh | ||
verify-generated-swagger-docs.sh | ||
verify-gofmt.sh | ||
verify-golangci-lint.sh | ||
verify-govet-levee.sh | ||
verify-govet.sh | ||
verify-import-aliases.sh | ||
verify-import-boss.sh | ||
verify-imports.sh | ||
verify-internal-modules.sh | ||
verify-licenses.sh | ||
verify-mocks.sh | ||
verify-netparse-cve.sh | ||
verify-no-vendor-cycles.sh | ||
verify-non-mutating-validation.sh | ||
verify-openapi-spec.sh | ||
verify-pkg-names.sh | ||
verify-prerelease-lifecycle-tags.sh | ||
verify-prometheus-imports.sh | ||
verify-publishing-bot.py | ||
verify-readonly-packages.sh | ||
verify-shellcheck.sh | ||
verify-spelling.sh | ||
verify-staging-meta-files.sh | ||
verify-test-code.sh | ||
verify-test-featuregates.sh | ||
verify-test-images.sh | ||
verify-typecheck-providerless.sh | ||
verify-typecheck.sh | ||
verify-vendor-licenses.sh | ||
verify-vendor.sh | ||
verify-yamlfmt.sh |
Kubernetes hack GuideLines
This document describes how you can use the scripts from hack
directory
and gives a brief introduction and explanation of these scripts.
Overview
The hack
directory contains many scripts that ensure continuous development of kubernetes,
enhance the robustness of the code, improve development efficiency, etc.
The explanations and descriptions of these scripts are helpful for contributors.
For details, refer to the following guidelines.
Key scripts
verify-all.sh
: This script is a vestigial redirection, Please do not add "real" logic. It is equivalent tomake verify
.update-all.sh
: This script is a vestigial redirection, Please do not add "real" logic. Thetrue
target of this makerule ishack/make-rules/update.sh
.It is equivalent tomake update
.
Attention
Note that all scripts must be run from the Kubernetes root directory.
We should run hack/verify-all.sh
before submitting a PR and if anything fails run hack/update-all.sh
.