
If something goes wrong during the test registration phase, the only solution so far was to panic. This is not user-friendly and only allows to report one problem at a time. If initialization can continue, then a better solution is to record a bug, continue, and then report all bugs together. This also works when just listing tests. The new verify-e2e-suites.sh uses that to check all test suites (identified as "packages that call framework.AfterReadingAllFlags", with some exceptions) as part of pull-kubernetes-verify. Example output for a fake framework.RecordBug(framework.NewBug("fake bug during SIGDescribe", 0)) in test/e2e/storage/volume_metrics.go: ``` $ hack/verify-e2e-suites.sh go version go1.21.1 linux/amd64 ERROR: E2E test suite invocation failed for test/e2e. ERROR: E2E suite initialization was faulty, these errors must be fixed: ERROR: test/e2e/storage/volume_metrics.go:49: fake bug during SIGDescribe E2E suite test/e2e_kubeadm passed. E2E suite test/e2e_node passed. ```
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
.