Skip to content

[ARO-24603] Make operator machine VM validation CI-aware#4780

Closed
tuxerrante wants to merge 11 commits intotuxerrante/min-vm-sizes-on-top-of-4594from
tuxerrante/ARO-24603-operator-machine-ci-fix
Closed

[ARO-24603] Make operator machine VM validation CI-aware#4780
tuxerrante wants to merge 11 commits intotuxerrante/min-vm-sizes-on-top-of-4594from
tuxerrante/ARO-24603-operator-machine-ci-fix

Conversation

@tuxerrante
Copy link
Copy Markdown
Collaborator

Summary

  • use r.isLocalDevelopmentMode when validating operator machine provider-spec VM sizes instead of hard-coding the production-only path
  • allow CI/E2E operator runs to accept testing-only worker SKUs such as Standard_D2s_v3
  • add a reconcile-path regression test covering the CI-only worker-size case

Test plan

  • go test ./pkg/operator/controllers/machine/...
  • make fmt
  • make unit-test-go

Made with Cursor

tuxerrante and others added 11 commits April 16, 2026 17:09
Introduces pkg/api/util/vms/ with canonical VMSize type, size constants,
supported size maps (production and testing/CI), and CI candidate
selection via shuffleByCoreTier to spread quota pressure across families.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Move VM size types and constants from api/openshiftcluster.go and
admin/openshiftcluster.go into the new vms package. Simplify
validate/vm.go by delegating to vms maps. Update Static() validator
interface to replace requireD2sWorkers bool with isCI bool, and update
all 11 API version implementations, convert files, and tests.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
… IsCI

Remove the FeatureRequireD2sWorkers feature flag and replace all
callers with env.IsCI(). Update frontend, operator, cluster tooling,
and clusterdata packages to use vms.VMSize types and the new Static()
validator signature. Use vms.GetCICandidateMasterVMSizes() and
vms.GetCICandidateWorkerVMSizes() with shuffle-by-core-tier for
cost-effective quota spreading in CI.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Update adding-new-instance-types.md to point to pkg/api/util/vms/
as the new location for VM size definitions.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Cover the centralized VM-size helpers, CI-only validator paths, and cluster config/enricher behavior so the rebased stack has stronger regression protection before the follow-up fixes.

Made-with: Cursor
Restore the previous fail-closed behavior so malformed or empty cluster versions cannot bypass VM-size validation for otherwise-supported SKUs.

Made-with: Cursor
Restore the workload-identity early return so delete flows do not dereference service-principal clients for clusters that no longer use that cleanup path.

Made-with: Cursor
Use the testing VM-size tables for admin validation and discovery in CI so resize and preflight endpoints stay aligned with the create/update paths on this rebased stack.

Made-with: Cursor
Move the copyright/license header before imports to match repo convention.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Remove outdated MAITIU TODO (fields are actively used) and fix
"roleassignments" → "role assignments" spacing in log message.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Use the reconciler's local development flag when validating operator machine VM sizes so CI/E2E clusters can accept testing-only worker SKUs instead of reporting false invalid-size errors.

Made-with: Cursor
@github-actions github-actions Bot added the needs-rebase branch needs a rebase label Apr 21, 2026
@github-actions
Copy link
Copy Markdown

Please rebase pull request.

@swiencki
Copy link
Copy Markdown
Collaborator

Maybe I’m reading this wrong, but this looks like a little more than the operator reconcile-path change called out in the summary. The old worker validation path only special-cased D2s_v3/v4/v5, while env.IsCI() now switches to the broader testing VM-size set (D2s_v3/v4/v5/v6 plus the normal production worker sizes). Is that wider CI/dev behavior intentional across the frontend/static-validation paths too?

@tuxerrante tuxerrante marked this pull request as draft April 29, 2026 08:54
@tuxerrante tuxerrante closed this May 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-rebase branch needs a rebase

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants