Skip to content

Conversation

@cjc7373
Copy link
Contributor

@cjc7373 cjc7373 commented Oct 21, 2025

When kb enables IN_PLACE_POD_VERTICAL_SCALING feature gate, but k8s does not, a vscale operation may fail in its because kube-apiserver does not have the "resize" subresource. ITS controller should error emit a warning event like:

Warning  FailedReconcile              15m (x12 over 15m)  instance-set-controller  reconcile failed: the server could not find the requested resource

But instead, its controller silently ignores this error and makes the reconcilation successful.

@github-actions github-actions bot added the size/XS Denotes a PR that changes 0-9 lines. label Oct 21, 2025
@apecloud-bot
Copy link
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.0

@codecov
Copy link

codecov bot commented Oct 21, 2025

Codecov Report

❌ Patch coverage is 0% with 9 lines in your changes missing coverage. Please review.
✅ Project coverage is 59.71%. Comparing base (3b2f3dd) to head (bc72205).

Files with missing lines Patch % Lines
pkg/controller/kubebuilderx/plan_builder.go 0.00% 7 Missing and 1 partial ⚠️
pkg/controller/kubebuilderx/controller.go 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #9823      +/-   ##
==========================================
+ Coverage   59.67%   59.71%   +0.03%     
==========================================
  Files         551      551              
  Lines       59786    59786              
==========================================
+ Hits        35679    35701      +22     
+ Misses      20848    20826      -22     
  Partials     3259     3259              
Flag Coverage Δ
unittests 59.71% <0.00%> (+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.

@github-actions github-actions bot added size/S Denotes a PR that changes 10-29 lines. and removed size/XS Denotes a PR that changes 0-9 lines. labels Oct 21, 2025
@cjc7373 cjc7373 marked this pull request as ready for review October 22, 2025 02:58
@cjc7373 cjc7373 requested a review from a team as a code owner October 22, 2025 02:58
@cjc7373 cjc7373 added the pick-1.0 Auto cherry-pick to release-1.0 when PR merged label Oct 22, 2025
Copy link
Contributor

@leon-inf leon-inf left a comment

Choose a reason for hiding this comment

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

Errors from status calls should also be wrapped to maintain consistency.


func (b *PlanBuilder) createObject(ctx context.Context, vertex *model.ObjectVertex) error {
err := b.cli.Create(ctx, vertex.Obj, clientOption(vertex))
if err != nil && !apierrors.IsAlreadyExists(err) {
Copy link
Contributor

Choose a reason for hiding this comment

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

The IsAlreadyExists error should be ignored too.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You mean should NOT be ingored? I think ignoring IsAlreadyExists is safe. And similarly, I think ignoring IsNotFound in delete operations is also safe.

}
if len(finalizer) > 0 && controllerutil.RemoveFinalizer(vertex.Obj, finalizer) {
err := b.cli.Update(ctx, vertex.Obj, clientOption(vertex))
if err != nil && !apierrors.IsNotFound(err) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Ditto.

}
if !model.IsObjectDeleting(vertex.Obj) {
err := b.cli.Delete(ctx, vertex.Obj, clientOption(vertex))
if err != nil && !apierrors.IsNotFound(err) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Ditto.

if err != nil && !apierrors.IsNotFound(err) {
b.transCtx.logger.Error(err, fmt.Sprintf("delete %T error: %s", vertex.Obj, vertex.Obj.GetName()))
return err
b.transCtx.logger.Error(err, fmt.Sprintf("delete %T error: %s", vertex.Obj, klog.KObj(vertex.Obj)))
Copy link
Contributor

Choose a reason for hiding this comment

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

Remove it.

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

Labels

pick-1.0 Auto cherry-pick to release-1.0 when PR merged size/S Denotes a PR that changes 10-29 lines.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants