Commit Graph

20 Commits

Author SHA1 Message Date
Marcus Puckett 77c921aa92 Fix flakiness with kubectl wait tests (#111168)
* Prepend reactor not watch reactor

This forces the object to be created first it looks like, avoiding a race condition in testing.
Use PrependReactor instead of PrependWatchReactor

Decrease test timeouts

No need to be this long
Revert use of new scheme to reuse same scheme for all tests

Allow 1 to 2 actions in stale observed generation failure

Allow range of test action lengths

Reduce test flakiness
Fix TestWaitForJSONPathCondition/handles_watch_condition_change

Set delete wait options properly

cherry pick original changes back into branch

* Revert delete timeout setting change

* Remove validateActions functions

* Remove go-spew

Kubernetes-commit: dcc54dec19fa5f4605cf679af5289b173ce6015f
2022-07-28 20:44:55 +00:00
Marcus Puckett d9fb1ec8c6 Revert "Move kubectl wait to informers with a cache to avoid hanging due to objects disappearing from the cluster"
Kubernetes-commit: 5badb731a895dfa0a188a3f4aec2d3edfe709b12
2022-07-18 08:48:29 -07:00
Marcus Puckett 3c41b7369c Add cases for when --timeout=0 and tests
Kubernetes-commit: 61ebfdb2018b0dae4e364d0170610ccdec18b2c1
2022-07-01 16:49:31 -07:00
Marcus Puckett 533f9479cc Revert "Move kubectl wait to informers with a cache to avoid hanging due to objects disappearing from the cluster (#108086)"
This reverts commit 171431ca2c009c0a576fa288b7df892b59299389.

Kubernetes-commit: a6bd1e6ac90f3ccbbe527e44e3217a8420636c41
2022-07-01 13:45:18 -07:00
Marcus Puckett 2e38f74bcc Move kubectl wait to informers with a cache to avoid hanging due to objects disappearing from the cluster (#108086)
* move to using informers for getObjAndCheckCondition

* move to using informers for IsDeleted

* update tests to handle new informer methodology

* set minimum timeout to 1s because informer can't handle less for caching reasons

* fix null return for deletes issue

Kubernetes-commit: 171431ca2c009c0a576fa288b7df892b59299389
2022-06-30 20:54:29 +00:00
W. Trevor King cdcb6ed356 kubectl: Document --for's Unicode case-folding condition-value comparison
When the wait command was added in 76794643c5 (add wait, 2018-05-18, #64034),
this comparison was via ToLower.  It moved to use Unicode case folding
[1,2] in f4940cf55f (Staticcheck:
vendor/k8s.io/kubectl/pkg/scale|describe/versioned|cmd/top|cmd/util/editor|cmd/top,
2020-01-21, #87403).

[1]: https://pkg.go.dev/strings#EqualFold
[2]: http://www.unicode.org/reports/tr30/tr30-1.html

Kubernetes-commit: f69d52338b21da938021af37f49f49a83016534d
2021-08-30 19:41:08 -07:00
Chok Yip Lau 8d1dfaeedb Added JSONPath wait for kubectl wait
Co-authored-by: Eddie Zaneski <eddiezane@gmail.com>

Kubernetes-commit: 8fcf98ec3bb16ddf32ea1688752e6b7e2a14eaa4
2021-10-04 16:19:08 -04:00
Andrea Hoffer 09ed00ef49 Minor adjustments to descriptions and example text
Kubernetes-commit: 6b736f348483bb6b20d4633319305960f4d9e4c1
2021-07-06 15:05:26 -04:00
Ling Samuel cf01e4558b fix kubectl wait --for=delete ignore not found
Signed-off-by: Ling Samuel <lingsamuelgrace@gmail.com>

Kubernetes-commit: 99cdc37e2a89df1f86045f295916c00266e4d034
2020-11-19 14:48:28 +08:00
changshuchao 7d1600ce5a code cleanup for kubectl apply_edit_last_applied.go,wait.go,completion.go,cp.go
Signed-off-by: changshuchao <chang.shuchao1@zte.com.cn>

Kubernetes-commit: e229ca33cff782e0bf602f43312b9a168aa58c4c
2021-03-07 05:04:30 +08:00
Nick Maliwacki f3ec5d79c4 add .status.observedGeneration tests & update names
Kubernetes-commit: bca0ddeba0d669093d04a148cef4d4179e2fa271
2021-01-13 22:35:58 -08:00
Nick Maliwacki a84bbc2022 wait ensures observedGeneration >= generation
Kubernetes-commit: 44aff9917566885ab5d8cc712a3330bac1923214
2020-12-20 00:35:31 -08:00
chymy 942504dab2 add i18n.T in waitExample
Signed-off-by: chymy <chang.min1@zte.com.cn>

Kubernetes-commit: e472a7724bc6f105e07c9a0d6362cd0e8390d2fe
2021-01-28 10:35:21 +08:00
熊中谅10171568 1d4e99420e add more usage info for kubectl wait option --for
add more usage info for kubectl wait option --for

Kubernetes-commit: 033e4a58182fb90e36d5f6cc3f291a2ea114998a
2020-12-29 21:08:03 +08:00
Karl 'NaN' Wikström 38408eaa8c cleanup: use i18n.T on all command descriptions
cleanup: use i18n.T only on string literals

cleanup: sort imports

Add i18n dependency for wait.go

Remove translation on envResource

cleanup: translate string instead of variable

cleanup: sort imports

cleanup: translate string literal only

Kubernetes-commit: cc8428566ea7160c5b20410a1bee53ca7ddb998e
2020-10-09 13:16:13 +02:00
David Eads 6cadd0558f add GVK to fake dynamic client to match actual behavior
Kubernetes-commit: f4383458432cd67714e9ce0acde56a2ed5c24a21
2020-10-29 15:53:34 -04:00
zhouya0 3c159f733a kubectl wait add ignore not found flag
Kubernetes-commit: 3d2d95e99dd1219331ef3d32e63b39122a0ef116
2020-05-11 09:19:10 +08:00
Jordan Liggitt 0c62c9a83a client-go dynamic client: add context to callers
Kubernetes-commit: b7c2faf26c2a25427794478c6265e6d55e8acb5a
2020-03-06 10:17:41 -05:00
gavinfish 275513cb52 Staticcheck: vendor/k8s.io/kubectl/pkg/scale|describe/versioned|cmd/top|cmd/util/editor|cmd/top
Kubernetes-commit: f4940cf55fd7c2787b370464d491a764c4febd78
2020-01-21 10:13:10 +08:00
Sean Sullivan c6063dd846 Move pkg/kubectl/cmd/{command} to staging
Kubernetes-commit: 0e0ea523392f1121f61f99ac30a9bc2043eaed90
2019-08-01 11:01:40 -07:00