Tests: Replace Update() calls with Patch()#401
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
f42c80e to
dd631b3
Compare
|
/test pull-kvp-functional-test |
2 similar comments
|
/test pull-kvp-functional-test |
|
/test pull-kvp-functional-test |
385217a to
fea61e9
Compare
This commit includes a new patch package to easily build JSON patches. This will allow easy refactoring of tests using Update, which is more error prone. Signed-off-by: Alvaro Romero <alromero@redhat.com> Assisted-by: Claude <noreply@anthropic.com>
fea61e9 to
d280985
Compare
|
/test pull-kvp-functional-test |
| } | ||
|
|
||
| retryOnceOnErr(updateDataVolume(f.KvClient, f.Namespace.Name, name, updateFunc)).Should(BeNil()) | ||
| retryOnceOnErr(func() error { |
There was a problem hiding this comment.
do we still need the retryOnceOnErr for patch?
There was a problem hiding this comment.
I don't think we do, good catch!
| return err | ||
| } | ||
| patchData, err := patch.New( | ||
| patch.WithAddLabel("velero.io/exclude-from-backup", "true", dv.Labels), |
There was a problem hiding this comment.
Can we use this velero const for this label: https://github.com/vmware-tanzu/velero/blob/ba5e7681ff60641cd6427619181bf7991bb43c7e/pkg/apis/velero/v1/labels_annotations.go#L103 ?
This commit refactors tests to use Patch client calls instead of Updates. Signed-off-by: Alvaro Romero <alromero@redhat.com> Assisted-by: Claude <noreply@anthropic.com>
d280985 to
fc6385c
Compare
|
/test pull-kvp-functional-test |
weshayutin
left a comment
There was a problem hiding this comment.
looks good.. LET'S GO @aglitke :)
|
/retest |
|
/test all |
|
/test pull-kvp-functional-test |
|
Trying to figure out where these flakes come from. |
|
There has been no activity on this PR for 45 days. What you can do:
/lifecycle stale |
|
/remove-lifecycle stale |
What this PR does / why we need it:
Some tests have been failing due to update conflicts. Using Patch() instead of Update() avoids these races and follows the pattern already adopted in other kubevirt repositories.
This PR:
Special notes for your reviewer:
Assisted-By: Claude noreply@anthropic.com
Release note: