This is primarily useful in unit tests and therefore supported by
featuregate/testing. Without this, all warnings are emitted to stderr, with no
connection to the test which caused the warning to be emitted.
When a single test fails, `go test` started by showing all warnings triggered by
any test, not just the failed test:
I1121 18:50:28.112284 396950 feature_gate.go:466] feature gates: {map[DRADeviceTaintRules:true DRADeviceTaints:true]}
...
I1121 18:50:29.704907 396950 feature_gate.go:466] feature gates: {map[DRADeviceTaintRules:false DRADeviceTaints:false]}
--- FAIL: TestAll (1.58s)
--- FAIL: TestAll/Eviction (0.02s)
This warning was actually slightly broken: it passed an atomic.Value to Infof,
not the map. This violates the "must not be copied after first use" rule
for atomic.Value (thus wasn't thread-safe) and printed the value in an awkward
way (extra {}).
Now it shows that the feature gates are modified inside TestAll (in this example):
--- FAIL: TestAll (1.56s)
feature_gate.go:170: I1124 17:31:27.245108] Updated featureGates={"DRADeviceTaintRules":true,"DRADeviceTaints":true}
--- FAIL: TestAll/Eviction (0.02s)
--- FAIL: TestAll/Eviction/initial (0.00s)
...
feature_gate.go:170: I1124 17:31:28.821975] Updated featureGates={"DRADeviceTaintRules":false,"DRADeviceTaints":false}
FAIL
FAIL k8s.io/kubernetes/pkg/controller/devicetainteviction 1.602s
klog calls during init are becoming a problem because now test/e2e/framework
depends in test/utils/ktesting which bumps up the default verbosity during init
to make test output more complete when there is no argument parsing.
For cadvisor, an upstream fix is
needed (https://github.com/google/cadvisor/pull/3778). For kubectl we can make
it silently accept the valid (!) LC_ALL=C.
* tested how many errors
* added exceptions
* added scoped exceptions per API group
* added struct.field specification
* improved regex match and included core and resources with the new struct.field format
* condensed exceptions using regex as requested
* fixed the scope kal nomaps exceptions to match existing fields
There was an env variable PARALLEL and a -p command line flag,
but the value then wasn't passed on to "go test".
The new default is to not set any explicit parallelism, which
matches the prior (accidental?) behavior of ignoring PARALLEL.
The script is broken because it relies on grepping the source code.
This has always been fragile (currently it finds the search term
in comments) and stopped working years ago when changing how tests
are labeled.
Instead of fixing the script let's remove it because it's clearly unused.
Verify scripts are run such that stderr is captured and included in the JUnit
files. Stdout is not. Therefore the instructions in case of a failure where
only visible by searching the entire job log file, but not in the Prow summary.
The kubekins image got updated from containerd 1.7 to 2.2, which broke
local-up-cluster.sh in the CI because more recent containerd uses single
quotation marks around strings instead of double quotation marks as before. The
search/replaced with sed no longer matched, causing containerd to fail mounting
overlayfs on the default /var/lib/containerd. We have to use the emptyDir host
mount under /docker-graph.
The fix is to relax the search term slightly so that it accepts both kinds of
quotation marks.