Single-stepping interactively through a test can be useful to understand what's
happening and to investigate the state at each step.
Similar support was added early to hack/ginkgo-e2e.sh, so the same env variable
is used again.
No test cases are added, removed, or modified. Grouping them this way is intended to make it easier
to reason about the coverage for possible inputs versus one long list of test cases.
The new k8s.io/utils/ptr package provides generic wrapper functions,
which can be used instead of type-specific pointer wrapper functions.
This replaces the latter with the former, and migrates other uses of
the deprecated pointer package to ptr in affacted files.
See kubernetes/utils#283 for details.
Signed-off-by: Lan Liang <gcslyp@gmail.com>
Even if the textlogger which writes to Ginkgo is installed as the logger in
klog, klog still does some verbosity checks itself (for example,
klog.V().Enabled).
Therefore the framework has to keep the verbosity settings in the textlogger
and in klog consistent. This is done by wrapping the Set call instead of
replacing it.
Since 43539c855f (first released in
v1.30.0-alpha.2), the test/e2e/framework manages -v and -vmodule and uses them
for a logger which writes to the Ginkgo output stream.
This did not work for test/e2e_node, because:
- logs.AddFlags(pflag.CommandLine) registers its own -v and -vmodule flags
- pflag.CommandLine.AddGoFlagSet(flag.CommandLine) skips the corresponding
flags in the flag.CommandLine
- pflag.Parse() initializes the settings in the "logs" package even though
those are not used at runtime
The solution is to not use the "logs" package.
The kubelet watches services only to generate the environment variables
inside a pod, but headless services are not needed for this.
Change-Id: Idb4e893862c55df5e29e13ac92ed288ff573dc0c
This will allow components that don't need to watch headless services
(heavily used on ai/ml workloads) to filter them server side.
Specially useful for kubelet and kube-proxy
Change-Id: If36c2c27f2ec80db400c9133c61428d14e124f3e
optimize adc.nodeUpdate(). Time complexity reduced from O(n) to O(1), where n is the number of nodes.
Data stored in nodeAttachedTo.mountedByNode is now at actualStateOfWorld.inUseVolumes.
This refactor also ensures that we can record the state update even if the volume is not present in ASW yet.
The added BenchmarkNodeUpdate result is reduced from 28076923 to 16030 ns/op.
The previous BenchmarkPopulateActualStateOfWorld result is also reduced from 13s to 8s.
* Windows: Consider slash-prefixed paths as absolute
filepath.IsAbs does not consider "/" or "\" as absolute paths, even
though files can be addressed as such. [1][2]
Currently, there are some unit tests that are failing on Windows due to
this reason.
[1] https://learn.microsoft.com/en-us/dotnet/standard/io/file-path-formats#traditional-dos-paths
[2] https://learn.microsoft.com/en-us/windows/win32/fileio/naming-a-file#fully-qualified-vs-relative-paths
* Add test to verify IsAbs for windows
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
* Fix abs path validation on windows
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
* Skipp path clean check for podLogDir on windows
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
* Implement IsPathClean to validate path
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
* Add warn comment for IsAbs
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
---------
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
Co-authored-by: Claudiu Belu <cbelu@cloudbasesolutions.com>