Skip to content

feat: introduce asynchronous nodepool creation in backend in a disabled state#5790

Merged
openshift-merge-bot[bot] merged 1 commit into
Azure:mainfrom
miguelsorianod:move-cs-nodepoolcreation-to-backend-1
Jun 30, 2026
Merged

feat: introduce asynchronous nodepool creation in backend in a disabled state#5790
openshift-merge-bot[bot] merged 1 commit into
Azure:mainfrom
miguelsorianod:move-cs-nodepoolcreation-to-backend-1

Conversation

@miguelsorianod

Copy link
Copy Markdown
Collaborator

The backend logic to perform asynchronous nodepool creation is disabled for now: the added controller is only executed when ClusterServiceID is not set. For now in frontend we always store the ClusterServiceID so it is guaranteed to not be executed.

Additionally, the nodepool create operation has been updated to retrieve the ClusterServiceID from the NodePool cosmos resource instead of the operation. This allows us to stop relying on it for when we stop setting it in frontend.

Copilot AI review requested due to automatic review settings June 25, 2026 14:43
@openshift-ci openshift-ci Bot requested review from geoberle and janboll June 25, 2026 14:43
@deads2k

deads2k commented Jun 25, 2026

Copy link
Copy Markdown
Collaborator

/lgtm

Copilot AI left a comment

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.

Pull request overview

Introduces backend support for asynchronous node pool creation by adding a controller that can “adopt or create” a Cluster Service node pool and persist its ClusterServiceID onto the NodePool Cosmos document, while updating the node pool create operation controller to read the ClusterServiceID from the NodePool resource (rather than relying on the operation’s InternalID).

Changes:

  • Add a NodePool → Cluster Service create/adoption controller that POSTs the node pool when missing and then writes the resulting ClusterServiceID back to Cosmos.
  • Update the node pool create operation controller to drive operation status updates off the NodePool Cosmos document (listers + ClusterServiceID from the resource).
  • Expand tests and adjust test fixtures to use the ARO-HCP node pool href format.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
backend/pkg/controllers/operationcontrollers/utils.go Removes legacy shared polling helper for node pool operations.
backend/pkg/controllers/operationcontrollers/test_helpers_test.go Updates node pool internal ID fixture to ARO-HCP node pool href format.
backend/pkg/controllers/operationcontrollers/operation_node_pool_create.go Switches to listers and NodePool-backed ClusterServiceID for status polling and operation updates.
backend/pkg/controllers/operationcontrollers/operation_node_pool_create_test.go Updates/extends operation-node-pool-create unit tests for new reconciliation gating and lister usage.
backend/pkg/controllers/nodepoolcreationcontrollers/node_pool_cluster_service_create_controller.go Adds controller to create/adopt CS node pools and persist ClusterServiceID onto NodePool Cosmos documents.
backend/pkg/controllers/nodepoolcreationcontrollers/node_pool_cluster_service_create_controller_test.go Adds unit tests covering create/adopt flows and error propagation.
backend/pkg/app/backend.go Wires the new controller into backend controller startup and updates controller construction dependencies.

Comment on lines +146 to +152
var persistErr *arm.CloudErrorBody
if operationalState.provisioningState == arm.ProvisioningStateFailed {
persistErr = &arm.CloudErrorBody{
Code: arm.CloudErrorCodeInvalidRequestContent,
Message: operationalState.message,
}
}
@miguelsorianod miguelsorianod force-pushed the move-cs-nodepoolcreation-to-backend-1 branch from 7f84a38 to c851f60 Compare June 25, 2026 15:09
@openshift-ci openshift-ci Bot removed the lgtm label Jun 25, 2026
@deads2k

deads2k commented Jun 25, 2026

Copy link
Copy Markdown
Collaborator

/lgtm

@openshift-ci openshift-ci Bot added the lgtm label Jun 25, 2026
@miguelsorianod

Copy link
Copy Markdown
Collaborator Author

/hold until we discuss the handling of the code to be returned in the operation.

Copilot AI review requested due to automatic review settings June 25, 2026 18:32
@openshift-ci openshift-ci Bot removed the lgtm label Jun 25, 2026

Copilot AI left a comment

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.

Pull request overview

Copilot reviewed 9 out of 9 changed files in this pull request and generated 3 comments.

