Commit Graph

112397 Commits

Author SHA1 Message Date
Patrick Ohly
c466c49682 e2e apps: avoid assertions in wait.Until callback
wait.Until catches panics and logs them, which leads to confusing
output. Besides, the test is written so that failures must get reported to the
main goroutine.
2022-12-12 11:30:07 +01:00
Patrick Ohly
2168dd5334 e2e apps: capture expected state before making changes
Looking up the expected nodes in the goroutine raced with the test making
changes to the configuration. When doing (unrelated?) changes, the test started
to fail:

Oct 23 15:47:03.092: INFO: Unexpected error:
    <*errors.errorString | 0xc001154c70>: {
        s: "no subset of available IP address found for the endpoint test-rolling-update-with-lb within timeout 2m0s",
    }
Oct 23 15:47:03.092: FAIL: no subset of available IP address found for the endpoint test-rolling-update-with-lb within timeout 2m0s
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
8c27313cfd e2e storage: don't panic when server stops
Now that everything is connected to a per-test context, the gRPC server might
encounter an error before it gets shut down normally. We must not panic in that
case because it would kill the entire Ginkgo worker process. This is not even
an error, so just log it as info message.
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
Kubernetes Prow Robot
bc6afee049
Merge pull request #114361 from kerthcet/cleanup/emit-errors-more-precise
Tune the error messages in scheduler cache
2022-12-12 00:15:44 -08:00
Kubernetes Prow Robot
c80b03fee8
Merge pull request #113499 from kerthcet/cleanup/map-empty-judgement
Fix: resourceToWeightMap will never be nil here
2022-12-12 00:15:33 -08:00
Kubernetes Prow Robot
23c65ec590
Merge pull request #114411 from aojea/e2e_panic
don't assert error inside goroutines
2022-12-11 10:13:32 -08:00
Kubernetes Prow Robot
92ec97149c
Merge pull request #114408 from liggitt/gorilla
Mark github.com/gorilla dependencies to avoid increasing use
2022-12-11 09:07:25 -08:00
Kubernetes Prow Robot
f256321e76
Merge pull request #114401 from pohly/e2e-ginkgo-timeouts-callbacks
e2e: accept context from Ginkgo
2022-12-11 09:07:14 -08:00
Kubernetes Prow Robot
074f3f5aca
Merge pull request #114358 from SataQiu/using-v2-20221208
Autoscaling: advance v2 as the preferred API version over v1
2022-12-11 09:05:00 -08:00
Antonio Ojea
2956bb39a1 don't assert error inside goroutines
Change-Id: Ifed741d1973e96063378620daf7b8b22647bc2fb
2022-12-11 15:34:17 +00:00
Kubernetes Prow Robot
014e3be258
Merge pull request #114409 from SataQiu/kubeadm-20221211
kubeadm: cleanup the temporary workaround about kubelet --container-runtime flag
2022-12-11 03:11:14 -08:00
Kubernetes Prow Robot
47d58265ae
Merge pull request #114404 from hoskeri/discovery-error-check
Check the correct error in d.downloadAPIs
2022-12-11 00:05:15 -08:00
SataQiu
76bb3364d2 kubeadm: cleanup the temporary workaround about kubelet --container-runtime flag 2022-12-11 15:52:12 +08:00
SataQiu
40a6d6306a autoscaling: advance v2 as the preferred API version over v1 2022-12-11 13:09:39 +08:00
Jordan Liggitt
cdebf3a64c
Mark github.com/gorilla dependencies to avoid increasing use 2022-12-10 23:54:13 -05:00
Kubernetes Prow Robot
909f5be802
Merge pull request #113707 from lucacome/bump-grpc
Bump grpc to v1.51.0
2022-12-10 16:43:42 -08:00
Abhijit Hoskeri
450ba4f506 Check the correct error in d.downloadAPIs
The error result of `d.downloadAPIs()` is set in `aerr`,
not `err`.

This prevents a nil-ptr dereference of apiGroups in the next step.

Signed-off-by: Abhijit Hoskeri <abhijithoskeri@gmail.com>
2022-12-10 16:32:02 -08:00
Kubernetes Prow Robot
8d2fbfc5a9
Merge pull request #113933 from liggitt/retry-race
Fix client-go request retry race
2022-12-10 13:43:41 -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
Kubernetes Prow Robot
d2ed6d355e
Merge pull request #114279 from pacoxu/coredns-v1.10.0
update coredns to v1.10.0
2022-12-10 12:21:52 -08:00
Kubernetes Prow Robot
39537ccc12
Merge pull request #113909 from cncal/fix_bounded_frequency_runner_unittest
fix wrong statement in unittest of BoundedFrequencyRunner
2022-12-10 12:21:41 -08:00
Patrick Ohly
0d73c0d0e5 e2e: fix linter errors
Adding "ctx" as parameter in the previous commit led to some linter errors
about code that overwrites "ctx" without using it.

This gets fixed by replacing context.Background or context.TODO in those code
lines with the new ctx parameter.

Two context.WithCancel calls can get removed completely because the context
automatically gets cancelled by Ginkgo when the test returns.
2022-12-10 20:35:46 +01:00
Kubernetes Prow Robot
1456799d39
Merge pull request #114294 from seans3/remove-dry-run-verifier
Removes unnecessary dry run verifier
2022-12-10 10:51:41 -08: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
Sean Sullivan
530f65d6fd Removes unnecessary dry run verifier 2022-12-10 09:43:01 -08:00
Kubernetes Prow Robot
63ff4a2659
Merge pull request #114392 from pohly/e2e-apimachinery-cleanup
e2e apimachinery: simplify cleanup
2022-12-10 09:06:31 -08:00
Kubernetes Prow Robot
b7684889be
Merge pull request #114379 from SergeyKanzhelev/RotateCertificateIsGA
rotate-certificates is a GA feature now
2022-12-10 09:06:24 -08:00
Kubernetes Prow Robot
1a21ee2790
Merge pull request #114374 from seans3/remove-pkg-apply
Removes unused k8s.io/kubectl/pkg/apply files
2022-12-10 09:06:17 -08:00
Kubernetes Prow Robot
5aec108c7f
Merge pull request #114356 from Iceber/remove_resources
remove enabled by default beta resources that have been removed
2022-12-10 09:06:09 -08:00
Kubernetes Prow Robot
a40111cdd0
Merge pull request #114350 from Huang-Wei/fix-flaky-test
Deflake a preemption test that may patch Node incorrectly
2022-12-10 09:06:02 -08:00
Kubernetes Prow Robot
870e872ebb
Merge pull request #114343 from skitt/autorest-to
Use k8s utils pointer instead of Azure autorest/to
2022-12-10 09:05:55 -08:00
Kubernetes Prow Robot
f380944261
Merge pull request #114338 from champtar/kubeadm-priority
kubeadm: set priority for "system-node-critical" Pods
2022-12-10 09:05:48 -08:00
Kubernetes Prow Robot
50ed8284ab
Merge pull request #114334 from claudiubelu/fix-files-unittest
unittests: Fixes TestReplaceFile for Windows
2022-12-10 09:05:41 -08:00
Kubernetes Prow Robot
b1d98bd7b3
Merge pull request #114300 from liggitt/ascii-art-format
Fix table in sync controller comment
2022-12-10 07:55:25 -08:00
Kubernetes Prow Robot
9758911fd5
Merge pull request #114252 from ardaguclu/scale-piped-input
kubectl scale: Use visitor only once
2022-12-10 07:55:19 -08:00
Kubernetes Prow Robot
9f85f6d1f1
Merge pull request #114249 from ardaguclu/improve-exec-multi-error
kubectl exec: return descriptive error message when multi resource passed
2022-12-10 07:55:12 -08:00
Kubernetes Prow Robot
c2e55fb066
Merge pull request #114246 from mxpv/mount
Make Mounter interface exportable
2022-12-10 07:55:05 -08:00
Kubernetes Prow Robot
9d3b1cd038
Merge pull request #114229 from aojea/min-sync-period
use kube-proxy defaults values for CI
2022-12-10 07:54:59 -08:00
Kubernetes Prow Robot
73849a8d28
Merge pull request #114228 from saschagrunert/kubectl-convert-static
Link `kubectl-convert` binary statically
2022-12-10 07:54:52 -08:00
Kubernetes Prow Robot
4f28854c09
Merge pull request #114223 from sathyanarays/improve_scheduler_test_coverage
Improving scheduler extender unit tests
2022-12-10 07:54:44 -08:00
Kubernetes Prow Robot
caf49b6d86
Merge pull request #114220 from Iceber/update_feature_gate_phase_version
fix the alpha phase version of LegacyServiceAccountTokenTracking
2022-12-10 07:54:37 -08:00
Kubernetes Prow Robot
a125912cd5
Merge pull request #114218 from apelisse/move-fieldmanager
Re-factor FieldManager tests for better re-use
2022-12-10 07:54:30 -08:00
Kubernetes Prow Robot
a800f1e0c0
Merge pull request #114216 from alculquicondor/avoid-serialization
Avoid serialization of maps when log level < 10
2022-12-10 07:54:24 -08:00
Kubernetes Prow Robot
e23139d487
Merge pull request #114196 from elmiko/spellfix-for-daemonset-test
fix spelling error in e2e upgrade apps daemonset test
2022-12-10 07:54:17 -08:00
Kubernetes Prow Robot
9d02dda241
Merge pull request #114194 from dims/add-more-validation-for-copy-paste-errors
Add more validation to rules.yaml
2022-12-10 07:54:10 -08:00
Kubernetes Prow Robot
7f1b8a33a8
Merge pull request #114181 from danwinship/minimize-iptables-ensure-rule
Don't re-run EnsureChain/EnsureRules on partial syncs
2022-12-10 07:53:59 -08:00