Skip to content

chore(apps): reflect restore result in component phase - #10840

Open
leon-ape wants to merge 4 commits into
mainfrom
support/restore-phase-aggregation
Open

chore(apps): reflect restore result in component phase#10840
leon-ape wants to merge 4 commits into
mainfrom
support/restore-phase-aggregation

Conversation

@leon-ape

@leon-ape leon-ape commented Sep 1, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • rename the workload condition identifier from InstanceRestore to Restore before release

  • project initial Restore status into Component phase while preserving explicit lifecycle and workload failure precedence

  • report Component Progressing=True while Restore is running

  • keep Component Healthy unchanged and keep Available based on the standard Component phase and existing availability policy

  • keep Cluster phase aggregation and Ready calculation unchanged

  • avoid reconciling Component Restore twice in one status pass

  • update phase API descriptions and cover Component and Cluster aggregation outcomes

  • use Completed/Running/Failed as Restore condition reasons; keep Progressing reason RestoreRunning

Tests

  • /Users/leon/Workspace/github.com/apecloud/kubeblocks/scripts/codex-go-test.sh ./apis/workloads/v1 ./controllers/apps/component ./pkg/controller/instance ./pkg/controller/instanceset ./pkg/controller/instanceset2 -count=1
  • /Users/leon/Workspace/github.com/apecloud/kubeblocks/scripts/codex-go-test.sh ./controllers/apps/cluster -run TestAPIs -ginkgo.focus=compose.cluster.phase -count=1
  • focused Component status Ginkgo suite
  • full Component, Cluster, Instance, InstanceSet and ITS2 packages
  • dataprotection backup-waits-for-Cluster-Restore regression test

Generation

  • make generate manifests doc (run twice; stable output)
  • API reference regenerated; CRD, Helm CRD, DeepCopy, and client code have no additional changes

@leon-ape
leon-ape requested a review from a team as a code owner September 1, 2026 09:48
@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

CLA Recheck Instructions

Usage:
  - /recheck-cla: Trigger a re-check of CLA status for this pull request.
Example:
  - /recheck-cla

@github-actions github-actions Bot added the size/L Denotes a PR that changes 100-499 lines. label Sep 1, 2026
@leon-ape leon-ape changed the title fix(apps): reflect restore result in component phase chore(apps): reflect restore result in component phase Sep 1, 2026
@leon-ape leon-ape added the nopick Not auto cherry-pick when PR merged label Sep 1, 2026
@codecov

codecov Bot commented Sep 1, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 81.25000% with 15 lines in your changes missing coverage. Please review.
✅ Project coverage is 65.73%. Comparing base (305e2ae) to head (592ec46).

Files with missing lines Patch % Lines
...ers/apps/component/transformer_component_status.go 77.04% 13 Missing and 1 partial ⚠️
pkg/controller/instanceset/reconciler_status.go 85.71% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #10840      +/-   ##
==========================================
+ Coverage   65.69%   65.73%   +0.03%     
==========================================
  Files         510      510              
  Lines       64860    64911      +51     
==========================================
+ Hits        42610    42667      +57     
+ Misses      18462    18459       -3     
+ Partials     3788     3785       -3     
Flag Coverage Δ
unittests 65.73% <81.25%> (+0.03%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

nopick Not auto cherry-pick when PR merged size/L Denotes a PR that changes 100-499 lines.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants