Skip to content

CNTRLPLANE-3610: Decouple CAPI provider Go module dependencies#8704

Open
csrwng wants to merge 1 commit into
openshift:mainfrom
csrwng:capi-decouple
Open

CNTRLPLANE-3610: Decouple CAPI provider Go module dependencies#8704
csrwng wants to merge 1 commit into
openshift:mainfrom
csrwng:capi-decouple

Conversation

@csrwng

@csrwng csrwng commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Summary

Decouples HyperShift's Go module dependency on CAPI infrastructure providers (AWS, Azure, GCP, IBM Cloud, KubeVirt, OpenStack, Agent) so that bumping K8s core dependencies no longer requires waiting for all upstream CAPI providers to release compatible versions first.

Instead of importing CAPI provider modules directly (which pulls in their full transitive dependency trees including specific K8s versions), this PR copies only the API types HyperShift needs into local pkg/capi/<provider>/ packages. Each provider gets its own Go module declaring the upstream module name, and the main go.mod uses replace directives to redirect imports to the local copies. This preserves upstream import paths throughout the codebase.

Key changes

  • AST-based copy tool (hack/copy-capi-types/main.go): strips unused functions, defaults, and validation while preserving types, constants, and deepcopy
  • Sync script (hack/capi-sync-provider.sh): re-syncs types from a specific upstream version on demand
  • Per-provider vendor modules (hack/capi-vendor/<provider>/): pin upstream versions independently, used only by the sync script
  • Go workspace (hack/workspace/go.work): enables controller-gen CRD and deepcopy generation across provider modules
  • Stamp-based Make targets: incremental sync via .synced sentinel files

Impact

  • Removes ~117K lines of vendored CAPI provider code (net -117K lines)
  • Eliminates the circular blocking between K8s bumps and CAPI provider bumps
  • CAPI provider types can be updated independently on their own schedule
  • CRD generation continues to work via the Go workspace

Supersedes #8697.

Jira: https://redhat.atlassian.net/browse/CNTRLPLANE-3610

Test plan

  • make verify passes
  • make test passes
  • make capi-sync-force round-trips cleanly (no diff)
  • CRD generation produces identical CRDs for all 7 providers
  • E2E tests pass

Summary by CodeRabbit

  • New Features

    • Expanded Cluster API provider surface: Agent provider types/templates; AWS v1beta2 APIs (clusters, machines, templates, networking, tags, defaults, validation); Azure v1beta1 APIs (clusters, managed control planes, machine pools, templates, networking, tags, defaults, validation).
  • Chores

    • Tooling and repo maintenance: provider sync workflow, stamp tracking and make targets; lint/format exclusions and dependency/module updates; new copy-and-sanitize tool, provider sync script, vendor module manifests, and tests.

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

Pipeline controller notification
This repo is configured to use the pipeline controller. Second-stage tests will be triggered either automatically or after lgtm label is added, depending on the repository configuration. The pipeline controller will automatically detect which contexts are required and will utilize /test Prow commands to trigger the second stage.

For optional jobs, comment /test ? to see a list of all defined jobs. To trigger manually all jobs from second stage use /pipeline required command.

This repository is configured in: LGTM mode

@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Jun 9, 2026
@openshift-ci-robot

openshift-ci-robot commented Jun 9, 2026

Copy link
Copy Markdown

@csrwng: This pull request references CNTRLPLANE-3610 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "5.0.0" version, but no target version was set.

Details

In response to this:

Summary

Decouples HyperShift's Go module dependency on CAPI infrastructure providers (AWS, Azure, GCP, IBM Cloud, KubeVirt, OpenStack, Agent) so that bumping K8s core dependencies no longer requires waiting for all upstream CAPI providers to release compatible versions first.

Instead of importing CAPI provider modules directly (which pulls in their full transitive dependency trees including specific K8s versions), this PR copies only the API types HyperShift needs into local pkg/capi/<provider>/ packages. Each provider gets its own Go module declaring the upstream module name, and the main go.mod uses replace directives to redirect imports to the local copies. This preserves upstream import paths throughout the codebase.

Key changes

  • AST-based copy tool (hack/copy-capi-types/main.go): strips unused functions, defaults, and validation while preserving types, constants, and deepcopy
  • Sync script (hack/capi-sync-provider.sh): re-syncs types from a specific upstream version on demand
  • Per-provider vendor modules (hack/capi-vendor/<provider>/): pin upstream versions independently, used only by the sync script
  • Go workspace (hack/workspace/go.work): enables controller-gen CRD and deepcopy generation across provider modules
  • Stamp-based Make targets: incremental sync via .synced sentinel files

Impact

  • Removes ~117K lines of vendored CAPI provider code (net -117K lines)
  • Eliminates the circular blocking between K8s bumps and CAPI provider bumps
  • CAPI provider types can be updated independently on their own schedule
  • CRD generation continues to work via the Go workspace

Supersedes #8697.

Jira: https://redhat.atlassian.net/browse/CNTRLPLANE-3610

Test plan

  • make verify passes
  • make test passes
  • make capi-sync-force round-trips cleanly (no diff)
  • CRD generation produces identical CRDs for all 7 providers
  • E2E tests pass

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 openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci openshift-ci Bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jun 9, 2026
@openshift-ci

openshift-ci Bot commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@coderabbitai

coderabbitai Bot commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