Comment thread backend/pkg/controllers/operationcontrollers/operation_node_pool_create.go Outdated
Comment thread backend/pkg/controllers/operationcontrollers/operation_state_v2.go Outdated
@miguelsorianod miguelsorianod force-pushed the move-cs-nodepoolcreation-to-backend-1 branch from 20868b4 to b774f30 Compare June 26, 2026 11:04
Comment thread backend/pkg/controllers/operationcontrollers/operation_state_v2.go Outdated
Comment thread backend/pkg/controllers/operationcontrollers/operation_state_v2.go Outdated
Copilot AI review requested due to automatic review settings June 26, 2026 13:46
@miguelsorianod miguelsorianod force-pushed the move-cs-nodepoolcreation-to-backend-1 branch from b774f30 to 240f08d Compare June 26, 2026 13:46
@deads2k

deads2k commented Jun 26, 2026

Copy link
Copy Markdown
Collaborator

/lgtm

Copilot AI left a comment

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.

Pull request overview

Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.

Comment on lines +146 to +152
var persistErr *arm.CloudErrorBody
if operationalState.provisioningState == arm.ProvisioningStateFailed {
persistErr = &arm.CloudErrorBody{
Code: arm.CloudErrorCodeInvalidRequestContent,
Message: operationalState.message,
}
}
@miguelsorianod miguelsorianod force-pushed the move-cs-nodepoolcreation-to-backend-1 branch from 240f08d to d27249c Compare June 26, 2026 14:30
@openshift-ci openshift-ci Bot removed the lgtm label Jun 26, 2026
@deads2k

deads2k commented Jun 26, 2026

Copy link
Copy Markdown
Collaborator

/lgtm

@openshift-ci openshift-ci Bot added the lgtm label Jun 26, 2026
@miguelsorianod miguelsorianod force-pushed the move-cs-nodepoolcreation-to-backend-1 branch from d27249c to f387bbc Compare June 26, 2026 16:02
Copilot AI review requested due to automatic review settings June 26, 2026 16:02
@openshift-ci openshift-ci Bot removed the lgtm label Jun 26, 2026

Copilot AI left a comment

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.

Pull request overview

Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.

…ed state

The backend logic to perform asynchronous nodepool creation is disabled
for now: the added controller is only executed when ClusterServiceID is
not set. For now in frontend we always store the ClusterServiceID so it
is guaranteed to not be executed.

Additionally, the nodepool create operation has been updated to retrieve
the ClusterServiceID from the NodePool cosmos resource instead of the
operation. This allows us to stop relying on it for when we stop setting
it in frontend.
@miguelsorianod miguelsorianod force-pushed the move-cs-nodepoolcreation-to-backend-1 branch from f387bbc to fd620eb Compare June 26, 2026 17:10
@miguelsorianod

Copy link
Copy Markdown
Collaborator Author

/hold cancel

@deads2k

deads2k commented Jun 29, 2026

Copy link
Copy Markdown
Collaborator

/lgtm

@openshift-ci openshift-ci Bot added the lgtm label Jun 29, 2026
@openshift-ci

openshift-ci Bot commented Jun 29, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: deads2k, miguelsorianod

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

The pull request process is described here

Details 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

@miguelsorianod

Copy link
Copy Markdown
Collaborator Author

/retest

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

/retest-required

Remaining retests: 0 against base HEAD d3cc67f and 2 for PR HEAD fd620eb in total

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

/retest-required

Remaining retests: 0 against base HEAD 5c8939b and 1 for PR HEAD fd620eb in total

@openshift-merge-bot openshift-merge-bot Bot merged commit 2d8805d into Azure:main Jun 30, 2026
15 of 16 checks passed
stevekuznetsov pushed a commit that referenced this pull request Jun 30, 2026
…creation-to-backend-1"

This reverts commit 2d8805d, reversing
changes made to 5c8939b.
stevekuznetsov added a commit that referenced this pull request Jun 30, 2026
Revert "Merge pull request #5790 from miguelsorianod/move-cs-nodepool-creation-to-backend-1
miguelsorianod added a commit to miguelsorianod/ARO-HCP that referenced this pull request Jun 30, 2026
…depoolcreation-to-backend-1"

This reverts commit 0666787,
effectively reverting the revert.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants