Skip to content

Async cs interaction from backend combined - #6121

Merged
openshift-merge-bot[bot] merged 17 commits into
Azure:mainfrom
machi1990:async-cs-interaction-from-backend-combined
Jul 17, 2026
Merged

Async cs interaction from backend combined#6121
openshift-merge-bot[bot] merged 17 commits into
Azure:mainfrom
machi1990:async-cs-interaction-from-backend-combined

Conversation

@machi1990

Copy link
Copy Markdown
Collaborator

What

Async cs interaction from backend combined

Why

Contains the change of:

#6041 externalauth create enablement. Depends on phase1 PR c439110 (Wed Jul 8 04:04:35 2026)
#6082 cluster create enablement. Depends on phase1 PR 50e62e1 (Wed Jul 8 20:52:35 2026 +0000)
#6067 updates for all resources enablement. Depends on phase1 PR eea2b31 (Tue Jul 14 05:39:21 2026 +0000)
#5538 subscription lock removal from frontend. Depends on all the three above being rolled out to prod

PRs that we want to run e2e test together and verify that they actually works combined.

Testing

Testing is required for feature completion and tests should be part of the pull
request along with the feature changes.

Describe the testing provided. If you did not add tests, provide a clear
justification.

Special notes for your reviewer

This is not intended for merge but to verify the PRs together things works as expected

PR Checklist

  • PR is scoped to a single task (no mixed concerns)
  • Title follows Conventional Commits format
  • Summary explains the "Why" behind the change
  • Linked to relevant ticket/issue
  • Screenshots included (if graph/UI/metrics changes)
  • Self-reviewed the diff
  • CI/CD checks are passing (ignore Tide)
  • Draft PR used for WIP (if applicable)
  • Commit history is clean (rebased/squashed)
  • Tricky code blocks are commented
  • Specific reviewers tagged
  • All comment threads resolved before merge

If E2E tests are included:

  • E2E tests follow Principles of Good E2E Test Case Design
  • If new E2E use case is covered (via a new test or new check/verifier),
    demonstrate that the test is able to detect a defect/error and fail with
    proper error message and logs which communicates nature of the problem.

Copilot AI review requested due to automatic review settings July 16, 2026 17:47
@machi1990

Copy link
Copy Markdown
Collaborator Author

/hold

Not intended to merge, only opened to verify that the 4 PRs together work as expected

@machi1990

Copy link
Copy Markdown
Collaborator Author

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.

Copilot wasn't able to review this pull request because it exceeds the maximum number of files (300). Try reducing the number of changed files and requesting a review from Copilot again.

Jakob Gray (JakobGray) and others added 15 commits July 17, 2026 10:22
Cluster Service no longer returns synchronous 400s for platform
uniqueness checks after async CS create migration. Move those checks to
the frontend so invalid cluster PUTs fail at admission time with the same
error messages CS used in performSpecValidation. These checks are best-effort
and may not catch concurrent creates.

- Prefetch subscription clusters and node pools in newClusterAdmissionContext
- Add admitClusterManagedResourceGroupName, admitClusterSubnetResourceID,
  and admitClusterNetworkSecurityGroupResourceID (CREATE only)
- Add NSG same-subscription and not-in-MRG rules to static validation
  (parity with validateAroHcpClusterNetworkSecurityGroupResourceId)

Co-authored-by: Cursor <cursoragent@cursor.com>
Mirror CS validateAroHcpSwiftSubnetSameVnet: vnetIntegrationSubnetId must
use the same VNet as subnetId.

Co-authored-by: Cursor <cursoragent@cursor.com>
Mirror CS validateAzureOperatorsAuthenticationManagedIdentitiesUniqueWithinCluster
across service, control-plane, and data-plane operator identities.
Align with CS validateAroHcpEtcdEncryptionDataEncryptionKeyManagementMode:
only CustomerManaged is accepted until platform-managed etcd encryption is supported.
Stop calling PostCluster during HCP cluster create in the frontend.
Persist the cluster and enqueue the ARM operation with an empty
ClusterServiceID; the backend controller now owns CS provisioning.
Remove frontend-only provision-shard and noop provision/deprovision flags.
…rontendCRUD

Add an explicit setClusterServiceID step so frontend integration tests mirror
deferred CS create (backend stamps the ID) without auto-mutating Cosmos in
httpCreate. Parent CS IDs are stamped in artifact steps and Go helpers
(StampRandomClusterServiceID); child IDs derive from the parent.

- Random cluster HREFs by default, or fixed IDs via cluster-service-id.json
- Seed the CS mock (loadClusterService) before cluster updates so
  GetCluster/UpdateCluster paths are exercised
- Name setClusterServiceID step suffixes after the target resource
- Stamp CS ID before completeOperation to match production ordering; update
  mid-suite cosmosCompare expectations (e.g. create-current instanceVersion)
- BuildCSCluster/clusterCSVersionID now require ControlPlaneVersion
  .DesiredVersion on the ServiceProviderCluster, removing the old fallback to
  the customer-facing version on the HCP cluster document
- Document child-create vs cluster-update patterns in claude.md

Co-authored-by: Cursor <cursoragent@cursor.com>
Move Cluster Service interaction out of the frontend create
path and hand it off to the backend's async externalauth creation
controllers.

External Auth create operations no longer set an InternalID as it is
not needed anymore when using the new external auth creation approach
in backend.
…Complete

After external auth create moved to the backend, frontend integration tests no
longer persist serviceProviderProperties.clusterServiceID on create.
Update/delete paths still require it, so tests that only run the frontend
would fail with "clusterServiceID is required".

Add createExternalAuthAndComplete to the integrationutils test helper
DeriveClusterServiceID, which is used by external auth cross-version
roundtrip tests.
Stop calling Cluster Service synchronously from the frontend on
cluster PUT/PATCH.

Cluster configuration changes are now persisted to Cosmos and propagated to CS by
the backend ClusterClusterServiceUpdateDispatch controller.

- Remove UpdateCluster and UpdateClusterAutoscaler calls from
  updateHCPClusterInCosmos. The frontend only writes the cluster document and
  creates the update operation.
- Create update operations with an empty internal ID instead of the CS cluster ID,
  since CS propagation is no longer tied to the frontend request path.
- Add syncClusterClusterServiceUpdateDispatch integration test step to invoke
  the dispatch syncer directly against the CS mock.
Stop calling Cluster Service synchronously from the frontend on
node pool PUT/PATCH.

Node Pool configuration changes are now persisted to Cosmos and propagated to CS by
the backend NodePoolClusterServiceUpdateDispatch controller.

- Remove the UpdateNodePool call from updateNodePoolInCosmos. The frontend only
  writes the node pool document and creates the update operation.
- Create update operations with an empty internal ID instead of the CS node pool ID,
  since CS propagation is no longer tied to the frontend request path.
Stop calling Cluster Service synchronously from the frontend on
external auth PUT/PATCH.

External Auth configuration changes are now persisted to Cosmos and propagated to CS by
the backend ExternalAuthClusterServiceUpdateDispatch controller.

- Remove UpdateExternalAuth call from updateExternalAuthInCosmos. The frontend only
  writes the external auth document and creates the update operation.
- Create update operations with an empty internal ID instead of the CS external auth ID,
  since CS propagation is no longer tied to the frontend request path.
Now that Clusters Service calls have been moved to the RP backend,
the frontend pods need only write to Cosmos DB before responding
to client requests. This can be done atomically using Cosmos DB's
Transactional Batch Operations and therefore the cloud-distributed
locking pattern is no longer needed.

The locking pattern was a bottleneck in high-traffic subscriptions
and was the source of much latency in the Azure control plane.
@machi1990
Manyanda Chitimbo (machi1990) force-pushed the async-cs-interaction-from-backend-combined branch from 4831ab0 to 57d9b7f Compare July 17, 2026 08:59
Copilot AI review requested due to automatic review settings July 17, 2026 08:59

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.

Copilot wasn't able to review this pull request because it exceeds the maximum number of files (300). Try reducing the number of changed files and requesting a review from Copilot again.

Copilot AI review requested due to automatic review settings July 17, 2026 09:41

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.

Copilot wasn't able to review this pull request because it exceeds the maximum number of files (300). Try reducing the number of changed files and requesting a review from Copilot again.

@machi1990

Copy link
Copy Markdown
Collaborator Author

/retest

@machi1990

Copy link
Copy Markdown
Collaborator Author

/test e2e-parallel

@deads2k

Copy link
Copy Markdown
Collaborator

/hold cancel

Current plan is to serially rollout production, so the rollout is good. Additionally, the following states will result if we skew

  1. old frontend, new backend - works as expected
  2. new frontend, new backend - works as expected
  3. new frontend, old backend - delay until backend updates

At any point, we can safely downgrade to the previous deployed level. I'm going to merge this as our best option. If it breaks, first downgrade. Then get me on slack and point it out for us to debug.

/lgtm

@openshift-ci

openshift-ci Bot commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

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

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

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.

5 participants