This PR adds a stamp-file based CAPI sync workflow and tooling: a Go copier (hack/copy-capi-types) with tests, a provider sync script (hack/capi-sync-provider.sh), per-provider vendored module manifests under hack/capi-vendor/, Makefile targets to run/verify capi-sync and to generate CRDs from workspace modules, go.mod replace mappings to local pkg/capi modules, .gitignore and golangci settings updates, and a large set of new/updated Cluster API provider API type files under pkg/capi/* (AWS, Azure, Agent, GCP, IBMCloud, KubeVirt, OpenStack) plus related go.mod files.

Sequence Diagram

sequenceDiagram
  participant DevMake as Makefile/update
  participant SyncScript as hack/capi-sync-provider.sh
  participant Copier as hack/copy-capi-types
  participant Vendor as hack/capi-vendor/*
  participant PkgCAPI as pkg/capi/*
  participant ControllerGen as controller-gen

  DevMake->>SyncScript: invoke capi-sync per provider
  SyncScript->>Vendor: download upstream module (go mod download)
  SyncScript->>Copier: run copier (--src upstream --dst pkg/capi/<provider>)
  Copier->>PkgCAPI: write copied/stripped Go files
  SyncScript->>ControllerGen: run controller-gen with workspace paths
  ControllerGen->>PkgCAPI: generate CRDs
  DevMake->>DevMake: touch ./pkg/capi/<provider>/.synced (stamp)
Loading

Suggested reviewers

  • sjenning
  • sdminonne
  • bryan-cox
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

@csrwng

csrwng commented Jun 9, 2026

Copy link
Copy Markdown
Contributor Author

/pipeline required

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

Scheduling tests matching the pipeline_run_if_changed or not excluded by pipeline_skip_if_only_changed parameters:
/test e2e-aks
/test e2e-aws
/test e2e-aws-upgrade-hypershift-operator
/test e2e-azure-self-managed
/test e2e-azure-v2-self-managed
/test e2e-kubevirt-aws-ovn-reduced
/test e2e-v2-aws
/test e2e-v2-gke

@openshift-ci openshift-ci Bot added area/ci-tooling Indicates the PR includes changes for CI or tooling area/control-plane-operator Indicates the PR includes changes for the control plane operator - in an OCP release area/hypershift-operator Indicates the PR includes changes for the hypershift operator and API - outside an OCP release and removed do-not-merge/needs-area labels Jun 9, 2026
@openshift-ci

openshift-ci Bot commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: csrwng

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

@openshift-ci openshift-ci Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jun 9, 2026

@coderabbitai coderabbitai Bot 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.

Actionable comments posted: 4

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@hack/capi-vendor/openstack/go.mod`:
- Around line 5-55: Add the OSV query result for the newly pinned direct
dependency sigs.k8s.io/cluster-api-provider-openstack v0.13.3 to the PR notes:
run an osv.dev query (or use `govulncheck`/OSV API) for module
"sigs.k8s.io/cluster-api-provider-openstack" at version "v0.13.3", capture the
JSON response (which returned an empty object {}), and paste that output into
the PR description or changelog entry so the absence of vulnerabilities is
documented alongside the go.mod change.

In `@hack/copy-capi-types/main.go`:
- Around line 167-227: The cascade loop correctly gathers all functions to
remove into funcRemoveSet but stripDecls is still called with the original
crossFileRemove slice, so newly discovered removals are never stripped; change
the final call to stripDecls to pass the fully-expanded removal set by
converting funcRemoveSet into a slice of *ast.FuncDecl (and/or build a new
removal slice variable) and use that in place of crossFileRemove when calling
stripDecls; keep existing crossNames usage for the reason field.

In `@Makefile`:
- Around line 560-565: The .synced target only depends on
hack/capi-vendor/%/go.mod and CONTROLLER_GEN, so update the rule for
$(DIR)/pkg/capi/%/.synced to also depend on the sync script and any copy/vendor
helper inputs that affect generated output (e.g.
$(DIR)/hack/capi-sync-provider.sh and
$(DIR)/hack/capi-vendor/%/vendor_imports.go and/or the copy tool binary variable
used during sync). In practice add those filenames/variables to the prerequisite
list for the $(DIR)/pkg/capi/%/.synced target so changes to
hack/capi-sync-provider.sh, vendor_imports.go, or the copy tool will invalidate
the .synced stamp and force re-running the cd/tidy/sync sequence.

In `@pkg/capi/azure/api/v1beta1/azureasomanagedmachinepooltemplate_types.go`:
- Around line 24-32: The Template field in
AzureASOManagedMachinePoolTemplateSpec is using the wrong resource type
(AzureASOManagedControlPlaneResource) causing machine-pool fields like
providerIDList to be omitted; update the Template field's type to
AzureASOManagedMachinePoolResource (i.e., change the struct field Template
AzureASOManagedControlPlaneResource to Template
AzureASOManagedMachinePoolResource) so the CRD uses the machine-pool schema, and
run codegen/CRD generation to regenerate manifests after the change.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Central YAML (inherited)

Review profile: CHILL

Plan: Enterprise

Run ID: 74050ac9-95dd-4433-a9ec-ccf6efc47fa4

📥 Commits

Reviewing files that changed from the base of the PR and between a6c3012 and b95c67c.

⛔ Files ignored due to path filters (128)
  • go.sum is excluded by !**/*.sum
  • hack/capi-vendor/agent/go.sum is excluded by !**/*.sum
  • hack/capi-vendor/aws/go.sum is excluded by !**/*.sum
  • hack/capi-vendor/azure/go.sum is excluded by !**/*.sum
  • hack/capi-vendor/gcp/go.sum is excluded by !**/*.sum
  • hack/capi-vendor/ibmcloud/go.sum is excluded by !**/*.sum
  • hack/capi-vendor/kubevirt/go.sum is excluded by !**/*.sum
  • hack/capi-vendor/openstack/go.sum is excluded by !**/*.sum
  • hack/workspace/go.work is excluded by !**/*.work
  • pkg/capi/agent/v1alpha1/zz_generated.deepcopy.go is excluded by !**/zz_generated*.go, !**/zz_generated*
  • pkg/capi/agent/v1beta1/zz_generated.deepcopy.go is excluded by !**/zz_generated*.go, !**/zz_generated*
  • pkg/capi/aws/api/v1beta1/zz_generated.deepcopy.go is excluded by !**/zz_generated*.go, !**/zz_generated*
  • pkg/capi/aws/api/v1beta2/zz_generated.deepcopy.go is excluded by !**/zz_generated*.go, !**/zz_generated*
  • pkg/capi/aws/exp/api/v1beta1/zz_generated.deepcopy.go is excluded by !**/zz_generated*.go, !**/zz_generated*
  • pkg/capi/aws/exp/api/v1beta2/zz_generated.deepcopy.go is excluded by !**/zz_generated*.go, !**/zz_generated*
  • pkg/capi/azure/api/v1beta1/zz_generated.deepcopy.go is excluded by !**/zz_generated*.go, !**/zz_generated*
  • pkg/capi/gcp/api/v1beta1/zz_generated.deepcopy.go is excluded by !**/zz_generated*.go, !**/zz_generated*
  • pkg/capi/ibmcloud/api/v1beta1/zz_generated.deepcopy.go is excluded by !**/zz_generated*.go, !**/zz_generated*
  • pkg/capi/ibmcloud/api/v1beta2/zz_generated.deepcopy.go is excluded by !**/zz_generated*.go, !**/zz_generated*
  • pkg/capi/kubevirt/api/v1alpha1/zz_generated.deepcopy.go is excluded by !**/zz_generated*.go, !**/zz_generated*
  • pkg/capi/openstack/api/v1alpha1/zz_generated.deepcopy.go is excluded by !**/zz_generated*.go, !**/zz_generated*
  • pkg/capi/openstack/api/v1beta1/zz_generated.deepcopy.go is excluded by !**/zz_generated*.go, !**/zz_generated*
  • vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/CHANGELOG.md is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/LICENSE.txt is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/README.md is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/assets.json is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/autorest.md is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/availabilitysets_client.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/build.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/capacityreservationgroups_client.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/capacityreservations_client.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/ci.yml is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/client_factory.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/cloudserviceoperatingsystems_client.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/cloudserviceroleinstances_client.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/cloudserviceroles_client.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/cloudservices_client.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/cloudservicesupdatedomain_client.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/communitygalleries_client.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/communitygalleryimages_client.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/communitygalleryimageversions_client.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/constants.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/dedicatedhostgroups_client.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/dedicatedhosts_client.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/diskaccesses_client.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/diskencryptionsets_client.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/diskrestorepoint_client.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/disks_client.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/galleries_client.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/galleryapplications_client.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/galleryapplicationversions_client.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/galleryimages_client.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/galleryimageversions_client.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/gallerysharingprofile_client.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/images_client.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/loganalytics_client.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/models.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/models_serde.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/operations_client.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/options.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/proximityplacementgroups_client.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/resourceskus_client.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/responses.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/restorepointcollections_client.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/restorepoints_client.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/sharedgalleries_client.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/sharedgalleryimages_client.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/sharedgalleryimageversions_client.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/snapshots_client.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/sshpublickeys_client.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/time_rfc3339.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/usage_client.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/virtualmachineextensionimages_client.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/virtualmachineextensions_client.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/virtualmachineimages_client.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/virtualmachineimagesedgezone_client.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/virtualmachineruncommands_client.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/virtualmachines_client.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/virtualmachinescalesetextensions_client.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/virtualmachinescalesetrollingupgrades_client.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/virtualmachinescalesets_client.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/virtualmachinescalesetvmextensions_client.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/virtualmachinescalesetvmruncommands_client.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/virtualmachinescalesetvms_client.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/virtualmachinesizes_client.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/asaskevich/govalidator/v11/.gitignore is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/asaskevich/govalidator/v11/.travis.yml is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/asaskevich/govalidator/v11/CODE_OF_CONDUCT.md is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/asaskevich/govalidator/v11/CONTRIBUTING.md is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/asaskevich/govalidator/v11/LICENSE is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/asaskevich/govalidator/v11/README.md is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/asaskevich/govalidator/v11/arrays.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/asaskevich/govalidator/v11/converter.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/asaskevich/govalidator/v11/doc.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/asaskevich/govalidator/v11/error.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/asaskevich/govalidator/v11/numerics.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/asaskevich/govalidator/v11/patterns.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/asaskevich/govalidator/v11/types.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/asaskevich/govalidator/v11/utils.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/asaskevich/govalidator/v11/validator.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/asaskevich/govalidator/v11/wercker.yml is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/aws/aws-sdk-go-v2/service/eks/CHANGELOG.md is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/aws/aws-sdk-go-v2/service/eks/LICENSE.txt is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_client.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_AssociateAccessPolicy.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_AssociateEncryptionConfig.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_AssociateIdentityProviderConfig.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_CreateAccessEntry.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_CreateAddon.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_CreateCapability.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_CreateCluster.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_CreateEksAnywhereSubscription.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_CreateFargateProfile.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_CreateNodegroup.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_CreatePodIdentityAssociation.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_DeleteAccessEntry.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_DeleteAddon.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_DeleteCapability.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_DeleteCluster.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_DeleteEksAnywhereSubscription.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_DeleteFargateProfile.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_DeleteNodegroup.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_DeletePodIdentityAssociation.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_DeregisterCluster.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_DescribeAccessEntry.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_DescribeAddon.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_DescribeAddonConfiguration.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_DescribeAddonVersions.go is excluded by !vendor/**, !**/vendor/**
📒 Files selected for processing (172)
  • .gitignore
  • .golangci.yml
  • Makefile
  • go.mod
  • hack/capi-sync-provider.sh
  • hack/capi-vendor/agent/go.mod
  • hack/capi-vendor/agent/vendor_imports.go
  • hack/capi-vendor/aws/go.mod
  • hack/capi-vendor/aws/vendor_imports.go
  • hack/capi-vendor/azure/go.mod
  • hack/capi-vendor/azure/vendor_imports.go
  • hack/capi-vendor/gcp/go.mod
  • hack/capi-vendor/gcp/vendor_imports.go
  • hack/capi-vendor/ibmcloud/go.mod
  • hack/capi-vendor/ibmcloud/vendor_imports.go
  • hack/capi-vendor/kubevirt/go.mod
  • hack/capi-vendor/kubevirt/vendor_imports.go
  • hack/capi-vendor/openstack/go.mod
  • hack/capi-vendor/openstack/vendor_imports.go
  • hack/copy-capi-types/main.go
  • pkg/capi/agent/go.mod
  • pkg/capi/agent/v1alpha1/agentcluster_types.go
  • pkg/capi/agent/v1alpha1/agentmachine_types.go
  • pkg/capi/agent/v1alpha1/agentmachinetemplate_types.go
  • pkg/capi/agent/v1alpha1/groupversion_info.go
  • pkg/capi/agent/v1alpha1/types.go
  • pkg/capi/agent/v1beta1/agentcluster_types.go
  • pkg/capi/agent/v1beta1/agentmachine_types.go
  • pkg/capi/agent/v1beta1/agentmachinetemplate_types.go
  • pkg/capi/agent/v1beta1/groupversion_info.go
  • pkg/capi/agent/v1beta1/types.go
  • pkg/capi/aws/api/v1beta1/awscluster_types.go
  • pkg/capi/aws/api/v1beta1/awsclustertemplate_types.go
  • pkg/capi/aws/api/v1beta1/awsidentity_types.go
  • pkg/capi/aws/api/v1beta1/awsmachine_types.go
  • pkg/capi/aws/api/v1beta1/awsmachinetemplate_types.go
  • pkg/capi/aws/api/v1beta1/bastion.go
  • pkg/capi/aws/api/v1beta1/conditions_consts.go
  • pkg/capi/aws/api/v1beta1/doc.go
  • pkg/capi/aws/api/v1beta1/groupversion_info.go
  • pkg/capi/aws/api/v1beta1/network_types.go
  • pkg/capi/aws/api/v1beta1/s3bucket.go
  • pkg/capi/aws/api/v1beta1/tags.go
  • pkg/capi/aws/api/v1beta1/types.go
  • pkg/capi/aws/api/v1beta2/awscluster_types.go
  • pkg/capi/aws/api/v1beta2/awsclustertemplate_types.go
  • pkg/capi/aws/api/v1beta2/awsidentity_types.go
  • pkg/capi/aws/api/v1beta2/awsmachine_types.go
  • pkg/capi/aws/api/v1beta2/awsmachinetemplate_types.go
  • pkg/capi/aws/api/v1beta2/bastion.go
  • pkg/capi/aws/api/v1beta2/conditions_consts.go
  • pkg/capi/aws/api/v1beta2/defaults.go
  • pkg/capi/aws/api/v1beta2/doc.go
  • pkg/capi/aws/api/v1beta2/groupversion_info.go
  • pkg/capi/aws/api/v1beta2/network_types.go
  • pkg/capi/aws/api/v1beta2/s3bucket.go
  • pkg/capi/aws/api/v1beta2/tags.go
  • pkg/capi/aws/api/v1beta2/types.go
  • pkg/capi/aws/api/v1beta2/webhooks.go
  • pkg/capi/aws/exp/api/v1beta1/awsmachinepool_types.go
  • pkg/capi/aws/exp/api/v1beta1/conditions_consts.go
  • pkg/capi/aws/exp/api/v1beta1/doc.go
  • pkg/capi/aws/exp/api/v1beta1/finalizers.go
  • pkg/capi/aws/exp/api/v1beta1/groupversion_info.go
  • pkg/capi/aws/exp/api/v1beta1/types.go
  • pkg/capi/aws/exp/api/v1beta2/awsmachinepool_types.go
  • pkg/capi/aws/exp/api/v1beta2/conditions_consts.go
  • pkg/capi/aws/exp/api/v1beta2/doc.go
  • pkg/capi/aws/exp/api/v1beta2/finalizers.go
  • pkg/capi/aws/exp/api/v1beta2/groupversion_info.go
  • pkg/capi/aws/exp/api/v1beta2/types.go
  • pkg/capi/aws/exp/api/v1beta2/validation.go
  • pkg/capi/aws/go.mod
  • pkg/capi/azure/api/v1beta1/azureasomanagedcluster_types.go
  • pkg/capi/azure/api/v1beta1/azureasomanagedclustertemplate_types.go
  • pkg/capi/azure/api/v1beta1/azureasomanagedcontrolplane_types.go
  • pkg/capi/azure/api/v1beta1/azureasomanagedcontrolplanetemplate_types.go
  • pkg/capi/azure/api/v1beta1/azureasomanagedmachinepool_types.go
  • pkg/capi/azure/api/v1beta1/azureasomanagedmachinepooltemplate_types.go
  • pkg/capi/azure/api/v1beta1/azurecluster_default.go
  • pkg/capi/azure/api/v1beta1/azurecluster_types.go
  • pkg/capi/azure/api/v1beta1/azurecluster_validation.go
  • pkg/capi/azure/api/v1beta1/azureclusteridentity_types.go
  • pkg/capi/azure/api/v1beta1/azureclustertemplate_default.go
  • pkg/capi/azure/api/v1beta1/azureclustertemplate_types.go
  • pkg/capi/azure/api/v1beta1/azureclustertemplate_validation.go
  • pkg/capi/azure/api/v1beta1/azureimage_validation.go
  • pkg/capi/azure/api/v1beta1/azuremachine_default.go
  • pkg/capi/azure/api/v1beta1/azuremachine_types.go
  • pkg/capi/azure/api/v1beta1/azuremachine_validation.go
  • pkg/capi/azure/api/v1beta1/azuremachinetemplate_types.go
  • pkg/capi/azure/api/v1beta1/azuremanagedcluster_types.go
  • pkg/capi/azure/api/v1beta1/azuremanagedclustertemplate_types.go
  • pkg/capi/azure/api/v1beta1/azuremanagedcontrolplane_default.go
  • pkg/capi/azure/api/v1beta1/azuremanagedcontrolplane_types.go
  • pkg/capi/azure/api/v1beta1/azuremanagedcontrolplanetemplate_default.go
  • pkg/capi/azure/api/v1beta1/azuremanagedcontrolplanetemplate_types.go
  • pkg/capi/azure/api/v1beta1/azuremanagedmachinepool_types.go
  • pkg/capi/azure/api/v1beta1/azuremanagedmachinepooltemplate_types.go
  • pkg/capi/azure/api/v1beta1/consts.go
  • pkg/capi/azure/api/v1beta1/doc.go
  • pkg/capi/azure/api/v1beta1/groupversion_info.go
  • pkg/capi/azure/api/v1beta1/tags.go
  • pkg/capi/azure/api/v1beta1/types.go
  • pkg/capi/azure/api/v1beta1/types_class.go
  • pkg/capi/azure/api/v1beta1/types_template.go
  • pkg/capi/azure/go.mod
  • pkg/capi/gcp/api/v1beta1/doc.go
  • pkg/capi/gcp/api/v1beta1/endpoints.go
  • pkg/capi/gcp/api/v1beta1/gcpcluster_types.go
  • pkg/capi/gcp/api/v1beta1/gcpclustertemplate_types.go
  • pkg/capi/gcp/api/v1beta1/gcpmachine_types.go
  • pkg/capi/gcp/api/v1beta1/gcpmachinetemplate_types.go
  • pkg/capi/gcp/api/v1beta1/groupversion_info.go
  • pkg/capi/gcp/api/v1beta1/labels.go
  • pkg/capi/gcp/api/v1beta1/tags.go
  • pkg/capi/gcp/api/v1beta1/types.go
  • pkg/capi/gcp/go.mod
  • pkg/capi/ibmcloud/api/v1beta1/conditions_consts.go
  • pkg/capi/ibmcloud/api/v1beta1/doc.go
  • pkg/capi/ibmcloud/api/v1beta1/groupversion_info.go
  • pkg/capi/ibmcloud/api/v1beta1/ibmpowervscluster_types.go
  • pkg/capi/ibmcloud/api/v1beta1/ibmpowervsclustertemplate_types.go
  • pkg/capi/ibmcloud/api/v1beta1/ibmpowervsimage_types.go
  • pkg/capi/ibmcloud/api/v1beta1/ibmpowervsmachine_types.go
  • pkg/capi/ibmcloud/api/v1beta1/ibmpowervsmachinetemplate_types.go
  • pkg/capi/ibmcloud/api/v1beta1/ibmvpccluster_types.go
  • pkg/capi/ibmcloud/api/v1beta1/ibmvpcmachine_types.go
  • pkg/capi/ibmcloud/api/v1beta1/ibmvpcmachinetemplate_types.go
  • pkg/capi/ibmcloud/api/v1beta1/types.go
  • pkg/capi/ibmcloud/api/v1beta2/conditions_consts.go
  • pkg/capi/ibmcloud/api/v1beta2/doc.go
  • pkg/capi/ibmcloud/api/v1beta2/groupversion_info.go
  • pkg/capi/ibmcloud/api/v1beta2/ibmpowervscluster_types.go
  • pkg/capi/ibmcloud/api/v1beta2/ibmpowervsclustertemplate_types.go
  • pkg/capi/ibmcloud/api/v1beta2/ibmpowervsimage_types.go
  • pkg/capi/ibmcloud/api/v1beta2/ibmpowervsmachine_types.go
  • pkg/capi/ibmcloud/api/v1beta2/ibmpowervsmachinetemplate_types.go
  • pkg/capi/ibmcloud/api/v1beta2/ibmvpccluster_types.go
  • pkg/capi/ibmcloud/api/v1beta2/ibmvpcclustertemplate_types.go
  • pkg/capi/ibmcloud/api/v1beta2/ibmvpcmachine_types.go
  • pkg/capi/ibmcloud/api/v1beta2/ibmvpcmachinetemplate_types.go
  • pkg/capi/ibmcloud/api/v1beta2/types.go
  • pkg/capi/ibmcloud/go.mod
  • pkg/capi/kubevirt/api/v1alpha1/condition_consts.go
  • pkg/capi/kubevirt/api/v1alpha1/doc.go
  • pkg/capi/kubevirt/api/v1alpha1/groupversion_info.go
  • pkg/capi/kubevirt/api/v1alpha1/kubevirtcluster_types.go
  • pkg/capi/kubevirt/api/v1alpha1/kubevirtclustertemplate_types.go
  • pkg/capi/kubevirt/api/v1alpha1/kubevirtmachine_types.go
  • pkg/capi/kubevirt/api/v1alpha1/kubevirtmachinetemplate_types.go
  • pkg/capi/kubevirt/go.mod
  • pkg/capi/openstack/api/v1alpha1/conditions_consts.go
  • pkg/capi/openstack/api/v1alpha1/doc.go
  • pkg/capi/openstack/api/v1alpha1/groupversion_info.go
  • pkg/capi/openstack/api/v1alpha1/openstackfloatingippool_types.go
  • pkg/capi/openstack/api/v1alpha1/openstackserver_types.go
  • pkg/capi/openstack/api/v1alpha1/types.go
  • pkg/capi/openstack/api/v1beta1/conditions_consts.go
  • pkg/capi/openstack/api/v1beta1/doc.go
  • pkg/capi/openstack/api/v1beta1/groupversion_info.go
  • pkg/capi/openstack/api/v1beta1/identity_types.go
  • pkg/capi/openstack/api/v1beta1/openstackcluster_types.go
  • pkg/capi/openstack/api/v1beta1/openstackclustertemplate_types.go
  • pkg/capi/openstack/api/v1beta1/openstackmachine_types.go
  • pkg/capi/openstack/api/v1beta1/openstackmachinetemplate_types.go
  • pkg/capi/openstack/api/v1beta1/types.go
  • pkg/capi/openstack/go.mod
  • pkg/capi/openstack/pkg/utils/errors/errors.go
  • pkg/capi/openstack/pkg/utils/errors/terminal.go
  • pkg/capi/openstack/pkg/utils/optional/types.go
  • support/api/capi_types.go
💤 Files with no reviewable changes (2)
  • pkg/capi/aws/api/v1beta1/tags.go
  • pkg/capi/aws/api/v1beta1/network_types.go

Comment thread hack/capi-vendor/openstack/go.mod
Comment thread hack/copy-capi-types/main.go Outdated
Comment thread Makefile Outdated
Comment on lines +24 to +32
// AzureASOManagedMachinePoolTemplateSpec defines the desired state of AzureASOManagedMachinePoolTemplate.
type AzureASOManagedMachinePoolTemplateSpec struct {
Template AzureASOManagedControlPlaneResource `json:"template"`
}

// AzureASOManagedMachinePoolResource defines the templated resource.
type AzureASOManagedMachinePoolResource struct {
Spec AzureASOManagedMachinePoolTemplateResourceSpec `json:"spec,omitempty"`
}

@coderabbitai coderabbitai Bot Jun 9, 2026

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.

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Use the machine-pool resource type in the template spec.

Line 26 currently references AzureASOManagedControlPlaneResource, which gives this CRD the wrong template schema and drops machine-pool-specific fields like providerIDList.

Suggested fix
 type AzureASOManagedMachinePoolTemplateSpec struct {
-	Template AzureASOManagedControlPlaneResource `json:"template"`
+	Template AzureASOManagedMachinePoolResource `json:"template"`
 }
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
// AzureASOManagedMachinePoolTemplateSpec defines the desired state of AzureASOManagedMachinePoolTemplate.
type AzureASOManagedMachinePoolTemplateSpec struct {
Template AzureASOManagedControlPlaneResource `json:"template"`
}
// AzureASOManagedMachinePoolResource defines the templated resource.
type AzureASOManagedMachinePoolResource struct {
Spec AzureASOManagedMachinePoolTemplateResourceSpec `json:"spec,omitempty"`
}
// AzureASOManagedMachinePoolTemplateSpec defines the desired state of AzureASOManagedMachinePoolTemplate.
type AzureASOManagedMachinePoolTemplateSpec struct {
Template AzureASOManagedMachinePoolResource `json:"template"`
}
// AzureASOManagedMachinePoolResource defines the templated resource.
type AzureASOManagedMachinePoolResource struct {
Spec AzureASOManagedMachinePoolTemplateResourceSpec `json:"spec,omitempty"`
}
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@pkg/capi/azure/api/v1beta1/azureasomanagedmachinepooltemplate_types.go`
around lines 24 - 32, The Template field in
AzureASOManagedMachinePoolTemplateSpec is using the wrong resource type
(AzureASOManagedControlPlaneResource) causing machine-pool fields like
providerIDList to be omitted; update the Template field's type to
AzureASOManagedMachinePoolResource (i.e., change the struct field Template
AzureASOManagedControlPlaneResource to Template
AzureASOManagedMachinePoolResource) so the CRD uses the machine-pool schema, and
run codegen/CRD generation to regenerate manifests after the change.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This is a false positive — the upstream CAPZ source at sigs.k8s.io/cluster-api-provider-azure uses AzureASOManagedControlPlaneResource in the AzureASOManagedMachinePoolTemplateSpec.Template field as well. Our copy matches upstream exactly. This appears to be an intentional design choice in CAPZ where the control plane and machine pool templates share the same resource wrapper type (both contain only an embedded Resources []runtime.RawExtension field).

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.

@csrwng, thanks for the clarification. You're right — I was incorrect. The upstream CAPZ intentionally reuses AzureASOManagedControlPlaneResource for the AzureASOManagedMachinePoolTemplateSpec.Template field because both the control-plane and machine-pool ASO-managed template types share the same resource wrapper (containing only Resources []runtime.RawExtension). I'll record this so it isn't flagged in future reviews.


✏️ Learnings added
Learnt from: csrwng
Repo: openshift/hypershift PR: 8704
File: pkg/capi/azure/api/v1beta1/azureasomanagedmachinepooltemplate_types.go:24-32
Timestamp: 2026-06-09T16:43:40.208Z
Learning: In the openshift/hypershift repo, `pkg/capi/azure/api/v1beta1/azureasomanagedmachinepooltemplate_types.go` intentionally uses `AzureASOManagedControlPlaneResource` (not `AzureASOManagedMachinePoolResource`) as the type for `AzureASOManagedMachinePoolTemplateSpec.Template`. This matches the upstream CAPZ source (`sigs.k8s.io/cluster-api-provider-azure`) exactly: both the ASO-managed control-plane and machine-pool template specs share the same `AzureASOManagedControlPlaneResource` wrapper because it only contains `Resources []runtime.RawExtension`. Do not flag this as a type mismatch during code review.

Note: Learnings are effective only in the context of similar code segments. To apply general coding guidelines, please configure review instructions. You can manage existing learnings in the app.


🧠 Learnings used
Learnt from: csrwng
Repo: openshift/hypershift PR: 8697
File: pkg/capi/azure/api/v1beta1/azureclustertemplate_default.go:32-34
Timestamp: 2026-06-09T14:40:20.373Z
Learning: In the HyperShift repo, the Go packages under `pkg/capi/<provider>/` (copied from upstream via `hack/capi-sync-provider.sh`) are used only for CRD generation (e.g., by `controller-gen`) and as controller type references. Treat defaulting/validation/webhook logic in these copied files as intentionally dead code (e.g., functions like `setNodeOutboundLBDefaults`, `setBastionTemplateDefaults` are not invoked at runtime in HyperShift). During code review, do not raise actionable bug findings about runtime-safety issues in these copied files (such as missing nil-guards) based on theoretical reachability; only flag issues that would affect compilation/CRD generation (or that are clearly proven to be reachable in HyperShift runtime code).

Learnt from: csrwng
Repo: openshift/hypershift PR: 8697
File: pkg/capi/azure/api/v1beta1/azurecluster_validation.go:68-73
Timestamp: 2026-06-09T14:40:21.560Z
Learning: In openshift/hypershift, the packages under `pkg/capi/<provider>/` are intentionally “stripped” copies of upstream Cluster API provider types. They exist only for CRD generation and type references—NOT for running upstream webhook or validation logic. During code review of files in this directory tree, treat the absence of upstream webhook/validation entrypoints (e.g., `ValidateCreate`, `ValidateUpdate`, `ValidateDelete`, `SetupWebhookWithManager`) and validation helpers (e.g., `validateCluster`, `validateClusterSpec`, `validateNetworkSpec`, `validatePrivateDNSZoneName`) as expected. Do not request adding webhook/validation logic here; ensure any changes keep the stripped nature intact and avoid introducing the banned imports that the copy tool (`hack/copy-capi-types/main.go`) is designed to remove.

@codecov

codecov Bot commented Jun 9, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 41.54%. Comparing base (4755e9c) to head (140fe38).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #8704   +/-   ##
=======================================
  Coverage   41.54%   41.54%           
=======================================
  Files         758      758           
  Lines       93838    93838           
=======================================
  Hits        38986    38986           
  Misses      52107    52107           
  Partials     2745     2745           
Flag Coverage Δ
cmd-support 34.96% <ø> (ø)
cpo-hostedcontrolplane 43.59% <ø> (ø)
cpo-other 43.17% <ø> (ø)
hypershift-operator 51.62% <ø> (ø)
other 31.56% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@csrwng

csrwng commented Jun 9, 2026

Copy link
Copy Markdown
Contributor Author

/pipeline required

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

Scheduling tests matching the pipeline_run_if_changed or not excluded by pipeline_skip_if_only_changed parameters:
/test e2e-aks
/test e2e-aws
/test e2e-aws-upgrade-hypershift-operator
/test e2e-azure-self-managed
/test e2e-azure-v2-self-managed
/test e2e-kubevirt-aws-ovn-reduced
/test e2e-v2-aws
/test e2e-v2-gke

@bryan-cox bryan-cox left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Overall this is excellent work — decoupling K8s bumps from CAPI provider releases is a significant operational improvement.

Two items I'd like addressed before merge (the GenDecl cascade gap in Pass 2 and broadening callsAny); the rest are suggestions and nits.

No tests for the 750-line AST tool is a concern I'd like discussed — even a small TestProcessFile with testdata/ fixtures would dramatically reduce regression risk.

Comment thread hack/copy-capi-types/main.go Outdated
}

var crossFileRemove []*ast.FuncDecl
var crossNames []string

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

[blocking] Cross-file cascade only handles FuncDecl, not GenDecl

Pass 2 iterates file.Decls but only checks *ast.FuncDecl. If a type in file A embeds or references a type stripped from file B, this cascade won't detect it — the within-file Pass 1 handles both FuncDecl and GenDecl via genDeclReferencesAny, but that logic wasn't carried to Pass 2.

This is a latent bug that will surface when an upstream provider reorganizes types across files. Fix: extend this loop to also check *ast.GenDecl with genDeclReferencesAny(gd, allStrippedSymbols).

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Good catch — fixed. Pass 2 now handles both *ast.FuncDecl and *ast.GenDecl, using genDeclReferencesAny for the latter. The cascade loop also uses collectStrippedSymbols (same as Pass 1) to track both function and type/var/const names.

Comment thread hack/copy-capi-types/main.go Outdated
}

// callsAny checks if a function body calls any of the named symbols.
func callsAny(fn *ast.FuncDecl, symbols map[string]bool) bool {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

[suggestion] callsAny only checks ast.CallExpr, missing other reference patterns

A function body can reference a stripped symbol via composite literals (strippedType{}), type assertions (x.(strippedType)), type conversions (strippedType(x)), or variable declarations (var x strippedType). These appear as ast.Ident nodes, not ast.CallExpr.

genDeclReferencesAny already does the right thing — it checks all ast.Ident nodes. Consider renaming this to referencesAny and broadening the check to match.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Good point — renamed to referencesAny and broadened to check all ast.Ident nodes (matching genDeclReferencesAny's approach). This now catches composite literals, type assertions, type conversions, and variable declarations referencing stripped symbols.

Comment thread hack/copy-capi-types/main.go Outdated
}

// stripDecls removes specified declarations and cleans up unused imports.
func stripDecls(fset *token.FileSet, file *ast.File, funcsToRemove []*ast.FuncDecl, genDeclsToRemove []*ast.GenDecl, _ map[string]bool) []byte {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

nit: The last parameter is named _ and unused. Both call sites pass bannedAliases or nil. Remove the parameter to avoid confusion.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed — removed the unused parameter from stripDecls.

Comment thread hack/copy-capi-types/main.go Outdated
dst := flag.String("dst", "", "destination directory for copied types")
var extraAllowed stringSlice
flag.Var(&extraAllowed, "allow", "additional allowed import prefix (can be repeated)")
var rewriteRules stringSlice

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

nit: --rewrite flag is implemented but the sync script never passes it. If this is for future use, a code comment explaining the intended use case would help. If it's dead code from prototyping, consider removing it.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Removed — it was leftover from prototyping when imports were being rewritten to local paths. The replace directive approach made it unnecessary.

Comment thread hack/capi-sync-provider.sh Outdated
# Download a module into the cache and print its directory.
mod_cache_dir() {
local module="$1"
(cd "$MOD_DIR" && GO111MODULE=on GOWORK=off GOFLAGS= go mod download -json "$module") | \

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

[suggestion] mod_cache_dir uses fragile sed parsing

Parsing JSON with sed is brittle if the format changes. Consider jq:

mod_cache_dir() {
    local module="$1"
    (cd "$MOD_DIR" && GO111MODULE=on GOWORK=off GOFLAGS= go mod download -json "$module") | jq -r '.Dir'
}

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done — switched to jq -r '.Dir'.

Comment thread .golangci.yml Outdated
- linters:
- gocyclo
- unparam
path: 'hack/'

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

nit: This suppresses gocyclo and unparam for the entire hack/ directory. Consider narrowing to hack/copy-capi-types/ to avoid accidentally suppressing useful warnings in other hack scripts.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed — narrowed to hack/copy-capi-types/.

Comment thread Makefile
cd $(DIR)/hack/capi-vendor/$$p && $(GO) mod tidy && $(GO) mod download; \
done

.PHONY: capi-sync

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

[suggestion] Consider a verify-capi-sync target

The stamp-based approach relies on verify-git-clean to catch drift, but the error message will be opaque ("uncommitted changes in pkg/capi/"). A dedicated target that runs the sync and checks for diffs would give clear, actionable errors in CI.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Added a verify-capi-sync target that runs the sync from scratch and checks for diffs in pkg/capi/. It's included in verify-parallel so it runs as part of make verify. Error message tells the developer exactly what to do:

ERROR: pkg/capi/ is out of sync with hack/capi-vendor/. Run 'make capi-sync-force' and commit the result.

@@ -0,0 +1,111 @@
#!/usr/bin/env bash

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

[suggestion] Document the end-to-end update workflow

The old "bump go.mod and run make update" no longer works for CAPI providers. Consider adding a header comment (or a README alongside) documenting the steps:

  1. Update hack/capi-vendor/<provider>/go.mod to the new version
  2. Run make capi-sync-force (or make update)
  3. Verify CRDs regenerated correctly
  4. Run make deps to re-vendor

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Added a header comment to the sync script documenting the update steps:

  1. Edit hack/capi-vendor/<provider>/go.mod to the new version
  2. Run make capi-sync-force
  3. Verify CRDs: make generate
  4. Re-vendor: make deps
  5. Run tests: make test

@hypershift-jira-solve-ci

Copy link
Copy Markdown

AI Test Failure Analysis

Job: pull-ci-openshift-hypershift-main-e2e-aks | Build: 2064391508127125504 | Cost: $3.581170750000001 | Failed step: hypershift-azure-run-e2e

View full analysis report


Generated by hypershift-analyze-e2e-failure post-step using Claude claude-opus-4-6

@cwbotbot

cwbotbot commented Jun 9, 2026

Copy link
Copy Markdown

Test Results

e2e-aws

e2e-aks

@hypershift-jira-solve-ci

Copy link
Copy Markdown

AI Test Failure Analysis

Job: pull-ci-openshift-hypershift-main-e2e-aws | Build: 2064391508416532480 | Cost: $2.7530234999999994 | Failed step: hypershift-aws-run-e2e-nested

View full analysis report


Generated by hypershift-analyze-e2e-failure post-step using Claude claude-opus-4-6

@coderabbitai coderabbitai Bot 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.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
hack/copy-capi-types/main.go (1)

494-513: ⚠️ Potential issue | 🟠 Major

Include receiver/parameter/result types in referencesAny for cascade stripping

referencesAny only inspects fn.Body, so cascade stripping can miss stripped symbols referenced solely in fn.Recv, parameter types, or result types, leaving invalid generated code.

Suggested fix
 func referencesAny(fn *ast.FuncDecl, symbols map[string]bool) bool {
-	if fn.Body == nil {
-		return false
-	}
-	found := false
-	ast.Inspect(fn.Body, func(n ast.Node) bool {
-		if found {
-			return false
-		}
-		ident, ok := n.(*ast.Ident)
-		if ok && symbols[ident.Name] {
-			found = true
-		}
-		return true
-	})
-	return found
+	check := func(n ast.Node) bool {
+		found := false
+		ast.Inspect(n, func(node ast.Node) bool {
+			if found {
+				return false
+			}
+			ident, ok := node.(*ast.Ident)
+			if ok && symbols[ident.Name] {
+				found = true
+			}
+			return true
+		})
+		return found
+	}
+
+	if fn.Recv != nil {
+		for _, f := range fn.Recv.List {
+			if check(f.Type) {
+				return true
+			}
+		}
+	}
+	if fn.Type.Params != nil {
+		for _, f := range fn.Type.Params.List {
+			if check(f.Type) {
+				return true
+			}
+		}
+	}
+	if fn.Type.Results != nil {
+		for _, f := range fn.Type.Results.List {
+			if check(f.Type) {
+				return true
+			}
+		}
+	}
+	return fn.Body != nil && check(fn.Body)
 }
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@hack/copy-capi-types/main.go` around lines 494 - 513, The function
referencesAny currently only inspects fn.Body and therefore misses identifiers
referenced in the method receiver, parameter types, and result types; update
referencesAny to also inspect fn.Recv, fn.Type.Params and fn.Type.Results (visit
their *ast.FieldList nodes) and search for *ast.Ident the same way you do for
the body so that any identifier used in receiver or signature types sets
found=true; reuse the same ast.Inspect logic (or factor out an inspectNode
helper) to walk those AST nodes (fn.Recv, fn.Type.Params, fn.Type.Results) in
addition to fn.Body to ensure cascade stripping catches symbols referenced in
signatures.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Outside diff comments:
In `@hack/copy-capi-types/main.go`:
- Around line 494-513: The function referencesAny currently only inspects
fn.Body and therefore misses identifiers referenced in the method receiver,
parameter types, and result types; update referencesAny to also inspect fn.Recv,
fn.Type.Params and fn.Type.Results (visit their *ast.FieldList nodes) and search
for *ast.Ident the same way you do for the body so that any identifier used in
receiver or signature types sets found=true; reuse the same ast.Inspect logic
(or factor out an inspectNode helper) to walk those AST nodes (fn.Recv,
fn.Type.Params, fn.Type.Results) in addition to fn.Body to ensure cascade
stripping catches symbols referenced in signatures.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Central YAML (inherited)

Review profile: CHILL

Plan: Enterprise

Run ID: 0db6d833-6d48-4995-9e2e-c3ea1e482c95

📥 Commits

Reviewing files that changed from the base of the PR and between 2638ef0 and 8e17af6.

📒 Files selected for processing (4)
  • .golangci.yml
  • Makefile
  • hack/capi-sync-provider.sh
  • hack/copy-capi-types/main.go
✅ Files skipped from review due to trivial changes (1)
  • .golangci.yml

@csrwng csrwng force-pushed the capi-decouple branch 2 times, most recently from c7eb668 to af5fced Compare June 9, 2026 19:10

@coderabbitai coderabbitai Bot 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.

Actionable comments posted: 1

🧹 Nitpick comments (2)
hack/copy-capi-types/main_test.go (1)

184-208: 💤 Low value

Test helper constructs a synthetic FuncDecl for interface methods, but this may not accurately test referencesAny.

For the "no body" test case (line 149-154), the code constructs a synthetic FuncDecl from interface method signatures. However, referencesAny returns false when fn.Body == nil (line 504), so the test correctly passes. The synthetic construction is unnecessarily complex.

Simplified approach

The test could be simplified to just parse a function declaration without a body (e.g., an external function declaration):

{
    name: "When a function has no body, it should return false",
    src: `package p
func External()`, // no body
    symbols: map[string]bool{"Bar": true},
    want:    false,
},
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@hack/copy-capi-types/main_test.go` around lines 184 - 208, The test helper
builds a synthetic *ast.FuncDecl from interface methods which is unnecessary
because referencesAny(fn) already returns false when fn.Body == nil; instead
simplify the test by creating/using a parsed FuncDecl with no body (i.e., a real
function declaration lacking a body) rather than constructing one from interface
types. Locate the test that creates fn from file.Decls and replace that path
with a simpler case that parses "func External()" (or equivalent) so the
resulting *ast.FuncDecl has nil Body and the test exercises referencesAny
directly.
hack/capi-sync-provider.sh (1)

25-27: 💤 Low value

run_go is defined but never called.

The run_go() helper function sets proper Go environment variables but is only used inside copy_types(). The mod_cache_dir() function at line 32 duplicates the environment setup inline instead of using run_go.

Suggested consistency improvement
 mod_cache_dir() {
     local module="$1"
-    (cd "$MOD_DIR" && GO111MODULE=on GOWORK=off GOFLAGS= go mod download -json "$module") | jq -r '.Dir'
+    (cd "$MOD_DIR" && GO111MODULE=on GOWORK=off GOFLAGS= run_go mod download -json "$module") | jq -r '.Dir'
 }

Note: This would require run_go to be available in the subshell context or the function body to be restructured.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@hack/capi-sync-provider.sh` around lines 25 - 27, The helper run_go() is
defined but not used in mod_cache_dir(), which duplicates its Go env setup;
update mod_cache_dir() to call run_go instead of inlining
GO111MODULE/GOWORK/GOFLAGS so the environment is centralized (either call run_go
in the same shell or export the function into the subshell with export -f run_go
before using it), and remove the duplicated env variables in mod_cache_dir() so
copy_types(), mod_cache_dir(), and any other callers all use run_go()
consistently.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@hack/copy-capi-types/main.go`:
- Around line 339-341: The parse error is currently swallowed by the `if err !=
nil { continue }` check; instead, log the failure so it’s visible for debugging.
Replace the silent `continue` in the parsing loop with a call to the project
logger (or fmt/stderr) that records the filename/identifier being parsed and the
`err` value (include any position info if available), then decide to continue or
abort as appropriate; look for the parsing call that produces `err` and update
that branch to emit a clear error message referencing the file being parsed and
`err`.

---

Nitpick comments:
In `@hack/capi-sync-provider.sh`:
- Around line 25-27: The helper run_go() is defined but not used in
mod_cache_dir(), which duplicates its Go env setup; update mod_cache_dir() to
call run_go instead of inlining GO111MODULE/GOWORK/GOFLAGS so the environment is
centralized (either call run_go in the same shell or export the function into
the subshell with export -f run_go before using it), and remove the duplicated
env variables in mod_cache_dir() so copy_types(), mod_cache_dir(), and any other
callers all use run_go() consistently.

In `@hack/copy-capi-types/main_test.go`:
- Around line 184-208: The test helper builds a synthetic *ast.FuncDecl from
interface methods which is unnecessary because referencesAny(fn) already returns
false when fn.Body == nil; instead simplify the test by creating/using a parsed
FuncDecl with no body (i.e., a real function declaration lacking a body) rather
than constructing one from interface types. Locate the test that creates fn from
file.Decls and replace that path with a simpler case that parses "func
External()" (or equivalent) so the resulting *ast.FuncDecl has nil Body and the
test exercises referencesAny directly.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Central YAML (inherited)

Review profile: CHILL

Plan: Enterprise

Run ID: 10ea9f40-42c0-417a-9c6c-f20e0789f642

📥 Commits

Reviewing files that changed from the base of the PR and between 8e17af6 and c7eb668.

📒 Files selected for processing (5)
  • .golangci.yml
  • Makefile
  • hack/capi-sync-provider.sh
  • hack/copy-capi-types/main.go
  • hack/copy-capi-types/main_test.go
✅ Files skipped from review due to trivial changes (1)
  • .golangci.yml

Comment thread hack/copy-capi-types/main.go

@coderabbitai coderabbitai Bot 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.

♻️ Duplicate comments (1)
hack/copy-capi-types/main.go (1)

338-341: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Parse errors in cross-file cascade are silently ignored.

If re-parsing a file fails, the error is swallowed with continue. This could mask corruption introduced during Pass 1 stripping, making debugging difficult.

Suggested fix: log the parse failure
 		file, err := parser.ParseFile(fset, r.base, content, parser.ParseComments)
 		if err != nil {
+			log.Printf("warning: failed to re-parse %s in cross-file cascade: %v", r.base, err)
 			continue
 		}
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@hack/copy-capi-types/main.go` around lines 338 - 341, The loop silently
continues when parser.ParseFile(fset, r.base, content, parser.ParseComments)
returns an error, which hides parse failures; update the handler for
parser.ParseFile in main.go to log the failure with context (include r.base and
the parse error) instead of silently continuing—use the existing logger or
fmt/log to emit a clear message referencing parser.ParseFile, fset, r.base and
err, and consider failing fast (returning the error) if a parse error indicates
corruption from Pass 1 rather than merely continuing.
🧹 Nitpick comments (1)
hack/capi-sync-provider.sh (1)

105-123: 💤 Low value

upstream_module silently returns empty for unknown providers.

If upstream_module is called with an unrecognized provider (e.g., due to a typo or adding a new provider without updating this function), MODULE_PATH will be empty, causing controller-gen to fail with a confusing error. The main case statement already exits on unknown providers, so this is unlikely, but adding a fallback improves debuggability.

Suggested fix
 upstream_module() {
     case "$1" in
         agent)    echo "github.com/openshift/cluster-api-provider-agent/api" ;;
         aws)      echo "sigs.k8s.io/cluster-api-provider-aws/v2" ;;
         azure)    echo "sigs.k8s.io/cluster-api-provider-azure" ;;
         gcp)      echo "sigs.k8s.io/cluster-api-provider-gcp" ;;
         ibmcloud) echo "sigs.k8s.io/cluster-api-provider-ibmcloud" ;;
         kubevirt) echo "sigs.k8s.io/cluster-api-provider-kubevirt" ;;
         openstack) echo "sigs.k8s.io/cluster-api-provider-openstack" ;;
+        *)        echo "ERROR: upstream_module: unknown provider: $1" >&2; exit 1 ;;
     esac
 }
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@hack/capi-sync-provider.sh` around lines 105 - 123, upstream_module currently
returns empty for unknown providers, which leads to a confusing failure when
MODULE_PATH is blank; update the upstream_module function to include a default
(*) branch that prints a clear error to stderr (including the bad provider value
from "$1") and exits non‑zero, and additionally guard the MODULE_PATH usage
before invoking controller-gen (check that MODULE_PATH is non-empty and, if not,
print an explanatory error and exit) so the script fails fast with a helpful
message; refer to upstream_module and MODULE_PATH/controller-gen invocation for
where to make these changes.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Duplicate comments:
In `@hack/copy-capi-types/main.go`:
- Around line 338-341: The loop silently continues when parser.ParseFile(fset,
r.base, content, parser.ParseComments) returns an error, which hides parse
failures; update the handler for parser.ParseFile in main.go to log the failure
with context (include r.base and the parse error) instead of silently
continuing—use the existing logger or fmt/log to emit a clear message
referencing parser.ParseFile, fset, r.base and err, and consider failing fast
(returning the error) if a parse error indicates corruption from Pass 1 rather
than merely continuing.

---

Nitpick comments:
In `@hack/capi-sync-provider.sh`:
- Around line 105-123: upstream_module currently returns empty for unknown
providers, which leads to a confusing failure when MODULE_PATH is blank; update
the upstream_module function to include a default (*) branch that prints a clear
error to stderr (including the bad provider value from "$1") and exits non‑zero,
and additionally guard the MODULE_PATH usage before invoking controller-gen
(check that MODULE_PATH is non-empty and, if not, print an explanatory error and
exit) so the script fails fast with a helpful message; refer to upstream_module
and MODULE_PATH/controller-gen invocation for where to make these changes.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Central YAML (inherited)

Review profile: CHILL

Plan: Enterprise

Run ID: 153b69f1-c044-4ef1-9906-54c0382495d3

📥 Commits

Reviewing files that changed from the base of the PR and between c7eb668 and af5fced.

⛔ Files ignored due to path filters (127)
  • go.sum is excluded by !**/*.sum
  • hack/capi-vendor/agent/go.sum is excluded by !**/*.sum
  • hack/capi-vendor/aws/go.sum is excluded by !**/*.sum
  • hack/capi-vendor/azure/go.sum is excluded by !**/*.sum
  • hack/capi-vendor/gcp/go.sum is excluded by !**/*.sum
  • hack/capi-vendor/ibmcloud/go.sum is excluded by !**/*.sum
  • hack/capi-vendor/kubevirt/go.sum is excluded by !**/*.sum
  • hack/capi-vendor/openstack/go.sum is excluded by !**/*.sum
  • hack/workspace/go.work is excluded by !**/*.work
  • pkg/capi/agent/v1alpha1/zz_generated.deepcopy.go is excluded by !**/zz_generated*.go, !**/zz_generated*
  • pkg/capi/agent/v1beta1/zz_generated.deepcopy.go is excluded by !**/zz_generated*.go, !**/zz_generated*
  • pkg/capi/aws/api/v1beta1/zz_generated.deepcopy.go is excluded by !**/zz_generated*.go, !**/zz_generated*
  • pkg/capi/aws/api/v1beta2/zz_generated.deepcopy.go is excluded by !**/zz_generated*.go, !**/zz_generated*
  • pkg/capi/aws/exp/api/v1beta1/zz_generated.deepcopy.go is excluded by !**/zz_generated*.go, !**/zz_generated*
  • pkg/capi/aws/exp/api/v1beta2/zz_generated.deepcopy.go is excluded by !**/zz_generated*.go, !**/zz_generated*
  • pkg/capi/azure/api/v1beta1/zz_generated.deepcopy.go is excluded by !**/zz_generated*.go, !**/zz_generated*
  • pkg/capi/gcp/api/v1beta1/zz_generated.deepcopy.go is excluded by !**/zz_generated*.go, !**/zz_generated*
  • pkg/capi/ibmcloud/api/v1beta1/zz_generated.deepcopy.go is excluded by !**/zz_generated*.go, !**/zz_generated*
  • pkg/capi/ibmcloud/api/v1beta2/zz_generated.deepcopy.go is excluded by !**/zz_generated*.go, !**/zz_generated*
  • pkg/capi/kubevirt/api/v1alpha1/zz_generated.deepcopy.go is excluded by !**/zz_generated*.go, !**/zz_generated*
  • pkg/capi/openstack/api/v1alpha1/zz_generated.deepcopy.go is excluded by !**/zz_generated*.go, !**/zz_generated*
  • pkg/capi/openstack/api/v1beta1/zz_generated.deepcopy.go is excluded by !**/zz_generated*.go, !**/zz_generated*
  • vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/CHANGELOG.md is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/LICENSE.txt is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/README.md is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/assets.json is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/autorest.md is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/availabilitysets_client.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/build.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/capacityreservationgroups_client.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/capacityreservations_client.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/ci.yml is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/client_factory.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/cloudserviceoperatingsystems_client.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/cloudserviceroleinstances_client.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/cloudserviceroles_client.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/cloudservices_client.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/cloudservicesupdatedomain_client.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/communitygalleries_client.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/communitygalleryimages_client.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/communitygalleryimageversions_client.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/constants.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/dedicatedhostgroups_client.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/dedicatedhosts_client.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/diskaccesses_client.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/diskencryptionsets_client.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/diskrestorepoint_client.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/disks_client.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/galleries_client.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/galleryapplications_client.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/galleryapplicationversions_client.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/galleryimages_client.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/galleryimageversions_client.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/gallerysharingprofile_client.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/images_client.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/loganalytics_client.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/models.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/models_serde.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/operations_client.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/options.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/proximityplacementgroups_client.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/resourceskus_client.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/responses.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/restorepointcollections_client.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/restorepoints_client.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/sharedgalleries_client.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/sharedgalleryimages_client.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/sharedgalleryimageversions_client.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/snapshots_client.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/sshpublickeys_client.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/time_rfc3339.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/usage_client.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/virtualmachineextensionimages_client.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/virtualmachineextensions_client.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/virtualmachineimages_client.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/virtualmachineimagesedgezone_client.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/virtualmachineruncommands_client.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/virtualmachines_client.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/virtualmachinescalesetextensions_client.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/virtualmachinescalesetrollingupgrades_client.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/virtualmachinescalesets_client.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/virtualmachinescalesetvmextensions_client.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/virtualmachinescalesetvmruncommands_client.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/virtualmachinescalesetvms_client.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5/virtualmachinesizes_client.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/asaskevich/govalidator/v11/.gitignore is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/asaskevich/govalidator/v11/.travis.yml is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/asaskevich/govalidator/v11/CODE_OF_CONDUCT.md is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/asaskevich/govalidator/v11/CONTRIBUTING.md is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/asaskevich/govalidator/v11/LICENSE is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/asaskevich/govalidator/v11/README.md is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/asaskevich/govalidator/v11/arrays.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/asaskevich/govalidator/v11/converter.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/asaskevich/govalidator/v11/doc.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/asaskevich/govalidator/v11/error.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/asaskevich/govalidator/v11/numerics.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/asaskevich/govalidator/v11/patterns.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/asaskevich/govalidator/v11/types.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/asaskevich/govalidator/v11/utils.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/asaskevich/govalidator/v11/validator.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/asaskevich/govalidator/v11/wercker.yml is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/aws/aws-sdk-go-v2/service/eks/CHANGELOG.md is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/aws/aws-sdk-go-v2/service/eks/LICENSE.txt is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_client.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_AssociateAccessPolicy.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_AssociateEncryptionConfig.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_AssociateIdentityProviderConfig.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_CreateAccessEntry.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_CreateAddon.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_CreateCapability.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_CreateCluster.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_CreateEksAnywhereSubscription.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_CreateFargateProfile.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_CreateNodegroup.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_CreatePodIdentityAssociation.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_DeleteAccessEntry.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_DeleteAddon.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_DeleteCapability.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_DeleteCluster.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_DeleteEksAnywhereSubscription.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_DeleteFargateProfile.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_DeleteNodegroup.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_DeletePodIdentityAssociation.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_DeregisterCluster.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_DescribeAccessEntry.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_DescribeAddon.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/aws/aws-sdk-go-v2/service/eks/api_op_DescribeAddonConfiguration.go is excluded by !vendor/**, !**/vendor/**
📒 Files selected for processing (173)
  • .gitignore
  • .golangci.yml
  • Makefile
  • go.mod
  • hack/capi-sync-provider.sh
  • hack/capi-vendor/agent/go.mod
  • hack/capi-vendor/agent/vendor_imports.go
  • hack/capi-vendor/aws/go.mod
  • hack/capi-vendor/aws/vendor_imports.go
  • hack/capi-vendor/azure/go.mod
  • hack/capi-vendor/azure/vendor_imports.go
  • hack/capi-vendor/gcp/go.mod
  • hack/capi-vendor/gcp/vendor_imports.go
  • hack/capi-vendor/ibmcloud/go.mod
  • hack/capi-vendor/ibmcloud/vendor_imports.go
  • hack/capi-vendor/kubevirt/go.mod
  • hack/capi-vendor/kubevirt/vendor_imports.go
  • hack/capi-vendor/openstack/go.mod
  • hack/capi-vendor/openstack/vendor_imports.go
  • hack/copy-capi-types/main.go
  • hack/copy-capi-types/main_test.go
  • pkg/capi/agent/go.mod
  • pkg/capi/agent/v1alpha1/agentcluster_types.go
  • pkg/capi/agent/v1alpha1/agentmachine_types.go
  • pkg/capi/agent/v1alpha1/agentmachinetemplate_types.go
  • pkg/capi/agent/v1alpha1/groupversion_info.go
  • pkg/capi/agent/v1alpha1/types.go
  • pkg/capi/agent/v1beta1/agentcluster_types.go
  • pkg/capi/agent/v1beta1/agentmachine_types.go
  • pkg/capi/agent/v1beta1/agentmachinetemplate_types.go
  • pkg/capi/agent/v1beta1/groupversion_info.go
  • pkg/capi/agent/v1beta1/types.go
  • pkg/capi/aws/api/v1beta1/awscluster_types.go
  • pkg/capi/aws/api/v1beta1/awsclustertemplate_types.go
  • pkg/capi/aws/api/v1beta1/awsidentity_types.go
  • pkg/capi/aws/api/v1beta1/awsmachine_types.go
  • pkg/capi/aws/api/v1beta1/awsmachinetemplate_types.go
  • pkg/capi/aws/api/v1beta1/bastion.go
  • pkg/capi/aws/api/v1beta1/conditions_consts.go
  • pkg/capi/aws/api/v1beta1/doc.go
  • pkg/capi/aws/api/v1beta1/groupversion_info.go
  • pkg/capi/aws/api/v1beta1/network_types.go
  • pkg/capi/aws/api/v1beta1/s3bucket.go
  • pkg/capi/aws/api/v1beta1/tags.go
  • pkg/capi/aws/api/v1beta1/types.go
  • pkg/capi/aws/api/v1beta2/awscluster_types.go
  • pkg/capi/aws/api/v1beta2/awsclustertemplate_types.go
  • pkg/capi/aws/api/v1beta2/awsidentity_types.go
  • pkg/capi/aws/api/v1beta2/awsmachine_types.go
  • pkg/capi/aws/api/v1beta2/awsmachinetemplate_types.go
  • pkg/capi/aws/api/v1beta2/bastion.go
  • pkg/capi/aws/api/v1beta2/conditions_consts.go
  • pkg/capi/aws/api/v1beta2/defaults.go
  • pkg/capi/aws/api/v1beta2/doc.go
  • pkg/capi/aws/api/v1beta2/groupversion_info.go
  • pkg/capi/aws/api/v1beta2/network_types.go
  • pkg/capi/aws/api/v1beta2/s3bucket.go
  • pkg/capi/aws/api/v1beta2/tags.go
  • pkg/capi/aws/api/v1beta2/types.go
  • pkg/capi/aws/api/v1beta2/webhooks.go
  • pkg/capi/aws/exp/api/v1beta1/awsmachinepool_types.go
  • pkg/capi/aws/exp/api/v1beta1/conditions_consts.go
  • pkg/capi/aws/exp/api/v1beta1/doc.go
  • pkg/capi/aws/exp/api/v1beta1/finalizers.go
  • pkg/capi/aws/exp/api/v1beta1/groupversion_info.go
  • pkg/capi/aws/exp/api/v1beta1/types.go
  • pkg/capi/aws/exp/api/v1beta2/awsmachinepool_types.go
  • pkg/capi/aws/exp/api/v1beta2/conditions_consts.go
  • pkg/capi/aws/exp/api/v1beta2/doc.go
  • pkg/capi/aws/exp/api/v1beta2/finalizers.go
  • pkg/capi/aws/exp/api/v1beta2/groupversion_info.go
  • pkg/capi/aws/exp/api/v1beta2/types.go
  • pkg/capi/aws/exp/api/v1beta2/validation.go
  • pkg/capi/aws/go.mod
  • pkg/capi/azure/api/v1beta1/azureasomanagedcluster_types.go
  • pkg/capi/azure/api/v1beta1/azureasomanagedclustertemplate_types.go
  • pkg/capi/azure/api/v1beta1/azureasomanagedcontrolplane_types.go
  • pkg/capi/azure/api/v1beta1/azureasomanagedcontrolplanetemplate_types.go
  • pkg/capi/azure/api/v1beta1/azureasomanagedmachinepool_types.go
  • pkg/capi/azure/api/v1beta1/azureasomanagedmachinepooltemplate_types.go
  • pkg/capi/azure/api/v1beta1/azurecluster_default.go
  • pkg/capi/azure/api/v1beta1/azurecluster_types.go
  • pkg/capi/azure/api/v1beta1/azurecluster_validation.go
  • pkg/capi/azure/api/v1beta1/azureclusteridentity_types.go
  • pkg/capi/azure/api/v1beta1/azureclustertemplate_default.go
  • pkg/capi/azure/api/v1beta1/azureclustertemplate_types.go
  • pkg/capi/azure/api/v1beta1/azureclustertemplate_validation.go
  • pkg/capi/azure/api/v1beta1/azureimage_validation.go
  • pkg/capi/azure/api/v1beta1/azuremachine_default.go
  • pkg/capi/azure/api/v1beta1/azuremachine_types.go
  • pkg/capi/azure/api/v1beta1/azuremachine_validation.go
  • pkg/capi/azure/api/v1beta1/azuremachinetemplate_types.go
  • pkg/capi/azure/api/v1beta1/azuremanagedcluster_types.go
  • pkg/capi/azure/api/v1beta1/azuremanagedclustertemplate_types.go
  • pkg/capi/azure/api/v1beta1/azuremanagedcontrolplane_default.go
  • pkg/capi/azure/api/v1beta1/azuremanagedcontrolplane_types.go
  • pkg/capi/azure/api/v1beta1/azuremanagedcontrolplanetemplate_default.go
  • pkg/capi/azure/api/v1beta1/azuremanagedcontrolplanetemplate_types.go
  • pkg/capi/azure/api/v1beta1/azuremanagedmachinepool_types.go
  • pkg/capi/azure/api/v1beta1/azuremanagedmachinepooltemplate_types.go
  • pkg/capi/azure/api/v1beta1/consts.go
  • pkg/capi/azure/api/v1beta1/doc.go
  • pkg/capi/azure/api/v1beta1/groupversion_info.go
  • pkg/capi/azure/api/v1beta1/tags.go
  • pkg/capi/azure/api/v1beta1/types.go
  • pkg/capi/azure/api/v1beta1/types_class.go
  • pkg/capi/azure/api/v1beta1/types_template.go
  • pkg/capi/azure/go.mod
  • pkg/capi/gcp/api/v1beta1/doc.go
  • pkg/capi/gcp/api/v1beta1/endpoints.go
  • pkg/capi/gcp/api/v1beta1/gcpcluster_types.go
  • pkg/capi/gcp/api/v1beta1/gcpclustertemplate_types.go
  • pkg/capi/gcp/api/v1beta1/gcpmachine_types.go
  • pkg/capi/gcp/api/v1beta1/gcpmachinetemplate_types.go
  • pkg/capi/gcp/api/v1beta1/groupversion_info.go
  • pkg/capi/gcp/api/v1beta1/labels.go
  • pkg/capi/gcp/api/v1beta1/tags.go
  • pkg/capi/gcp/api/v1beta1/types.go
  • pkg/capi/gcp/go.mod
  • pkg/capi/ibmcloud/api/v1beta1/conditions_consts.go
  • pkg/capi/ibmcloud/api/v1beta1/doc.go
  • pkg/capi/ibmcloud/api/v1beta1/groupversion_info.go
  • pkg/capi/ibmcloud/api/v1beta1/ibmpowervscluster_types.go
  • pkg/capi/ibmcloud/api/v1beta1/ibmpowervsclustertemplate_types.go
  • pkg/capi/ibmcloud/api/v1beta1/ibmpowervsimage_types.go
  • pkg/capi/ibmcloud/api/v1beta1/ibmpowervsmachine_types.go
  • pkg/capi/ibmcloud/api/v1beta1/ibmpowervsmachinetemplate_types.go
  • pkg/capi/ibmcloud/api/v1beta1/ibmvpccluster_types.go
  • pkg/capi/ibmcloud/api/v1beta1/ibmvpcmachine_types.go
  • pkg/capi/ibmcloud/api/v1beta1/ibmvpcmachinetemplate_types.go
  • pkg/capi/ibmcloud/api/v1beta1/types.go
  • pkg/capi/ibmcloud/api/v1beta2/conditions_consts.go
  • pkg/capi/ibmcloud/api/v1beta2/doc.go
  • pkg/capi/ibmcloud/api/v1beta2/groupversion_info.go
  • pkg/capi/ibmcloud/api/v1beta2/ibmpowervscluster_types.go
  • pkg/capi/ibmcloud/api/v1beta2/ibmpowervsclustertemplate_types.go
  • pkg/capi/ibmcloud/api/v1beta2/ibmpowervsimage_types.go
  • pkg/capi/ibmcloud/api/v1beta2/ibmpowervsmachine_types.go
  • pkg/capi/ibmcloud/api/v1beta2/ibmpowervsmachinetemplate_types.go
  • pkg/capi/ibmcloud/api/v1beta2/ibmvpccluster_types.go
  • pkg/capi/ibmcloud/api/v1beta2/ibmvpcclustertemplate_types.go
  • pkg/capi/ibmcloud/api/v1beta2/ibmvpcmachine_types.go
  • pkg/capi/ibmcloud/api/v1beta2/ibmvpcmachinetemplate_types.go
  • pkg/capi/ibmcloud/api/v1beta2/types.go
  • pkg/capi/ibmcloud/go.mod
  • pkg/capi/kubevirt/api/v1alpha1/condition_consts.go
  • pkg/capi/kubevirt/api/v1alpha1/doc.go
  • pkg/capi/kubevirt/api/v1alpha1/groupversion_info.go
  • pkg/capi/kubevirt/api/v1alpha1/kubevirtcluster_types.go
  • pkg/capi/kubevirt/api/v1alpha1/kubevirtclustertemplate_types.go
  • pkg/capi/kubevirt/api/v1alpha1/kubevirtmachine_types.go
  • pkg/capi/kubevirt/api/v1alpha1/kubevirtmachinetemplate_types.go
  • pkg/capi/kubevirt/go.mod
  • pkg/capi/openstack/api/v1alpha1/conditions_consts.go
  • pkg/capi/openstack/api/v1alpha1/doc.go
  • pkg/capi/openstack/api/v1alpha1/groupversion_info.go
  • pkg/capi/openstack/api/v1alpha1/openstackfloatingippool_types.go
  • pkg/capi/openstack/api/v1alpha1/openstackserver_types.go
  • pkg/capi/openstack/api/v1alpha1/types.go
  • pkg/capi/openstack/api/v1beta1/conditions_consts.go
  • pkg/capi/openstack/api/v1beta1/doc.go
  • pkg/capi/openstack/api/v1beta1/groupversion_info.go
  • pkg/capi/openstack/api/v1beta1/identity_types.go
  • pkg/capi/openstack/api/v1beta1/openstackcluster_types.go
  • pkg/capi/openstack/api/v1beta1/openstackclustertemplate_types.go
  • pkg/capi/openstack/api/v1beta1/openstackmachine_types.go
  • pkg/capi/openstack/api/v1beta1/openstackmachinetemplate_types.go
  • pkg/capi/openstack/api/v1beta1/types.go
  • pkg/capi/openstack/go.mod
  • pkg/capi/openstack/pkg/utils/errors/errors.go
  • pkg/capi/openstack/pkg/utils/errors/terminal.go
  • pkg/capi/openstack/pkg/utils/optional/types.go
  • support/api/capi_types.go
💤 Files with no reviewable changes (2)
  • pkg/capi/aws/api/v1beta1/network_types.go
  • pkg/capi/aws/api/v1beta1/tags.go
✅ Files skipped from review due to trivial changes (10)
  • .gitignore
  • hack/capi-vendor/agent/go.mod
  • hack/capi-vendor/azure/vendor_imports.go
  • hack/capi-vendor/aws/vendor_imports.go
  • pkg/capi/azure/api/v1beta1/groupversion_info.go
  • .golangci.yml
  • pkg/capi/agent/go.mod
  • hack/capi-vendor/openstack/vendor_imports.go
  • pkg/capi/azure/api/v1beta1/consts.go
  • pkg/capi/aws/go.mod
🚧 Files skipped from review as they are similar to previous changes (59)
  • hack/capi-vendor/gcp/go.mod
  • hack/capi-vendor/kubevirt/vendor_imports.go
  • pkg/capi/azure/api/v1beta1/azureasomanagedclustertemplate_types.go
  • pkg/capi/azure/api/v1beta1/doc.go
  • pkg/capi/agent/v1beta1/groupversion_info.go
  • hack/capi-vendor/ibmcloud/go.mod
  • hack/capi-vendor/aws/go.mod
  • pkg/capi/aws/api/v1beta1/s3bucket.go
  • pkg/capi/agent/v1beta1/agentmachine_types.go
  • pkg/capi/azure/api/v1beta1/azuremanagedcontrolplanetemplate_default.go
  • hack/capi-vendor/gcp/vendor_imports.go
  • hack/capi-vendor/agent/vendor_imports.go
  • hack/capi-vendor/openstack/go.mod
  • pkg/capi/azure/api/v1beta1/azureclustertemplate_default.go
  • pkg/capi/azure/api/v1beta1/azuremanagedclustertemplate_types.go
  • hack/capi-vendor/ibmcloud/vendor_imports.go
  • hack/capi-vendor/azure/go.mod
  • pkg/capi/aws/api/v1beta2/groupversion_info.go
  • pkg/capi/aws/api/v1beta2/s3bucket.go
  • pkg/capi/aws/api/v1beta2/awsmachinetemplate_types.go
  • hack/capi-vendor/kubevirt/go.mod
  • pkg/capi/azure/api/v1beta1/azureasomanagedmachinepooltemplate_types.go
  • pkg/capi/azure/api/v1beta1/azureclustertemplate_validation.go
  • pkg/capi/azure/api/v1beta1/azuremanagedmachinepooltemplate_types.go
  • pkg/capi/azure/api/v1beta1/azureclustertemplate_types.go
  • pkg/capi/aws/api/v1beta2/doc.go
  • pkg/capi/azure/api/v1beta1/azuremanagedcontrolplanetemplate_types.go
  • pkg/capi/azure/api/v1beta1/azuremanagedcluster_types.go
  • pkg/capi/agent/v1beta1/agentcluster_types.go
  • pkg/capi/agent/v1beta1/agentmachinetemplate_types.go
  • pkg/capi/azure/api/v1beta1/types_class.go
  • pkg/capi/azure/api/v1beta1/azureasomanagedcontrolplane_types.go
  • pkg/capi/azure/api/v1beta1/azureasomanagedmachinepool_types.go
  • pkg/capi/azure/api/v1beta1/types_template.go
  • pkg/capi/azure/api/v1beta1/tags.go
  • pkg/capi/aws/api/v1beta2/defaults.go
  • pkg/capi/aws/api/v1beta2/awscluster_types.go
  • pkg/capi/azure/api/v1beta1/azuremachine_default.go
  • pkg/capi/azure/api/v1beta1/types.go
  • pkg/capi/aws/api/v1beta2/awsmachine_types.go
  • pkg/capi/azure/api/v1beta1/azureclusteridentity_types.go
  • pkg/capi/azure/api/v1beta1/azureasomanagedcluster_types.go
  • pkg/capi/azure/api/v1beta1/azuremachine_validation.go
  • pkg/capi/aws/api/v1beta2/webhooks.go
  • pkg/capi/aws/api/v1beta2/awsidentity_types.go
  • pkg/capi/aws/api/v1beta2/tags.go
  • pkg/capi/aws/api/v1beta2/awsclustertemplate_types.go
  • pkg/capi/aws/api/v1beta2/types.go
  • pkg/capi/aws/api/v1beta2/bastion.go
  • go.mod
  • pkg/capi/azure/api/v1beta1/azuremanagedcontrolplane_default.go
  • pkg/capi/aws/api/v1beta2/conditions_consts.go
  • pkg/capi/azure/api/v1beta1/azuremachinetemplate_types.go
  • hack/copy-capi-types/main_test.go
  • pkg/capi/azure/api/v1beta1/azuremachine_types.go
  • pkg/capi/azure/api/v1beta1/azuremanagedcontrolplane_types.go
  • pkg/capi/aws/api/v1beta2/network_types.go
  • pkg/capi/azure/api/v1beta1/azurecluster_default.go
  • pkg/capi/azure/api/v1beta1/azurecluster_validation.go

@csrwng

csrwng commented Jun 9, 2026

Copy link
Copy Markdown
Contributor Author

/pipeline required

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

Scheduling tests matching the pipeline_run_if_changed or not excluded by pipeline_skip_if_only_changed parameters:
/test e2e-aks
/test e2e-aws
/test e2e-aws-upgrade-hypershift-operator
/test e2e-azure-self-managed
/test e2e-azure-v2-self-managed
/test e2e-kubevirt-aws-ovn-reduced
/test e2e-v2-aws
/test e2e-v2-gke

@enxebre

enxebre commented Jun 10, 2026

Copy link
Copy Markdown
Member

please let's make sure to capture this new process here https://github.com/openshift/hypershift/blob/main/DEVELOPMENT.md#multi-module-structure

@openshift-ci openshift-ci Bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jun 10, 2026
@openshift-ci openshift-ci Bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jun 10, 2026
@hypershift-jira-solve-ci

hypershift-jira-solve-ci Bot commented Jun 10, 2026

Copy link
Copy Markdown

Test Failure Analysis Complete

Job Information

Test Failure Analysis

Error

tide: Not mergeable. PR has a merge conflict.

Summary

No Prow CI jobs have executed for this PR. The tide merge bot reports state error with the message "Not mergeable. PR has a merge conflict." The conflict is in AGENTS.md, caused by PR #8690 ("Improve AI skill quality and restructure AGENTS.md") which merged to main on 2026-06-09T09:55:00Z — after PR #8704 was branched. Because tide has flagged the PR as conflicting, all 8 Prow presubmit jobs (e2e-aks, e2e-aws, e2e-aws-upgrade-hypershift-operator, e2e-azure-self-managed, e2e-azure-v2-self-managed, e2e-kubevirt-aws-ovn-reduced, e2e-v2-aws, e2e-v2-gke) remain in pending state with "Waiting for pipeline condition to trigger this job." Additionally, the PR carries the do-not-merge/work-in-progress label, which independently blocks merge via tide.

Root Cause

The sole file with a merge conflict is AGENTS.md. PR #8704 modified the ## Dependencies and Modules section of AGENTS.md, while PR #8690 (merged 2026-06-09) performed a major restructuring of the same file — replacing the ## Dependencies and Modules heading with ## Fleet-Wide Rollout Impact and completely rewriting surrounding sections. Both PRs edited the same region of AGENTS.md around line 27, creating a textual conflict that Git cannot auto-resolve.

The conflict is purely in documentation — no source code, go.mod, go.sum, or vendor files conflict. The 512 changed files (37,830 additions / 153,799 deletions) involving Go module decoupling merge cleanly. Only the AGENTS.md documentation file has a conflict.

Because tide detects this conflict, it sets the commit status to error, which prevents the Prow presubmit pipeline condition from being satisfied. As a result, zero CI jobs have been triggered, and no test results exist to analyze.

A secondary merge blocker exists: the do-not-merge/work-in-progress label is applied to the PR, which also prevents tide from merging even after the conflict is resolved.

Recommendations
  1. Rebase the branch onto current main to resolve the AGENTS.md conflict:

    git fetch origin main
    git rebase origin/main
    # Resolve AGENTS.md conflict — accept main's version and re-apply any documentation additions from this PR
    git add AGENTS.md
    git rebase --continue
    git push --force-with-lease
  2. Remove the do-not-merge/work-in-progress label when the PR is ready for CI and review — this label independently blocks tide from merging.

  3. After rebasing, Prow presubmit jobs will automatically trigger and the actual CI test results can be evaluated. Given the scope of this PR (512 files, Go module restructuring, new pkg/capi/<provider>/ modules, replace directives in go.mod), pay close attention to:

    • make verify — ensures generated code and vendoring are consistent
    • make test — unit tests across all modules
    • E2E jobs — validates the decoupled CAPI providers work correctly at runtime
Evidence
Evidence Detail
Tide status error — "Not mergeable. PR has a merge conflict." (updated 2026-06-10T19:51:53Z)
Conflicting file AGENTS.md (only file; confirmed via git merge --no-commit simulation)
Conflict cause PR #8690 merged 2026-06-09 restructured AGENTS.md, replacing ## Dependencies and Modules with ## Fleet-Wide Rollout Impact
PR merge state mergeable_state: blocked, GitHub reports BLOCKED / MERGEABLE (conflict detected by tide, not always by GitHub API consistently)
Prow CI jobs triggered 0 — all 8 presubmit jobs in pending state: "Waiting for pipeline condition to trigger this job"
Blocking labels do-not-merge/work-in-progress (prevents tide merge independently of conflict)
PR scope 512 files changed, +37,830 / -153,799 lines (Go module decoupling — all merge cleanly except AGENTS.md)

Copy CAPI infrastructure provider API types from vendored sources into
pkg/capi/<provider>/<version>/ using an AST-based tool that strips
external dependencies not needed by HyperShift. This decouples the
Go module dependency on CAPI infrastructure providers so they no longer
require simultaneous bumps during CAPI version upgrades.

All 7 providers (AWS, Azure, GCP, IBM Cloud, KubeVirt, OpenStack, Agent)
are now local. Makefile CRD generation targets, codespell, and
golangci-lint are updated to use the local paths. Generated CRDs are
identical to main.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@csrwng csrwng marked this pull request as ready for review June 10, 2026 20:11
@openshift-ci openshift-ci Bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jun 10, 2026
@openshift-ci openshift-ci Bot requested review from cblecker and jparrill June 10, 2026 20:12
@openshift-ci

openshift-ci Bot commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

@csrwng: 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
ci/prow/e2e-aws 1127c42 link true /test e2e-aws

Full PR test history. Your PR dashboard.

Details

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.

# Download a module into the cache and print its directory.
mod_cache_dir() {
local module="$1"
(cd "$MOD_DIR" && GO111MODULE=on GOWORK=off GOFLAGS= go mod download -json "$module") | jq -r '.Dir'

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I think it's cleaner to put GOFLAGS='' also in line 139

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. area/ci-tooling Indicates the PR includes changes for CI or tooling area/control-plane-operator Indicates the PR includes changes for the control plane operator - in an OCP release area/hypershift-operator Indicates the PR includes changes for the hypershift operator and API - outside an OCP release jira/valid-reference Indicates that this PR references a valid Jira ticket of any type.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants