Commit Graph

3412 Commits

Author SHA1 Message Date
Kubernetes Prow Robot
85aa0057c6
Merge pull request #113298 from pohly/e2e-wait-for-pods-with-gomega
e2e: wait for pods with gomega
2023-02-04 05:26:29 -08:00
David Porter
83652673b6 test: Update runtime class detection logic
In the `NodeSupportsPreconfiguredRuntimeClassHandler`, update the check
for the runtime handler to return a failure if the
`/etc/containerd/config.toml` or `/etc/crio/crio.conf` config files do
not exist. If an error is returned, then the underlying test will be
skipped.

Test manually with starting a kind cluster and moving the containerd
config file and verifying that the test is skipped:

```
$ docker exec -it kind-worker /bin/bash
root@kind-worker:/# mv /etc/containerd/config.toml /etc/containerd/config.toml.bak
```

```
make WHAT="test/e2e/e2e.test"
$ ./_output/bin/e2e.test -kubeconfig /tmp/kubeconfig_kind -ginkgo.focus=".*should run a Pod requesting a RuntimeClass with a configured handler.*" --num-nodes=1 2>&1 -ginkgo.v=1 | tee -i "/tmp/build-log.txt"

[sig-node] RuntimeClass [It] should run a Pod requesting a RuntimeClass with a configured handler [NodeFeature:RuntimeHandler]
test/e2e/common/node/runtimeclass.go:85

  [SKIPPED] Skipping test as node does not have E2E runtime class handler preconfigured in container runtime config: command terminated with exit code 1
```

Signed-off-by: David Porter <david@porter.me>
2023-01-31 11:38:49 -08:00
Patrick Ohly
222f655062 e2e: use error wrapping with %w
The recently introduced failure handling in ExpectNoError depends on error
wrapping: if an error prefix gets added with `fmt.Errorf("foo: %v", err)`, then
ExpectNoError cannot detect that the root cause is an assertion failure and
then will add another useless "unexpected error" prefix and will not dump the
additional failure information (currently the backtrace inside the E2E
framework).

Instead of manually deciding on a case-by-case basis where %w is needed, all
error wrapping was updated automatically with

    sed -i "s/fmt.Errorf\(.*\): '*\(%s\|%v\)'*\",\(.* err)\)/fmt.Errorf\1: %w\",\3/" $(git grep -l 'fmt.Errorf' test/e2e*)

This may be unnecessary in some cases, but it's not wrong.
2023-01-31 13:01:39 +01:00
Patrick Ohly
5973e2c8cb e2e pod: unit test for pod status + API error
This covers new behavior in gomega.
2023-01-31 13:01:39 +01:00
Patrick Ohly
901928cd54 e2e pod: remove dead code 2023-01-31 13:01:39 +01:00
Patrick Ohly
f5782f1dbd e2e pod: use gomega.Eventually in WaitForRestartablePods 2023-01-31 13:01:39 +01:00
Patrick Ohly
5d8e970be6 e2e pod: convert ProxyResponseChecker into matcher
Instead of pod responses being printed to the log each time polling fails, we
get a consolidated failure message with all unexpected pod responses if (and
only if) the check times out or a progress report gets produced.
2023-01-31 13:01:39 +01:00
Patrick Ohly
3b579fca91 e2e: consolidate pod response checking
This renames PodsResponding to WaitForPodsResponding for the sake of
consistency and adds a timeout parameter. That is necessary because some other
users of NewProxyResponseChecker used a much lower timeout (2min vs. 15min).

Besides simplifying some code, it also makes it easier to rewrite
ProxyResponseChecker because it only gets used in WaitForPodsResponding.
2023-01-31 13:01:39 +01:00
Patrick Ohly
4491c80074 e2e pod: use gomega.Eventually in WaitForPodNotFoundInNamespace 2023-01-31 13:01:39 +01:00
Patrick Ohly
6eea1b2efa e2e: replace WaitForPodToDisappear with WaitForPodNotFoundInNamespace
WaitForPodToDisappear was always called such that it listed all pods, which
made it less efficient than trying to get just the one pod it was checking for.

Being able to customize the poll interval in practice wasn't useful, therefore
it can be replaced with WaitForPodNotFoundInNamespace.
2023-01-31 13:01:39 +01:00
Patrick Ohly
4740d34edb e2e: consolidate checking a pod list
WaitForPods is now a generic function which lists pods and then checks the pods
that it found against some provided condition. A parameter determines how many
pods must be found resp. match the condition for the check to succeed.
2023-01-31 07:52:26 +01:00
Patrick Ohly
cd0c756c72 e2e pod: use gomega.Eventually in WaitTimeoutForPodReadyInNamespace/WaitForPodCondition
These get converted together because they relied on FinalErr which now isn't
needed anymore.
2023-01-31 07:52:26 +01:00
Patrick Ohly
5c1723d81f e2e framework: support getting list of objects
This is similar to the previous support for getting a single object.
2023-01-31 07:52:26 +01:00
Patrick Ohly
671835e976 e2e pod: use gomega.Eventually in WaitForPodsRunningReady
The code becomes simpler (78 insertions, 91 deletions), easier to read (all
code entirely inside WaitForPodsRunningReady, no need to declare and later
overwrite variables) and possibly more correct (if all API calls failed,
the resulting error was ignored when allowedNotReadyPods > 0).
2023-01-31 07:52:26 +01:00
Patrick Ohly
b6ede21ff1 e2e framework: turn function into gomega.Matcher
The intention is to use this inside a helper function where the
corresponding Expect call is known.
2023-01-31 07:52:26 +01:00
Patrick Ohly
3ebab68c8a e2e: remove unused label filter from WaitForPodsRunningReady
None of the users of the functions passed anything other than nil or an empty
map and the implementation ignore the parameter - it seems like a candidate for
simplification.
2023-01-31 07:52:26 +01:00
Patrick Ohly
1b5da1035a e2e framework: include additional stack backtrace in failures
When a Gomega failure is converted to an error, the stack at the time when the
failure occurs may be useful: error wrapping provides some bread crumbs that
can be followed to determine where the failure really occurred, but error
wrapping may be missing or ambiguous.

To provide the additional information, a FailureError now includes a full stack
backtrace. The backtrace intentionally makes no attempt to exclude framework
functions besides the gomega support itself because helpers like
e2e/framework/pod may be relevant.

That backtrace is not included in the failure message for the sake of
brevity. Instead, it gets logged as part of the test's output.
2023-01-31 07:52:26 +01:00
Patrick Ohly
e8a50b0583 e2e framework: implement pod polling with gomega.Eventually
gomega.Eventually provides better progress reports: instead of filling up the
log with rather useless one-line messages that are not enough to to understand
the current state, it integrates with Gingko's progress reporting (SIGUSR1,
--poll-progress-after) and then dumps the same complete failure message as
after a timeout. That makes it possible to understand why progress isn't
getting made without having to wait for the timeout.

The other advantage is that the failure message for some unexpected pod state
becomes more readable: instead of encapsulating it as "observed object" inside
an error, it directly gets rendered by gomega.
2023-01-31 07:52:26 +01:00
Patrick Ohly
0872e8d927 e2e framework: gomega assertions as errors
Calling gomega.Expect/Eventually/Consistently deep inside a helper call chain
has several challenges:
- the stack offset must be tracked correctly, otherwise the callstack
  for the failure starts at some helper code, which is often not informative
- augmenting the failure message with additional information from each
  caller implies that each caller must pass down a string and/or format
  string plus arguments

Both challenges can be solved by returning errors:
- the stacktrace is taken at that level where the error is
  treated as a failure instead of passing back an error, i.e.
  inside the It callback
- traditional error wrapping can add additional information, if
  desirable

What was missing was some easy way to generate an error via a gomega
assertion. The new infrastructure achieves that by mirroring the
Gomega/Assertion/AsyncAssertion interfaces with errors as return values instead
of calling a fail handler.

It is intentionally less flexible than the gomega APIs:
- A context must be passed to Eventually/Consistently as first
  parameter because that is needed for proper timeout handling.
- No additional text can be added to the failure through this
  API because error wrapping is meant to be used for this.
- No need to adjust the callstack offset because no backtrace
  is recorded when a failure occurs.

To avoid the useless "unexpected error" log message when passing back a gomega
failure, ExpectNoError gets extended to recognize such errors and then skips
the logging.
2023-01-31 07:52:26 +01:00
Kubernetes Prow Robot
d863d04adc
Merge pull request #114580 from pohly/e2e-ginkgo-timeout-fixes
e2e ginkgo timeout fixes, III
2023-01-30 13:48:48 -08:00
Kubernetes Prow Robot
8e642d3d0d
Merge pull request #115310 from mzaian/etcd-3.5.7-build-image
etcd: Update to version 3.5.7
2023-01-28 10:20:42 -08:00
Mohamed Zaian
90570b7595 etcd: Update to version 3.5.7 2023-01-27 17:24:00 +01:00
Richa Banker
452343367c Enable ComponentSLIs as beta feature 2023-01-26 17:46:21 -08:00
Richa Banker
eb55e2b980 Add e2e test for checking /metrics/slis endpoint for API server 2023-01-26 17:46:21 -08:00
David Porter
b96290c08f e2e node: Update runtime class handler skip logic
There are two runtime class tests which required the container runtime
config to include explicit configuration for `test-handler`. The current
logic skips these tests in non GCE environments. This skip is too strict
since the test is skipped in node e2e environments and in other
environments such as kind, which support running the test and also
configure `test-handler`.

Instead of skipping based on provider, add a new function
`NodeSupportsPreconfiguredRuntimeClassHandler` which examines the
underlying container runtime config and checks if the config includes
`test-handler`. The check is a bit brittle since it assumes container
runtime config paths, but it is a net improvement over skipping the test
entirely on non GCE environments.

This results in the test working in the common test environments, namely
GCE kube-up, node e2e, and kind.

Signed-off-by: David Porter <david@porter.me>
2023-01-24 14:43:24 -08:00
Rahul Rangith
e6a90aa48a PR feedback 2023-01-17 10:21:41 -05:00
Patrick Ohly
6b5f77b163 e2e framework/pod: add gomega matchers
They can be used for polling with a get function and gomega.Eventually or
gomega.Consistently.
2023-01-16 09:05:37 +01:00
Patrick Ohly
17eba2b2f7 e2e framework/pod: add Get helper
This helper will be used by several different tests and makes those tests more
readable.
2023-01-16 09:05:37 +01:00
Patrick Ohly
63ab23200b e2e framework: support polling with Get
These helper functions can be used in combination with
omega.Eventually/Consistently to implement polling of objects that is aware of
Kubernetes apiserver conventions:

- retry on certain errors instead of giving up,
  with "not found" handling decided by the caller (may or may not
  be fatal, depending on the test)
- sleep if requested by apiserver
2023-01-16 09:05:37 +01:00
Patrick Ohly
22341590bd e2e framework: add NamespacedName
The E2E framework contains several functions which only differ in how they get
name and namespace: from an API object (WaitForPodRunningInNamespace) or as
separate parameters (WaitTimeoutForPodRunningInNamespace).

NamespacedName and the NamedObject interface enable writing helper functions
that can be called with both an API object (like *v1.Pod, which implements
Object and thus NamedObject) and name+namespace string (via
NamespacedName).

The other advantage of NamespacedName is that the order of name and namespace
parameter cannot be mixed up.

NamespacedName was derived from k8s.io/apimachinery/pkg/types.NamespacedName. A
separate type in the framework package was chosen a) to avoid additional
imports in test code and b) because the interface might not be suitable for
k8s.io/apimachinery.
2023-01-16 09:05:37 +01:00
Patrick Ohly
1ec4c7a41c e2e framework: add test case for early abort of pod polling
The early exit support was added in 004c1b6441
but without a corresponding test case.
2023-01-16 09:05:36 +01:00
Kubernetes Prow Robot
067fc449cd
Merge pull request #114260 from aojea/kubeproxylagtimeout
be more strict on e2e network timeouts
2023-01-12 16:03:12 -08:00
Kubernetes Prow Robot
0d6dc14051
Merge pull request #114783 from pohly/e2e-framework-timeouts
e2e framework: consolidate timeouts and intervals
2023-01-12 03:29:08 -08:00
Kubernetes Prow Robot
08d9a0ef5b
Merge pull request #113467 from pacoxu/psp-cleanup
Remove PodSecurityPolicy related code except client-go & API type
2023-01-11 14:28:07 -08:00
Kubernetes Prow Robot
d8b553cce8
Merge pull request #114769 from pohly/e2e-owners-pohly
test/OWNERS: add pohly as approver
2023-01-09 15:11:27 -08:00
Patrick Ohly
0f9a8d38be e2e framework: configure poll interval+duration for gomega
Primarily this protects against accidentally polling with the default interval
of 10ms. Setting these defaults may also make some tests simpler because they
don't need to override the defaults.
2023-01-09 17:29:35 +01:00
Patrick Ohly
16a6f70e11 e2e: add PollInterval()
Various different tests all have their own poll intervals. As a start towards
consolidating that, the interval from test/e2e/framework/pod (as one of the
most common cases for polling) is moved into the framework.

Changing other helper packages and tests needs to follow.
2023-01-09 17:29:35 +01:00
Patrick Ohly
db394db398 e2e: move several timeouts from TestContext into TimeoutContext
This consolidates timeout handling. In the future, configuration of all
timeouts via a configuration file might get added. For now, the same three
legacy command line flags for the timeouts that get moved continue to be
supported.
2023-01-09 17:29:35 +01:00
Patrick Ohly
c6da602168 OWNERS: remove sig-testing-approvers
It's not used enough to add any real value. Instead, it obscures the real
ownership when someone looks at an OWNERS file where it is used.
2023-01-09 09:54:10 +01:00
Paco Xu
25686a2c77 remove psp in extensions api/apis 2023-01-06 17:07:02 +08:00
TommyStarK
a46cfe5d1e test/e2e: Replace deprecated pointer function
Signed-off-by: TommyStarK <thomasmilox@gmail.com>
2023-01-05 18:43:58 +01:00
Patrick Ohly
f0cc053544 e2e framework: enable extending TimeoutContext
If we were to add new fields in TimeoutContext, the current users of
NewFrameworkWithCustomTimeouts might run into failures unless they get modified
to also set those new fields. This is error-prone.

A better approach is to let users of NewFrameworkWithCustomTimeouts override
fields by setting just those and use the normal defaults for the others.
2023-01-03 17:01:33 +01:00
Patrick Ohly
cdb0cd0387 e2e framework: simplify timeout defaults
Filling in the default values directly in the struct eliminates the need to
define constants that aren't used anywhere else.
2023-01-03 16:31:13 +01:00
Patrick Ohly
0c2c027ebc e2e: clean up listing
It doesn't make sense for the E2E framework to have command line options that
don't do anything because then all test suites built with the framework inherit
those options.

For -list-images and -list-conformance-tests the solution is to move the
implementation into the framework (-list-images) respectively move the flag
into test/e2e (-list-conformance-tests).

The placement was decided based on the observation that image patching is
common functionality while conformance testing is specific to one test suite.
2022-12-23 10:36:06 +01:00
Kubernetes Prow Robot
020fb2eb77
Merge pull request #113538 from pohly/e2e-ginkgo-timeline
e2e: ginkgo timeline
2022-12-21 13:53:28 -08:00
Patrick Ohly
766e7e07da e2e framework: verify JUnit result, not the in-memory structs
The old tests were no longer passing with Ginkgo v2.5.0. Instead of keeping the
old approach of checking recorded spec results, now the tests actually cover
what we care about most: the results recorded in JUnit.

This also gets rid of having to repeat the stack backtrace twice (once as part
of the output, once for the separate backtrace field).
2022-12-21 07:55:07 +01:00
Patrick Ohly
f6cdd37046 e2e framework: move JUnit write function
This makes it possible to unit test it.
2022-12-21 07:55:07 +01:00
Patrick Ohly
a53753575a e2e framework: stop overriding ginkgo verbosity/progress
The default settings from Ginkgo are useful enough for Kubernetes since
timeline support was added (https://github.com/onsi/ginkgo/issues/1069).
2022-12-21 07:55:07 +01:00
Patrick Ohly
463d42aebf e2e framework: remove injection of failures and skips into GinkgoWriter
Ginkgo's timeline support will do that for us now.
2022-12-21 07:55:07 +01:00
Patrick Ohly
f4a837affb e2e framework: avoid storing redundant failure message string
All information that we want will be written into the failure XML element's
data. We don't need the message tag and don't want it because our
tools (kettle, testgrid, spyglass) would then just concatenate the two strings.

This gets implemented for us by Ginkgo. However, truncating the failure message
is not supported there at the moment. It's unclear how important that is,
therefore this (recently added feature) gets removed.
2022-12-21 07:55:07 +01:00
Patrick Ohly
6db4b741dd e2e: dump full report information
The Ginkgo CLI output no longer has the full output. We need the reports
generated by Ginkgo for that.
2022-12-21 07:55:07 +01:00
Kubernetes Prow Robot
55181b72a2
Merge pull request #113799 from r4f4/nettest-priv-ip
tests: network: Prefer internal IPs first
2022-12-20 17:37:24 -08:00
Patrick Ohly
a51999e951 e2e framework: support Ginkgo decorators for framework.ConformanceIt
Additional parameters like ginkgo.SpecTimeout may also be relevant for
conformance tests.
2022-12-19 13:53:08 +01:00
Patrick Ohly
2f6c4f5eab e2e: use Ginkgo context
All code must use the context from Ginkgo when doing API calls or polling for a
change, otherwise the code would not return immediately when the test gets
aborted.
2022-12-16 20:14:04 +01:00
Patrick Ohly
2695ed6a0a e2e: add missing error checks
Not checking for some error conditions must have been an oversight.
2022-12-14 07:39:51 +01:00
Patrick Ohly
8168434f0c e2e storage: explain why cleanup is done inside the function
This code must run during the test and thus cannot be moved into DeferCleanup.
2022-12-14 07:39:51 +01:00
Kubernetes Prow Robot
233f9c210a
Merge pull request #114092 from anggao/update_method_name
e2e: Update GetExternalIP and GetInternalIP method name to make them more explicit.
2022-12-13 12:39:46 -08:00
Kubernetes Prow Robot
bb6edfb96b
Merge pull request #114454 from pohly/e2e-framework-output-test-flake
e2e framework: fix unit test flake
2022-12-13 10:28:15 -08:00
Kubernetes Prow Robot
2df02b3ef5
Merge pull request #114425 from pohly/e2e-ginkgo-timeouts-defer-cleanup
e2e ginkgo timeouts: simplify code
2022-12-13 10:28:09 -08:00
Patrick Ohly
0df49542b1 e2e framework: fix unit test flake
The Gingo v2 time suffix is hh:mm:ss without the .xyz sub-second details if the
time stamp happens to land exactly on a second.

This change fixes test flakes like the following:

    -STEP: Building a namespace api object, basename test-namespace
    +STEP: Building a namespace api object, basename test-namespace 12/13/22 11:43:53

    --- FAIL: TestCleanup (36.79s)
2022-12-13 15:29:18 +01:00
Patrick Ohly
d4729008ef e2e: simplify test cleanup
ginkgo.DeferCleanup has multiple advantages:
- The cleanup operation can get registered if and only if needed.
- No need to return a cleanup function that the caller must invoke.
- Automatically determines whether a context is needed, which will
  simplify the introduction of context parameters.
- Ginkgo's timeline shows when it executes the cleanup operation.
2022-12-13 08:09:01 +01:00
Kubernetes Prow Robot
923ee203f3
Merge pull request #110991 from thockin/svc-typenames-starTrafficPolicyType
Svc typenames star traffic policy type
2022-12-12 18:47:33 -08:00
Ang Gao
3540f948e9 Update method name to make it more explicit 2022-12-12 21:50:07 +00:00
Patrick Ohly
896c6fa082 e2e framework: add AnnotatedLocationWithOffset
This is useful in helper functions which themselves don't need to be recorded.
2022-12-12 11:30:07 +01:00
Patrick Ohly
7454c3ff81 e2e metrics: remove incorrect comment
The "should report resource usage through the resource metrics api" E2E test
calls getResourceMetrics, which calls GrabKubeletMetricsWithoutProxy.
2022-12-12 11:30:07 +01:00
Patrick Ohly
f897c86119 e2e framework: support ignoring "not found" errors during DeferCleanup
The wrapper can be used in combination with ginkgo.DeferCleanup to ignore
harmless "not found" errors during delete operations.

Original code suggested by Onsi Fakhouri.
2022-12-12 11:30:07 +01:00
Patrick Ohly
73b60ba769 e2e framework: don't fail when DumpAllNamespaceInfo is nil
It is set in all of the test/e2e* suites, but not in the ginkgo output
tests. This check is needed before adding a test case there which would trigger
this nil pointer access.
2022-12-12 11:30:07 +01:00
Ang Gao
1931494333 make GetSubnetPrefix IP family agnostic 2022-12-12 01:26:42 +00:00
Tim Hockin
d0e2b06850
ServiceExternalTrafficPolicyType: s/Type//
Rename ServiceExternalTrafficPolicyType => ServiceExternalTrafficPolicy
2022-12-11 13:48:27 -08:00
Patrick Ohly
a4e6fea164 e2e: fix line numbering in unit tests
Adding the "context" import in the previous commit must get compensated by
removing one of the blank lines in the output unit tests, otherwise the stack
backtrace don't match expectations.
2022-12-10 21:49:05 +01:00
Patrick Ohly
16f05373f4 e2e framework internal: normalize anonymous functions with parameters
This will become relevant for

   ginkgo.BeforeEach(func(ctx context.Context) { ... })
2022-12-10 21:47:17 +01:00
Patrick Ohly
df5d84ae81 e2e: accept context from Ginkgo
Every ginkgo callback should return immediately when a timeout occurs or the
test run manually gets aborted with CTRL-C. To do that, they must take a ctx
parameter and pass it through to all code which might block.

This is a first automated step towards that: the additional parameter got added
with

    sed -i 's/\(framework.ConformanceIt\|ginkgo.It\)\(.*\)func() {$/\1\2func(ctx context.Context) {/' \
        $(git grep -l -e framework.ConformanceIt -e ginkgo.It )
    $GOPATH/bin/goimports -w $(git status | grep modified: | sed -e 's/.* //')

log_test.go was left unchanged.
2022-12-10 19:50:18 +01:00
Antonio Ojea
5eb30f2762 be more strict on network timeouts
Change-Id: Ic4044af837047f31e6d60368b79d34dde1adbb98
2022-12-02 16:31:20 +00:00
Paco Xu
75f89875f8 use etcd 3.5.6-0 after promotion 2022-11-24 09:45:56 +08:00
Kubernetes Prow Robot
d34bdeea41
Merge pull request #113853 from jsafrane/add-volumepath
Fix subpath disruptive tests
2022-11-15 07:56:52 -08:00
Rafael Fonseca
f98aa32c5a tests: network: Prefer internal IPs first
Many clusters block direct requests from internal resources to the nodes
external IPs as best practice. All accesses from internal resources that
want to access resources running on nodes go through load balancers,
nodes being on private or public subnets. Let's prefer internal IPs
first, so the tests can work even when there are security group rules
present blocking requests to the external IPs.

We should not require ExternalIP for Conformance, but should keep
testing ExternalIPs in sig network.

Signed-off-by: Rafael Fonseca <r4f4rfs@gmail.com>
2022-11-14 17:56:46 +01:00
Kubernetes Prow Robot
d1c0171aed
Merge pull request #111023 from pohly/dynamic-resource-allocation
dynamic resource allocation
2022-11-11 16:21:56 -08:00
Kubernetes Prow Robot
e4d46148de
Merge pull request #113826 from jsafrane/add-openstack
Add CSI migration of OpenStack Cinder volumes
2022-11-11 11:00:07 -08:00
Kubernetes Prow Robot
e451cf5ffe
Merge pull request #113169 from soltysh/use_waitgroup
Use goroutine to speed up volume clenaups
2022-11-11 10:59:55 -08:00
Jan Safranek
3fdd4ca7a4 Fix subpath disruptive tests
Add volumePath parameter to all disruptive checks, so subpath tests can use
"/test-volume" and disruptive tests can use "/mnt/volume1" for their
respective Pods.
2022-11-11 14:03:33 +01:00
Jan Safranek
6005c3b512 Remove OpenStack cloud provider
And keep OpenStack Cinder CSI translation
2022-11-11 12:04:55 +01:00
Patrick Ohly
5433da0419 test: adapt reference data to Pod changes
These tests print a v1.Pod with Sprintf, which includes the new field even when
it is empty.
2022-11-10 20:08:24 +01:00
Jan Safranek
5b284a50b7 Revert "Remove references to openstack and cinder"
This reverts commit 9bbf01bae9.
2022-11-10 18:25:30 +01:00
Michal Wozniak
41285a7c91 Add e2e test for job pod failure policy used to match pod disruption 2022-11-10 15:50:02 +01:00
Maciej Szulik
0253397fbd
Use goroutine to speed up volume clenaups
This removes WaitTimeoutForPodNoLongerRunningOrNotFoundInNamespace
introduced in f2b9479f8e and changes
the test to use goroutines to speed up the cleanups.
2022-11-10 13:15:06 +01:00
Michal Wozniak
c803892bd8 Enable the feature into beta 2022-11-09 09:02:40 +01:00
Kubernetes Prow Robot
d619f60e0f
Merge pull request #113442 from Huang-Wei/kep-3521-C
[KEP-3521] Part 3: Bug fixes, integration & E2E Test
2022-11-08 15:08:15 -08:00
Kubernetes Prow Robot
6687496832
Merge pull request #113383 from pohly/e2e-failure-handling
e2e: improve failure handling
2022-11-08 12:42:31 -08:00
Wei Huang
abe0c5d5b4
E2E test for KEP Scheduling Readiness Gates 2022-11-08 12:38:21 -08:00
Michal Wozniak
52cd6755eb Add pod disruption conditions for kubelet initiated failures 2022-11-07 11:23:22 +01:00
Kubernetes Prow Robot
1bf4af4584
Merge pull request #111930 from azylinski/new-histogram-pod_start_sli_duration_seconds
New histogram: Pod start SLI duration
2022-11-04 07:28:14 -07:00
Wei Huang
7b6293b6b6
APIs, Validation and condition enforcements
- New API field .spec.schedulingGates
- Validation and drop disabled fields
- Disallow binding a Pod carrying non-nil schedulingGates
- Disallow creating a Pod with non-nil nodeName and non-nil schedulingGates
- Adds a {type:PodScheduled, reason:WaitingForGates} condition if necessary
- New literal SchedulingGated in the STATUS column of `k get pod`
2022-11-03 14:32:34 -07:00
Kubernetes Prow Robot
c98aef484d
Merge pull request #112895 from nokia/kep-1435-GA
KEP-1435 Mixed Protocol values in LoadBalancer Service GA
2022-11-03 05:43:35 -07:00
Laszlo Janosi
9d75c958ce Fix review comments. Implement endpoint port validation that verifies the protocol, too. 2022-11-03 10:54:14 +02:00
Kubernetes Prow Robot
a9f87ad6c8
Merge pull request #113384 from pohly/e2e-formatting
e2e: formatting enhancements
2022-11-02 21:40:08 -07:00
Kubernetes Prow Robot
3cf75a2f76
Merge pull request #103177 from arkbriar/support_cancelable_exec_stream
Support cancelable SPDY executor stream
2022-11-02 19:47:36 -07:00
Laszlo Janosi
82ce61afc7 KEP-1435 Mixed Protocol values in LoadBalancer Service GA
Removed the unit tests that test the cases when the MixedProtocolLBService feature flag was false - the feature flag is locked to true with GA
Added an integration test to test whether the API server accepts an LB Service with different protocols.
Added an e2e test to test whether a service which is exposed by a multi-protocol LB Service is accessible via both ports.
Removed the conditional validation that compared the new and the old Service definitions during an update - the feature flag is locked to true with GA.
2022-11-02 13:44:52 +02:00
Patrick Ohly
80c554c5b0 e2e framework: simplify failure and skip handling
The original intention (adding more information for later analysis)
is probably obsolete because there is no code which does anything
with the extended error.

The code in upgrade_suite.go collected it in an in-memory JUnit report, but
then didn't do anything with that field. The code also wouldn't work for
failures detected by Ginkgo itself, like the upcoming timeout handling. If the
upgrade suite needs the information, it probably should get it from Gingko with
a ReportAfterSuite call instead of depending in some fragile interception
mechanism.
2022-11-02 09:23:01 +01:00
Patrick Ohly
023baa5e45 e2e framework: truncate too long failure messages when writing JUnit
Our tooling cannot handle very long failure messages well:
- when unfolding a test in the spyglass UI, it fills the entire screen
- failure correlation for http://go.k8s.io/triage has resource constraints

We cannot enforce that all tests only produce short failure messages and even
if we could, depending on the test failure, including more information may be
useful to understand it.

To achieve both goals (summary for correlation and overview, all details
available when digging deeper), too longer failure messages now get truncated,
with the full message guaranteed to be captured in the test output.

"Too long" is arbitrarily chosen to be similar to the gomega.MaxLength because
that has been a limit for failure message size in the past.
2022-10-28 15:43:48 +02:00
Patrick Ohly
b3f4cd66cd e2e framework: add -gomega-max-length parameter
When gomega.format exceeds the default size of 4000, it truncates and prints:

  Gomega truncated this representation as it exceeds 'format.MaxLength'.
  Consider having the object provide a custom 'GomegaStringer' representation
  or adjust the parameters in Gomega's 'format' package.

  Learn more here: https://onsi.github.io/gomega/#adjusting-output

These instructions don't help the user of the e2e.test binary unless we provide
a command line flag.
2022-10-28 15:43:48 +02:00