Skip to content

chore: expose more conditions in component status#10032

Merged
cjc7373 merged 16 commits intomainfrom
support/refactor-comp-status
Apr 21, 2026
Merged

chore: expose more conditions in component status#10032
cjc7373 merged 16 commits intomainfrom
support/refactor-comp-status

Conversation

@cjc7373
Copy link
Copy Markdown
Contributor

@cjc7373 cjc7373 commented Jan 29, 2026

The current component condition provides very little information about why the component is not healthy.

@github-actions github-actions Bot added the size/L Denotes a PR that changes 100-499 lines. label Jan 29, 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

@cjc7373 cjc7373 added the pick-1.1 Auto cherry-pick to release-1.1 when PR merged label Jan 29, 2026
@cjc7373 cjc7373 force-pushed the support/refactor-comp-status branch from eae9b69 to 88b0496 Compare January 30, 2026 09:50
@codecov
Copy link
Copy Markdown

codecov Bot commented Jan 30, 2026

Codecov Report

❌ Patch coverage is 83.33333% with 38 lines in your changes missing coverage. Please review.
✅ Project coverage is 52.21%. Comparing base (49bdaac) to head (92383ca).
⚠️ Report is 10 commits behind head on main.

Files with missing lines Patch % Lines
...ers/apps/component/transformer_component_status.go 79.27% 15 Missing and 8 partials ⚠️
controllers/apps/cluster/utils.go 74.28% 6 Missing and 3 partials ⚠️
...rollers/apps/cluster/transformer_cluster_status.go 94.80% 2 Missing and 2 partials ⚠️
pkg/controller/component/available.go 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #10032      +/-   ##
==========================================
+ Coverage   52.17%   52.21%   +0.03%     
==========================================
  Files         529      529              
  Lines       59813    60402     +589     
==========================================
+ Hits        31210    31537     +327     
- Misses      25496    25763     +267     
+ Partials     3107     3102       -5     
Flag Coverage Δ
unittests 52.21% <83.33%> (+0.03%) ⬆️

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

☔ View full report in Codecov by Sentry.
📢 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.

Comment thread pkg/controller/component/available.go Outdated
@cjc7373 cjc7373 force-pushed the support/refactor-comp-status branch from a001419 to 8038a82 Compare February 3, 2026 07:45
@cjc7373 cjc7373 marked this pull request as ready for review February 3, 2026 07:46
@cjc7373 cjc7373 requested a review from a team as a code owner February 3, 2026 07:46
Comment thread apis/apps/v1/component_types.go Outdated
FailedComponentPhase ComponentPhase = "Failed"
)

// component conditions
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Recommend a set of condition definitions:

const (
    // ConditionTypeProvisioned indicates whether the required resources have been provisioned
    ConditionTypeProvisioned = "Provisioned"

    // ConditionTypeReady indicates whether the Component is ready to provide service
    ConditionTypeReady = "Ready"

    // ConditionTypeHealthy indicates whether the Component is healthy
    ConditionTypeHealthy = "Healthy"

    // ConditionTypeAvailable indicates whether the Component is available (based on availability policy)
    ConditionTypeAvailable = "Available"

    // ConditionTypeProgressing indicates whether the Component is undergoing changes
    ConditionTypeProgressing = "Progressing" // or Reconciling

    // ConditionTypeTerminating indicates whether the Component is being terminated
    ConditionTypeTerminating = "Terminating"
)

@leon-ape leon-ape marked this pull request as draft February 10, 2026 02:17
@cjc7373 cjc7373 marked this pull request as ready for review March 6, 2026 09:49
@cjc7373 cjc7373 requested a review from leon-ape March 6, 2026 11:05
@github-actions github-actions Bot added size/XL Denotes a PR that changes 500-999 lines. and removed size/L Denotes a PR that changes 100-499 lines. labels Mar 9, 2026
Comment thread pkg/controller/component/available.go Outdated
Comment thread controllers/apps/cluster/transformer_cluster_status.go Outdated
Comment thread controllers/apps/cluster/transformer_cluster_status.go Outdated
Comment thread controllers/apps/component/transformer_component_status.go Outdated
Comment thread controllers/apps/component/transformer_component_status.go Outdated
Comment thread controllers/apps/component/transformer_component_status.go Outdated
Comment thread controllers/apps/component/transformer_component_status.go Outdated
Comment thread controllers/apps/component/transformer_component_status.go Outdated
@cjc7373 cjc7373 requested a review from leon-ape April 15, 2026 05:15
@github-actions github-actions Bot added size/XXL Denotes a PR that changes 1000+ lines. and removed size/XL Denotes a PR that changes 500-999 lines. labels Apr 20, 2026
@apecloud-bot apecloud-bot added the approved PR Approved Test label Apr 21, 2026
@cjc7373 cjc7373 merged commit 769e4ce into main Apr 21, 2026
51 of 53 checks passed
@cjc7373 cjc7373 deleted the support/refactor-comp-status branch April 21, 2026 08:26
@github-actions github-actions Bot added this to the Release 1.2.0 milestone Apr 21, 2026
@apecloud-bot
Copy link
Copy Markdown
Collaborator

/cherry-pick release-1.1

@apecloud-bot
Copy link
Copy Markdown
Collaborator

🤖 says: cherry pick action finished successfully 🎉!
See: https://github.com/apecloud/kubeblocks/actions/runs/24712171961

apecloud-bot pushed a commit that referenced this pull request Apr 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved PR Approved Test pick-1.1 Auto cherry-pick to release-1.1 when PR merged size/XXL Denotes a PR that changes 1000+ lines.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants