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

Retry completion status patch for backup and restore resources #8068

Merged

Conversation

kaovilai
Copy link
Contributor

@kaovilai kaovilai commented Jul 31, 2024

Signed-off-by: Tiger Kaovilai [email protected]

Thank you for contributing to Velero!

Please add a summary of your change

We will add retries with timeout to existing patch calls that moves a backup/restore from InProgress to a different status phase such as

  • FailedValidation (final)
  • Failed (final)
  • Finalizing
  • FinalizingPartiallyFailed

and from above non final phases to

  • Completed
  • PartiallyFailed

backup_controller.go

  • Should already reconcile again
    • From "" or New to FailedValidation/InProgress
  • Retry added
    • InProgress to
      • WaitingForPluginOperations
      • WaitingForPluginOperationsPartiallyFailed
      • Finalizing
      • FinalizingPartiallyFailed
      • Failed

backup_operations_controller.go

  • Should already reconcile again
    • WaitingForPluginOperations/WaitingForPluginOperationsPartiallyFailed to *

backup_finalizer_controller.go

  • Retry added
    • Finalizing/FinalizingPartiallyFailed to
      • Completed
      • PartiallyFailed

restore_controller.go

  • Retry added
    • InProgress to
      • WaitingForPluginOperations
      • WaitingForPluginOperationsPartiallyFailed
      • Finalizing
      • FinalizingPartiallyFailed

restore_operations_controller.go

  • Should already reconcile again
    • WaitingForPluginOperations/WaitingForPluginOperationsPartiallyFailed to *

restore_finalizer_controller.go

  • Retry added
    • Finalizing/FinalizingPartiallyFailed to
      • Completed
      • PartiallyFailed

Does your change fix a particular issue?

Fixes #7207
Implements #8063

Please indicate you've done the following:

  • Accepted the DCO. Commits without the DCO will delay acceptance.
  • 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.

Copy link

codecov bot commented Jul 31, 2024

Codecov Report

Attention: Patch coverage is 16.12903% with 26 lines in your changes missing coverage. Please review.

Project coverage is 59.17%. Comparing base (46801a0) to head (c643ee5).
Report is 10 commits behind head on main.

Files with missing lines Patch % Lines
pkg/client/retry.go 0.00% 13 Missing ⚠️
pkg/util/kube/client.go 0.00% 6 Missing ⚠️
pkg/cmd/server/server.go 0.00% 2 Missing ⚠️
pkg/controller/backup_controller.go 33.33% 1 Missing and 1 partial ⚠️
pkg/controller/restore_controller.go 60.00% 1 Missing and 1 partial ⚠️
pkg/controller/backup_finalizer_controller.go 0.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8068      +/-   ##
==========================================
- Coverage   59.21%   59.17%   -0.04%     
==========================================
  Files         367      367              
  Lines       30708    30730      +22     
==========================================
+ Hits        18184    18185       +1     
- Misses      11069    11090      +21     
  Partials     1455     1455              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@kaovilai kaovilai force-pushed the retry-patching-inprogress-implementation branch from da7c086 to 0d37bfe Compare August 1, 2024 02:11
@kaovilai kaovilai force-pushed the retry-patching-inprogress-implementation branch from 0d37bfe to 0eebe39 Compare September 4, 2024 18:56
@kaovilai kaovilai force-pushed the retry-patching-inprogress-implementation branch 3 times, most recently from 1c9cf96 to ce33845 Compare September 10, 2024 14:35
@github-actions github-actions bot added the Area/Design Design Documents label Sep 10, 2024
@kaovilai kaovilai force-pushed the retry-patching-inprogress-implementation branch 9 times, most recently from d2ab68c to b9b7504 Compare September 10, 2024 20:46
@kaovilai kaovilai marked this pull request as ready for review September 10, 2024 20:46
@kaovilai kaovilai force-pushed the retry-patching-inprogress-implementation branch 2 times, most recently from 1f21b2d to f8a0d68 Compare September 10, 2024 20:50
Signed-off-by: Tiger Kaovilai <[email protected]>

update to design vmware-tanzu#8063

Signed-off-by: Tiger Kaovilai <[email protected]>
@kaovilai kaovilai force-pushed the retry-patching-inprogress-implementation branch from f8a0d68 to c643ee5 Compare September 10, 2024 21:01
@ywk253100 ywk253100 merged commit b523a1b into vmware-tanzu:main Sep 11, 2024
43 of 45 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.

Velero didn't retry on failed Restore CR status update, causing the CR to remain stuck in "InProgress"
3 participants