Skip to content

Conversation

@sivchari
Copy link
Member

What this PR does / why we need it:

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Part of #12272

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Nov 21, 2025
@k8s-ci-robot
Copy link
Contributor

This PR is currently missing an area label, which is used to identify the modified component when generating release notes.

Area labels can be added by org members by writing /area ${COMPONENT} in a comment

Please see the labels list for possible areas.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@k8s-ci-robot k8s-ci-robot added the do-not-merge/needs-area PR is missing an area label label Nov 21, 2025
@k8s-ci-robot k8s-ci-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Nov 21, 2025
Signed-off-by: sivchari <[email protected]>
Copy link
Member Author

Choose a reason for hiding this comment

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

Mix them without separating.

Copy link
Member

@sbueringer sbueringer Nov 21, 2025

Choose a reason for hiding this comment

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

I just intentionally added these in the PR merged yesterday. Please keep them (please see the godocs I explicitly added to the nolint statements)

(please revert all changes to this file, this util will soon'ish also be used in other controller / repos. It has to handle Requeue appropriately and must have the corresponding unit test coverage for it)

@k8s-ci-robot
Copy link
Contributor

@sivchari: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
pull-cluster-api-test-main 952c490 link true /test pull-cluster-api-test-main

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

Copy link
Member

@neolit123 neolit123 left a comment

Choose a reason for hiding this comment

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

/approve
given this PR is a task from the parent issue.

@sivchari

  • how are we deciding on 10 seconds vs 20 seconds in various places?
  • should we add some constants in a central file?

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: neolit123

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Nov 21, 2025
Comment on lines 214 to +215
log.Error(err, "Failed to configure the patch helper")
return ctrl.Result{Requeue: true}, nil
return ctrl.Result{RequeueAfter: 20 * time.Second}, nil
Copy link
Member

Choose a reason for hiding this comment

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

This should just be (this is pretty old code :))

		return ctrl.Result{}, err

(also drop the log in l.214)

// Get the workload cluster client.
workloadCluster, err := controlPlane.GetWorkloadCluster(ctx)
if err != nil {
log.V(2).Info("cannot get remote client to workload cluster, will requeue", "cause", err)
Copy link
Member

Choose a reason for hiding this comment

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

Same here, let's just drop the log and return the error directly (and use an empty result)

})

return ctrl.Result{Requeue: true}, nil
return ctrl.Result{RequeueAfter: 20 * time.Second}, nil
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
return ctrl.Result{RequeueAfter: 20 * time.Second}, nil
return ctrl.Result{}, nil // No need to requeue here. Machine deletion above triggers reconciliation.


// Requeue the control plane, in case there are additional operations to perform
return ctrl.Result{Requeue: true}, nil
return ctrl.Result{RequeueAfter: 20 * time.Second}, nil
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
return ctrl.Result{RequeueAfter: 20 * time.Second}, nil
return ctrl.Result{}, nil // No need to requeue here. Machine creation above triggers reconciliation.


// Requeue the control plane, in case there are other operations to perform
return ctrl.Result{Requeue: true}, nil
return ctrl.Result{RequeueAfter: 20 * time.Second}, nil
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
return ctrl.Result{RequeueAfter: 20 * time.Second}, nil
return ctrl.Result{}, nil // No need to requeue here. Machine creation above triggers reconciliation.


// Requeue the control plane, in case there are additional operations to perform
return ctrl.Result{Requeue: true}, nil
return ctrl.Result{RequeueAfter: 20 * time.Second}, nil
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
return ctrl.Result{RequeueAfter: 20 * time.Second}, nil
return ctrl.Result{}, nil // No need to requeue here. Machine deletion above triggers reconciliation.


result, err := r.initializeControlPlane(ctx, controlPlane)
g.Expect(result).To(BeComparableTo(ctrl.Result{Requeue: true}))
g.Expect(result.RequeueAfter).To(Equal(20 * time.Second))
Copy link
Member

Choose a reason for hiding this comment

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

please change the unit tests (also in other files) to check for result.IsZero to BeTrue() (where applicable)

Copy link
Member

@sbueringer sbueringer Nov 21, 2025

Choose a reason for hiding this comment

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

I just intentionally added these in the PR merged yesterday. Please keep them (please see the godocs I explicitly added to the nolint statements)

(please revert all changes to this file, this util will soon'ish also be used in other controller / repos. It has to handle Requeue appropriately and must have the corresponding unit test coverage for it)

@sbueringer
Copy link
Member

sbueringer commented Nov 21, 2025

/hold

Until the findings are resolved

@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Nov 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. do-not-merge/needs-area PR is missing an area label size/M Denotes a PR that changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants