Skip to content

feat(ops): add configurable DeleteRestoreCR option for rebuild#10110

Closed
destinyoooo wants to merge 1 commit intoapecloud:mainfrom
destinyoooo:delete-restore-after-rebuild
Closed

feat(ops): add configurable DeleteRestoreCR option for rebuild#10110
destinyoooo wants to merge 1 commit intoapecloud:mainfrom
destinyoooo:delete-restore-after-rebuild

Conversation

@destinyoooo
Copy link
Copy Markdown

Changes

  • Add DeleteRestoreCR *bool field to RebuildInstance struct
  • Giving users control over whether Restore custom resources should be automatically deleted after the rebuild-instance operation completes successfully
  • Add unit tests

@destinyoooo destinyoooo requested review from a team and wangyelei as code owners March 27, 2026 09:26
@github-actions github-actions bot added the size/L Denotes a PR that changes 100-499 lines. label Mar 27, 2026
@apecloud-bot
Copy link
Copy Markdown
Collaborator

Auto Cherry-pick Instructions

Usage:
  - /nopick: Not auto cherry-pick when PR merged.
  - /pick: release-x.x [release-x.x]: Auto cherry-pick to the specified branch when PR merged.

Example:
  - /nopick
  - /pick release-1.1

@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Mar 27, 2026

CLA assistant check
All committers have signed the CLA.

@apecloud-bot apecloud-bot added the pre-approve Fork PR Pre Approve Test label Mar 27, 2026
@wangyelei
Copy link
Copy Markdown
Contributor

hi @destinyoooo, what's the purpose of this PR? now, the restore resource get automatically cleaned up after the ops is deleted.

@destinyoooo
Copy link
Copy Markdown
Author

hi @destinyoooo, what's the purpose of this PR? now, the restore resource get automatically cleaned up after the ops is deleted.

I noticed a todo tag, but didn't see any related restore resource cleanup, so I created this pull request.

@wangyelei
Copy link
Copy Markdown
Contributor

thanks for your pr, but there's an issue with this implementation. DeleteRestoreCR is defined on a single rebuildFrom struct. According to the API definition, it should only delete the corresponding restore, not overreach and clean up all restores. I'm closing this PR for now, and we can address it later when there's a real user scenario.

@wangyelei wangyelei closed this Mar 30, 2026
@github-actions github-actions bot added this to the Release 1.2.0 milestone Mar 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pre-approve Fork PR Pre Approve Test size/L Denotes a PR that changes 100-499 lines.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants