← Back to Pull requests

refactor(fleet): remove Maestro management cluster registration #7817

Closed
unknown closed this pull request without merging on Oct 30, 2026 15:12 UTC
View on GitHub
unknown unknown commented on Oct 28, 2026 17:54 UTC
Author

What

  • Remove the fleet Maestro registration controller, dependency injection, flags, and readiness/prerequisite gates.

  • Remove Maestro fields and validation from ManagementCluster, registration CLI/chart/pipeline inputs, and admin translations.

  • Stop passing Maestro configuration to Clusters Service. Adopt and convert shards using AKS resource identity while retaining duplicate and stored-shard safeguards.

  • Preserve existing external CS configuration through status-only updates; update tests and generated Helm fixtures.

  • Actively remove legacy MaestroRegistered conditions during lifecycle reconciliation, preserving unrelated conditions and existing readiness behavior. Retain the shared ManagementClusterConditionMaestroRegistered constant while cleanup uses it. Mark the cleanup as temporary until rollout reaches all environments and the condition is gone.

  • Regenerate tracked vendor artifacts to remove the unused Maestro dependency after rebasing onto the newer offline-build base.
  • Why

    Follow-up to https://github.com/Azure/ARO-HCP/pull/7665: management cluster registration and readiness must no longer depend on Maestro.

    Testing

    Latest vendoring correction, rebased onto 79bc58595a08c100b28b43c1719a07549a7d2bb4:

  • Reproduced the image-build failure from e2e-parallel run 2115839364582871040. Tests never ran: the newer base introduced tracked vendoring and offline Docker builds, but the removed Maestro requirement was still marked explicit in vendor/modules.txt.

  • The actual offline admin Make build consumer passed on the base, failed with the exact vendoring mismatch after applying the PR, and passed on the repaired final tree.

  • Repository targets make vendor and make verify-vendor passed. The generated correction only removes unused Maestro vendor files and its modules entry: 21 files, 5,689 deletions, with no module or unrelated dependency drift.

  • Full Fleet tests, scoped internal tests, and Admin stamp tests passed.

  • Final tree comparison confirmed upstream plus the previously published PR changes plus only the generated vendor removal. The second commit's patch is unchanged; signatures, whitespace, backups, and clean-state checks passed.
  • This is host-side offline build-consumer validation, not a full container/all-image/E2E run. Baseline and repaired builds both emitted nonfatal optional personal-config schema warnings; no configuration-validation success is claimed. Latest-head CI has not yet been verified.

    Earlier validation, before the latest rebase/vendor correction:

  • Full make verify, workspace-wide make test-compile, affected tests, scoped lint, and intermediate controller-commit tests passed.

  • Root make test-unit, affected OCM/Cosmos/kube-applier packages, admin stamp and mock-Cosmos informer tests, generation, configuration materialization, pipeline validation/documentation generation, and Helm fixture tests passed during development. These broad checks were not all repeated on the latest head; the latest checks are listed above.

  • Lifecycle fixture correction: both CS and SharedIngress are False, with no Maestro condition in that case. Complete lifecycle package tests and scoped lint/formatting passed.

  • Conversion fixture correction: validProvisionShardBuilder() no longer supplies Maestro configuration. A populated legacy-config case compares complete conversion results, normalizing only the generated Ready timestamp; independent expected-field assertions remain. Complete OCM package tests and scoped lint/formatting passed.
  • Behavioral coverage includes Maestro-free creation/adoption/conversion, case-insensitive AKS identity, duplicate and stored-shard safeguards, legacy persisted JSON, and preservation of existing CS configuration. Negative checks confirmed the fleet prerequisite guard rejects restoring the Maestro dependency or removing the required ACM dependency.

    Legacy-condition regression coverage is integrated into the existing TestSyncOnce cases rather than a standalone matrix. It checks persisted cleanup, unrelated status preservation, missing prerequisites, no-write behavior, cache immutability, and repeat-reconcile idempotence. Temporarily removing the cleanup caused four existing-table regression cases to fail; the controller was restored byte-for-byte afterward.

    The e2e-parallel CI check passed on an earlier revision before later review changes. Not run locally: live Cosmos/deployed-CS/Azure E2E tests or full workspace lint. Production rollback was not tested. Compilation and dry-run inventory generation are not E2E execution.

    Special notes for your reviewer

    The branch contains two signed commits over 79bc58595a08c100b28b43c1719a07549a7d2bb4:
    1. 05f05da324ef70e8cabb98f154b7fb949689463f — Fleet controller changes, including retirement of registration/gates, lifecycle cleanup, CS matching/conversion, tests, and regenerated Maestro vendor removal.
    2. 7569f4afedd2f501a2d0a05a4429251113210998 — Admin API and fleet registration-command changes, schema/validation, configuration, and supporting fixtures.

    The registration README remains unchanged from the original PR base. Previous review fixes are preserved.

    Legacy persisted Maestro fields are ignored on read and dropped on subsequent writes. Once dropped, a full revert and rerunning the unchanged old registration Job are insufficient to restore them: the old Fleet database client validates Replace using ValidateManagementClusterUpdate, which rejects empty-to-populated changes to the immutable Maestro fields before persistence. Documents retaining their original fields with identical registration inputs avoid this specific obstacle. A supported restoration or migration path is needed before old writers can rely on fields that have been removed; this PR does not provide or validate a production recovery procedure. A controller-image-only rollback does not reconstruct the fields either.

    The lifecycle controller actively removes legacy MaestroRegistered conditions; Clusters Service registration and shared-ingress availability still gate readiness.

    Coordinate Fleet/AdminAPI and registration chart/image rollout, update removed --maestro- arguments, and ensure CS supports Maestro-free shard creation. Unrelated Maestro infrastructure is intentionally retained.

    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 (prerequisite PR above)

  • Self-reviewed the diff

  • CI/CD checks are passing (ignore Tide)

  • Commit history is clean

  • All comment threads resolved before merge
  • No UI changes or new E2E tests; draft/WIP and screenshot checklist items are not applicable.

    ---
    AI-generated. Review for accuracy.*

    @machi1990 requested from Slack

    Diff: 650 lines (+487 / -163) across 8 files Reviewer: geoberle Review duration: 2718m
    All Vouch review confidence checks passed
    Residual risk 0.21 = Change Risk (0.52) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.52 · 650 lines diff across 8 files
    0.52
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    60%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.388
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #7817"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 52% (MEDIUM) · Higher = larger blast radius
    52%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 60.5% · Lower = rushed or shallow review
    60.5%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 20.5% · Safe to merge
    20.5%
    Repository