Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[release-1.12]: CP issue #6807: Retry failed create when using generateName #6943

Merged
merged 1 commit into from Oct 16, 2023

Conversation

sseago
Copy link
Collaborator

@sseago sseago commented Oct 11, 2023

When creating resources with generateName, apimachinery does not guarantee uniqueness when it appends the random suffix to the generateName stub, so if it fails with already exists error, we need to retry.

Does your change fix a particular issue?

Fixes #6807

Please indicate you've done the following:

  • [x ] Accepted the DCO. Commits without the DCO will delay acceptance.
  • [x ] Created a changelog file or added /kind changelog-not-required as a comment on this pull request.
  • Updated the corresponding documentation in site/content/docs/main.

@sseago sseago force-pushed the retry-generateName1.12 branch 2 times, most recently from 6626cd0 to 73608cc Compare October 11, 2023 16:23
@codecov
Copy link

codecov bot commented Oct 11, 2023

Codecov Report

Merging #6943 (457fcc6) into release-1.12 (b498847) will increase coverage by 0.00%.
The diff coverage is 39.28%.

@@              Coverage Diff              @@
##           release-1.12    #6943   +/-   ##
=============================================
  Coverage         60.47%   60.47%           
=============================================
  Files               246      247    +1     
  Lines             26376    26398   +22     
=============================================
+ Hits              15950    15965   +15     
- Misses             9304     9312    +8     
+ Partials           1122     1121    -1     
Files Coverage Δ
pkg/podvolume/backupper.go 84.16% <100.00%> (+0.24%) ⬆️
pkg/podvolume/restorer.go 91.53% <100.00%> (+0.13%) ⬆️
pkg/repository/ensurer.go 100.00% <100.00%> (ø)
pkg/restore/dataupload_retrieve_action.go 75.75% <100.00%> (ø)
pkg/cmd/cli/backup/delete.go 70.51% <0.00%> (ø)
pkg/controller/gc_controller.go 56.07% <0.00%> (ø)
pkg/client/retry.go 0.00% <0.00%> (ø)

... and 1 file with indirect coverage changes

When creating resources with generateName, apimachinery
does not guarantee uniqueness when it appends the random
suffix to the generateName stub, so if it fails with
already exists error, we need to retry.

Signed-off-by: Scott Seago <sseago@redhat.com>
@Lyndon-Li Lyndon-Li merged commit ef1b981 into vmware-tanzu:release-1.12 Oct 16, 2023
23 of 24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants