CNTRLPLANE-3160: Drop AutoNodeKarpenter feature gate and promote EC2NodeClass to v1#8166
Conversation
|
Pipeline controller notification For optional jobs, comment This repository is configured in: LGTM mode |
|
Skipping CI for Draft Pull Request. |
|
@enxebre: This pull request references CNTRLPLANE-3160 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 epic to target the "4.22.0" version, but no target version was set. DetailsIn response to this:
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. |
📝 WalkthroughWalkthroughThe PR graduates AutoNode/Karpenter by removing feature-gate markers and migrating Karpenter API types from v1beta1 to v1. Several API fields (AutoNode, KarpenterConfig, KarpenterAWSConfig) change from pointer types to value types with Sequence Diagram(s)sequenceDiagram
participant Dev as Developer
participant GH as GitHub Actions
participant Loader as Test Suite Loader
participant CI as Test Runner
participant CP as Control Plane Controllers
participant Karp as Karpenter API/CRDs
Dev->>GH: push changes (API types, tests, workflows, assets)
GH->>GH: detect changes (includes karpenter assets path)
GH->>CI: trigger envtest job
CI->>Loader: load HyperShift CRDs + Karpenter assets
CI->>CP: run controller/unit/integration tests against updated v1 API
CP->>Karp: reconcile OpenshiftEC2NodeClass (v1 types)
Karp-->>CP: status/conditions updated
CI-->>Dev: test results/artifacts
🚥 Pre-merge checks | ✅ 11 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (11 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Review rate limit: 9/10 reviews remaining, refill in 6 minutes. Comment |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: enxebre The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/label tide/merge-method-squash |
9b013f2 to
ca02ee4
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #8166 +/- ##
=======================================
Coverage 36.42% 36.42%
=======================================
Files 765 765
Lines 93302 93300 -2
=======================================
Hits 33981 33981
+ Misses 56606 56604 -2
Partials 2715 2715
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
|
/test e2e-aws |
Test Resultse2e-aws
|
ca02ee4 to
a8d9bd3
Compare
|
/test e2e-aws |
1 similar comment
|
/test e2e-aws |
|
Tests from second stage were triggered manually. Pipeline can be controlled only manually, until HEAD changes. Use command to trigger second stage. |
Remove the AutoNodeKarpenter feature gate to promote the autoNode field to stable/GA. The autoNode field on HostedCluster and HostedControlPlane spec/status is no longer gated behind TechPreviewNoUpgrade. Updates CLI and test code to use value types instead of pointers for the now-ungated AutoNode, KarpenterConfig, and KarpenterAWSConfig structs. Removes the TECH_PREVIEW_NO_UPGRADE skip from the karpenter e2e test, and uses the platform discriminator field for AWS checks. Ref: CNTRLPLANE-3160
440d027 to
0784b7c
Compare
Replace api/karpenter/v1beta1/ with api/karpenter/v1/ to signal API stability as part of the AutoNode GA promotion. The types, structs, and validation markers are unchanged - only the API version is bumped. All source files importing api/karpenter/v1beta1 are updated to api/karpenter/v1. The CRD will now have v1 as the served and storage version. Since the karpenter-operator controls the CRD lifecycle (not the hypershift install), there is no multi-version serving concern. Also fixes a godoc comment on the Conditions field and removes the now-stale v1beta1 lint suppression from .golangci.yml. Ref: CNTRLPLANE-3160
Add two new envtest test suites: - stable.hostedclusters.karpenter.testsuite.yaml: 6 tests covering HostedCluster autoNode CEL validation (provisioner union, platform union, enum validation, roleARN validation) - stable.openshiftec2nodeclasses.testsuite.yaml: 18 tests covering OpenshiftEC2NodeClass v1 CEL validation (subnet/SG selectors, tags, block device mappings, version, capacity reservations, metadata) The karpenter EC2NodeClass tests are self-contained under karpenter-operator/controllers/karpenter/assets/ with their own zz_generated.crd-manifests/ directory. The Makefile karpenter-api target copies the CRD there, and suite_test.go loads both asset dirs. Ref: CNTRLPLANE-3160
Regenerate all auto-generated artifacts after dropping the AutoNodeKarpenter feature gate and promoting OpenshiftEC2NodeClass to v1: - CRD manifests: autoNode fields merged into AAA_ungated.yaml, AutoNodeKarpenter.yaml deleted - Featuregate payload manifests updated - Client code regenerated for karpenter v1 - Vendor directory synced - API docs regenerated Ref: CNTRLPLANE-3160
Add karpenter-operator/controllers/karpenter/assets/tests/ to the path filters so that changes to the karpenter envtest suites trigger the envtest workflows. Ref: CNTRLPLANE-3160
0784b7c to
366f255
Compare
|
/lgtm |
|
Scheduling tests matching the |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
karpenter-operator/controllers/karpenter/assets/tests/openshiftec2nodeclasses.karpenter.hypershift.openshift.io/stable.openshiftec2nodeclasses.testsuite.yaml (1)
29-39: ⚡ Quick winHarden regex validation assertions with full expected messages
On Line [38], Line [86], and Line [219],
expectedErroronly checks a prefix (subnet-,sg-,cr-). Using the full validator message makes these tests less permissive and better at catching message/regression drift.Proposed tightening
- expectedError: "id must match the pattern subnet-" + expectedError: "id must match the pattern subnet-[0-9a-z]+" ... - expectedError: "id must match the pattern sg-" + expectedError: "id must match the pattern sg-[0-9a-z]+" ... - expectedError: "id must match the pattern cr-" + expectedError: "id must match the pattern cr-[0-9a-z]+"Also applies to: 76-87, 207-220
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@karpenter-operator/controllers/karpenter/assets/tests/openshiftec2nodeclasses.karpenter.hypershift.openshift.io/stable.openshiftec2nodeclasses.testsuite.yaml` around lines 29 - 39, Update the test cases (e.g., test named "When subnet id has invalid format it should fail" and the other cases around the same blocks) to assert the full validation error strings instead of loose prefixes: replace expectedError values that currently contain only "subnet-", "sg-", or "cr-" with the complete validator messages returned by the OpenshiftEC2NodeClass validation (the exact full regex-mismatch messages for subnetSelectorTerms.id, securityGroupSelectorTerms.id, and any capacity request id fields). Ensure you update all occurrences referenced in the file (the blocks around the subnet, security group, and capacity request tests) so the assertions match the exact validator output.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In
`@karpenter-operator/controllers/karpenter/assets/tests/openshiftec2nodeclasses.karpenter.hypershift.openshift.io/stable.openshiftec2nodeclasses.testsuite.yaml`:
- Around line 29-39: Update the test cases (e.g., test named "When subnet id has
invalid format it should fail" and the other cases around the same blocks) to
assert the full validation error strings instead of loose prefixes: replace
expectedError values that currently contain only "subnet-", "sg-", or "cr-" with
the complete validator messages returned by the OpenshiftEC2NodeClass validation
(the exact full regex-mismatch messages for subnetSelectorTerms.id,
securityGroupSelectorTerms.id, and any capacity request id fields). Ensure you
update all occurrences referenced in the file (the blocks around the subnet,
security group, and capacity request tests) so the assertions match the exact
validator output.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository YAML (base), Central YAML (inherited)
Review profile: CHILL
Plan: Enterprise
Run ID: 85cd5e6c-6ae1-4985-8864-9363ebd7d7d2
⛔ Files ignored due to path filters (83)
api/hypershift/v1beta1/zz_generated.deepcopy.gois excluded by!**/zz_generated*.go,!**/zz_generated*api/hypershift/v1beta1/zz_generated.featuregated-crd-manifests.yamlis excluded by!**/zz_generated*api/hypershift/v1beta1/zz_generated.featuregated-crd-manifests/hostedclusters.hypershift.openshift.io/AAA_ungated.yamlis excluded by!**/zz_generated.featuregated-crd-manifests/**api/hypershift/v1beta1/zz_generated.featuregated-crd-manifests/hostedclusters.hypershift.openshift.io/AutoNodeKarpenter.yamlis excluded by!**/zz_generated.featuregated-crd-manifests/**api/hypershift/v1beta1/zz_generated.featuregated-crd-manifests/hostedclusters.hypershift.openshift.io/ClusterUpdateAcceptRisks.yamlis excluded by!**/zz_generated.featuregated-crd-manifests/**api/hypershift/v1beta1/zz_generated.featuregated-crd-manifests/hostedclusters.hypershift.openshift.io/ClusterVersionOperatorConfiguration.yamlis excluded by!**/zz_generated.featuregated-crd-manifests/**api/hypershift/v1beta1/zz_generated.featuregated-crd-manifests/hostedclusters.hypershift.openshift.io/ExternalOIDC.yamlis excluded by!**/zz_generated.featuregated-crd-manifests/**api/hypershift/v1beta1/zz_generated.featuregated-crd-manifests/hostedclusters.hypershift.openshift.io/ExternalOIDCWithUIDAndExtraClaimMappings.yamlis excluded by!**/zz_generated.featuregated-crd-manifests/**api/hypershift/v1beta1/zz_generated.featuregated-crd-manifests/hostedclusters.hypershift.openshift.io/ExternalOIDCWithUpstreamParity.yamlis excluded by!**/zz_generated.featuregated-crd-manifests/**api/hypershift/v1beta1/zz_generated.featuregated-crd-manifests/hostedclusters.hypershift.openshift.io/GCPPlatform.yamlis excluded by!**/zz_generated.featuregated-crd-manifests/**api/hypershift/v1beta1/zz_generated.featuregated-crd-manifests/hostedclusters.hypershift.openshift.io/HCPEtcdBackup.yamlis excluded by!**/zz_generated.featuregated-crd-manifests/**api/hypershift/v1beta1/zz_generated.featuregated-crd-manifests/hostedclusters.hypershift.openshift.io/HyperShiftOnlyDynamicResourceAllocation.yamlis excluded by!**/zz_generated.featuregated-crd-manifests/**api/hypershift/v1beta1/zz_generated.featuregated-crd-manifests/hostedclusters.hypershift.openshift.io/ImageStreamImportMode.yamlis excluded by!**/zz_generated.featuregated-crd-manifests/**api/hypershift/v1beta1/zz_generated.featuregated-crd-manifests/hostedclusters.hypershift.openshift.io/KMSEncryptionProvider.yamlis excluded by!**/zz_generated.featuregated-crd-manifests/**api/hypershift/v1beta1/zz_generated.featuregated-crd-manifests/hostedclusters.hypershift.openshift.io/OpenStack.yamlis excluded by!**/zz_generated.featuregated-crd-manifests/**api/hypershift/v1beta1/zz_generated.featuregated-crd-manifests/hostedclusters.hypershift.openshift.io/TLSAdherence.yamlis excluded by!**/zz_generated.featuregated-crd-manifests/**api/hypershift/v1beta1/zz_generated.featuregated-crd-manifests/hostedcontrolplanes.hypershift.openshift.io/AAA_ungated.yamlis excluded by!**/zz_generated.featuregated-crd-manifests/**api/hypershift/v1beta1/zz_generated.featuregated-crd-manifests/hostedcontrolplanes.hypershift.openshift.io/AutoNodeKarpenter.yamlis excluded by!**/zz_generated.featuregated-crd-manifests/**api/hypershift/v1beta1/zz_generated.featuregated-crd-manifests/hostedcontrolplanes.hypershift.openshift.io/ClusterUpdateAcceptRisks.yamlis excluded by!**/zz_generated.featuregated-crd-manifests/**api/hypershift/v1beta1/zz_generated.featuregated-crd-manifests/hostedcontrolplanes.hypershift.openshift.io/ClusterVersionOperatorConfiguration.yamlis excluded by!**/zz_generated.featuregated-crd-manifests/**api/hypershift/v1beta1/zz_generated.featuregated-crd-manifests/hostedcontrolplanes.hypershift.openshift.io/ExternalOIDC.yamlis excluded by!**/zz_generated.featuregated-crd-manifests/**api/hypershift/v1beta1/zz_generated.featuregated-crd-manifests/hostedcontrolplanes.hypershift.openshift.io/ExternalOIDCWithUIDAndExtraClaimMappings.yamlis excluded by!**/zz_generated.featuregated-crd-manifests/**api/hypershift/v1beta1/zz_generated.featuregated-crd-manifests/hostedcontrolplanes.hypershift.openshift.io/ExternalOIDCWithUpstreamParity.yamlis excluded by!**/zz_generated.featuregated-crd-manifests/**api/hypershift/v1beta1/zz_generated.featuregated-crd-manifests/hostedcontrolplanes.hypershift.openshift.io/GCPPlatform.yamlis excluded by!**/zz_generated.featuregated-crd-manifests/**api/hypershift/v1beta1/zz_generated.featuregated-crd-manifests/hostedcontrolplanes.hypershift.openshift.io/HCPEtcdBackup.yamlis excluded by!**/zz_generated.featuregated-crd-manifests/**api/hypershift/v1beta1/zz_generated.featuregated-crd-manifests/hostedcontrolplanes.hypershift.openshift.io/HyperShiftOnlyDynamicResourceAllocation.yamlis excluded by!**/zz_generated.featuregated-crd-manifests/**api/hypershift/v1beta1/zz_generated.featuregated-crd-manifests/hostedcontrolplanes.hypershift.openshift.io/ImageStreamImportMode.yamlis excluded by!**/zz_generated.featuregated-crd-manifests/**api/hypershift/v1beta1/zz_generated.featuregated-crd-manifests/hostedcontrolplanes.hypershift.openshift.io/KMSEncryptionProvider.yamlis excluded by!**/zz_generated.featuregated-crd-manifests/**api/hypershift/v1beta1/zz_generated.featuregated-crd-manifests/hostedcontrolplanes.hypershift.openshift.io/OpenStack.yamlis excluded by!**/zz_generated.featuregated-crd-manifests/**api/hypershift/v1beta1/zz_generated.featuregated-crd-manifests/hostedcontrolplanes.hypershift.openshift.io/TLSAdherence.yamlis excluded by!**/zz_generated.featuregated-crd-manifests/**api/karpenter/v1/zz_generated.deepcopy.gois excluded by!**/zz_generated*.go,!**/zz_generated*client/applyconfiguration/karpenter/v1/blockdevice.gois excluded by!client/**client/applyconfiguration/karpenter/v1/blockdevicemapping.gois excluded by!client/**client/applyconfiguration/karpenter/v1/capacityreservation.gois excluded by!client/**client/applyconfiguration/karpenter/v1/capacityreservationselectorterm.gois excluded by!client/**client/applyconfiguration/karpenter/v1/metadataoptions.gois excluded by!client/**client/applyconfiguration/karpenter/v1/openshiftec2nodeclass.gois excluded by!client/**client/applyconfiguration/karpenter/v1/openshiftec2nodeclassspec.gois excluded by!client/**client/applyconfiguration/karpenter/v1/openshiftec2nodeclassstatus.gois excluded by!client/**client/applyconfiguration/karpenter/v1/securitygroup.gois excluded by!client/**client/applyconfiguration/karpenter/v1/securitygroupselectorterm.gois excluded by!client/**client/applyconfiguration/karpenter/v1/subnet.gois excluded by!client/**client/applyconfiguration/karpenter/v1/subnetselectorterm.gois excluded by!client/**client/applyconfiguration/utils.gois excluded by!client/**client/clientset/clientset/clientset.gois excluded by!client/**client/clientset/clientset/fake/clientset_generated.gois excluded by!client/**client/clientset/clientset/fake/register.gois excluded by!client/**client/clientset/clientset/scheme/register.gois excluded by!client/**client/clientset/clientset/typed/karpenter/v1/doc.gois excluded by!client/**client/clientset/clientset/typed/karpenter/v1/fake/doc.gois excluded by!client/**client/clientset/clientset/typed/karpenter/v1/fake/fake_karpenter_client.gois excluded by!client/**client/clientset/clientset/typed/karpenter/v1/fake/fake_openshiftec2nodeclass.gois excluded by!client/**client/clientset/clientset/typed/karpenter/v1/generated_expansion.gois excluded by!client/**client/clientset/clientset/typed/karpenter/v1/karpenter_client.gois excluded by!client/**client/clientset/clientset/typed/karpenter/v1/openshiftec2nodeclass.gois excluded by!client/**client/clientset/clientset/typed/karpenter/v1beta1/fake/fake_openshiftec2nodeclass.gois excluded by!client/**client/clientset/clientset/typed/karpenter/v1beta1/openshiftec2nodeclass.gois excluded by!client/**client/informers/externalversions/generic.gois excluded by!client/**client/informers/externalversions/karpenter/interface.gois excluded by!client/**client/informers/externalversions/karpenter/v1/interface.gois excluded by!client/**client/informers/externalversions/karpenter/v1/openshiftec2nodeclass.gois excluded by!client/**client/listers/karpenter/v1/expansion_generated.gois excluded by!client/**client/listers/karpenter/v1/openshiftec2nodeclass.gois excluded by!client/**cmd/install/assets/crds/hypershift-operator/payload-manifests/featuregates/featureGate-Hypershift-Default.yamlis excluded by!cmd/install/assets/**/*.yamlcmd/install/assets/crds/hypershift-operator/payload-manifests/featuregates/featureGate-Hypershift-TechPreviewNoUpgrade.yamlis excluded by!cmd/install/assets/**/*.yamlcmd/install/assets/crds/hypershift-operator/payload-manifests/featuregates/featureGate-SelfManagedHA-Default.yamlis excluded by!cmd/install/assets/**/*.yamlcmd/install/assets/crds/hypershift-operator/payload-manifests/featuregates/featureGate-SelfManagedHA-TechPreviewNoUpgrade.yamlis excluded by!cmd/install/assets/**/*.yamlcmd/install/assets/crds/hypershift-operator/tests/hostedclusters.hypershift.openshift.io/stable.hostedclusters.karpenter.testsuite.yamlis excluded by!cmd/install/assets/**/*.yamlcmd/install/assets/crds/hypershift-operator/zz_generated.crd-manifests/hostedclusters-Hypershift-Default.crd.yamlis excluded by!**/zz_generated.crd-manifests/**,!cmd/install/assets/**/*.yamlcmd/install/assets/crds/hypershift-operator/zz_generated.crd-manifests/hostedcontrolplanes-Hypershift-Default.crd.yamlis excluded by!**/zz_generated.crd-manifests/**,!cmd/install/assets/**/*.yamldocs/content/reference/aggregated-docs.mdis excluded by!docs/content/reference/aggregated-docs.mddocs/content/reference/api.mdis excluded by!docs/content/reference/api.mdkarpenter-operator/controllers/karpenter/assets/karpenter.hypershift.openshift.io_openshiftec2nodeclasses.yamlis excluded by!karpenter-operator/controllers/karpenter/assets/*.yamlkarpenter-operator/controllers/karpenter/assets/zz_generated.crd-manifests/openshiftec2nodeclasses.crd.yamlis excluded by!**/zz_generated.crd-manifests/**vendor/github.com/openshift/hypershift/api/hypershift/v1beta1/hosted_controlplane.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/hypershift/api/hypershift/v1beta1/hostedcluster_types.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/hypershift/api/hypershift/v1beta1/zz_generated.deepcopy.gois excluded by!vendor/**,!**/vendor/**,!**/zz_generated*.go,!**/zz_generated*vendor/github.com/openshift/hypershift/api/hypershift/v1beta1/zz_generated.featuregated-crd-manifests.yamlis excluded by!vendor/**,!**/vendor/**,!**/zz_generated*vendor/github.com/openshift/hypershift/api/karpenter/v1/doc.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/hypershift/api/karpenter/v1/karpenter_types.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/hypershift/api/karpenter/v1/register.gois excluded by!vendor/**,!**/vendor/**vendor/github.com/openshift/hypershift/api/karpenter/v1/zz_generated.deepcopy.gois excluded by!vendor/**,!**/vendor/**,!**/zz_generated*.go,!**/zz_generated*vendor/modules.txtis excluded by!vendor/**,!**/vendor/**
📒 Files selected for processing (24)
.github/workflows/envtest-kube.yaml.github/workflows/envtest-ocp.yamlMakefileapi/.golangci.ymlapi/karpenter/v1/doc.goapi/karpenter/v1/karpenter_types.goapi/karpenter/v1/register.gocmd/cluster/core/dump.gocontrol-plane-operator/AGENTS.mdcontrol-plane-operator/controllers/hostedcontrolplane/v2/karpenter/component_test.gocontrol-plane-operator/controllers/hostedcontrolplane/v2/karpenter/deployment.gohypershift-operator/controllers/hostedcluster/hostedcluster_controller.gokarpenter-operator/controllers/karpenter/assets/tests/openshiftec2nodeclasses.karpenter.hypershift.openshift.io/stable.openshiftec2nodeclasses.testsuite.yamlkarpenter-operator/controllers/karpenter/karpenter_controller.gokarpenter-operator/controllers/karpenterignition/karpenterignition_controller.gokarpenter-operator/controllers/karpenterignition/karpenterignition_controller_test.gokarpenter-operator/controllers/nodeclass/ec2_nodeclass_controller.gokarpenter-operator/controllers/nodeclass/ec2_nodeclass_controller_test.gokarpenter-operator/controllers/nodeclass/karpenter_util.gosupport/api/scheme.gosupport/controlplane-component/AGENTS.mdsupport/karpenter/karpenter.gotest/e2e/util/eventually.gotest/envtest/suite_test.go
💤 Files with no reviewable changes (1)
- api/.golangci.yml
✅ Files skipped from review due to trivial changes (10)
- cmd/cluster/core/dump.go
- control-plane-operator/controllers/hostedcontrolplane/v2/karpenter/deployment.go
- .github/workflows/envtest-kube.yaml
- karpenter-operator/controllers/nodeclass/ec2_nodeclass_controller.go
- hypershift-operator/controllers/hostedcluster/hostedcluster_controller.go
- api/karpenter/v1/doc.go
- api/karpenter/v1/karpenter_types.go
- karpenter-operator/controllers/karpenter/karpenter_controller.go
- control-plane-operator/AGENTS.md
- support/controlplane-component/AGENTS.md
🚧 Files skipped from review as they are similar to previous changes (7)
- .github/workflows/envtest-ocp.yaml
- test/envtest/suite_test.go
- karpenter-operator/controllers/nodeclass/ec2_nodeclass_controller_test.go
- api/karpenter/v1/register.go
- karpenter-operator/controllers/karpenterignition/karpenterignition_controller.go
- control-plane-operator/controllers/hostedcontrolplane/v2/karpenter/component_test.go
- karpenter-operator/controllers/karpenterignition/karpenterignition_controller_test.go
|
/pipeline required |
|
Scheduling tests matching the |
AI Test Failure AnalysisJob: Generated by hypershift-analyze-e2e-failure post-step using Claude claude-opus-4-6 |
|
/test e2e-aws-4-22 |
|
/verified by e2e @enxebre |
|
@enxebre: This PR has been marked as verified by DetailsIn response to this:
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. |
|
@enxebre: all tests passed! Full PR test history. Your PR dashboard. DetailsInstructions 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. |
Test Failure Analysis CompleteJob Information
Test Failure AnalysisErrorSummaryThis is a false-positive coverage gate failure on a pure refactoring change. The PR converts Karpenter-related API types from pointer to value semantics ( Root CauseThe 5 uncovered lines are purely mechanical type-signature changes with no new logic:
This code path is in a CLI command handler (
The repo's Recommendations
Evidence
|
|
Now I have the complete analysis. Let me produce the final report: Test Failure Analysis CompleteJob Information
Failure AnalysisErrorSummaryThe The Evidence5 uncovered executable lines across 2 files: File 1: The // BEFORE (4 lines):
func IsKarpenterEnabled(autoNode *hyperv1.AutoNode) bool {
return autoNode != nil &&
autoNode.Provisioner.Name == hyperv1.ProvisionerKarpenter &&
autoNode.Provisioner.Karpenter != nil &&
autoNode.Provisioner.Karpenter.Platform == hyperv1.AWSPlatform
}
// AFTER (2 new executable lines, 0% covered):
func IsKarpenterEnabled(autoNode hyperv1.AutoNode) bool { // line 1
return autoNode.Provisioner.Name == hyperv1.ProvisionerKarpenter && // line 2
autoNode.Provisioner.Karpenter.Platform == hyperv1.AWSPlatform
}A test file File 2: In // BEFORE (pointers):
cluster.Spec.AutoNode = &hyperv1.AutoNode{
...Karpenter: &hyperv1.KarpenterConfig{
...AWS: &hyperv1.KarpenterAWSConfig{
// AFTER (3 new executable lines, 0% covered):
cluster.Spec.AutoNode = hyperv1.AutoNode{ // line 3
...Karpenter: hyperv1.KarpenterConfig{ // line 4
...AWS: hyperv1.KarpenterAWSConfig{ // line 5A test file Root CauseThe failure is caused by missing unit test coverage for 5 newly modified executable lines. Specifically:
Codecov Configuration ContextFrom
Recommendations
Artifacts
|
The api-lint Makefile target uses --new-from-rev=${PULL_BASE_SHA} to
only report issues on lines changed by the PR. When PULL_BASE_SHA is
not set, the Makefile defaults to origin/main.
For PRs targeting release branches, this causes the linter to diff
against main instead of the target branch, flagging pre-existing
divergences as new issues. This broke all release-4.22 PRs after
PR #8166 changed AutoNode/Karpenter fields on main.
Set PULL_BASE_SHA to the PR's actual base commit SHA, matching the
pattern already used by the gitlint workflow.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
What this PR does / why we need it:
Promotes the AutoNode/Karpenter feature to stable/GA by:
AutoNodeKarpenterfeature gate — theautoNodefield on HostedCluster and HostedControlPlane is no longer gated behind TechPreviewNoUpgradeNo runtime/controller code changes — all controllers use
IsKarpenterEnabled()which checks spec values, not the feature gate.Which issue(s) this PR fixes:
Fixes https://issues.redhat.com/browse/CNTRLPLANE-3160
Special notes for your reviewer:
karpenter-operator/controllers/karpenter/assets/with their ownzz_generated.crd-manifests/andtests/directories. The only integration point is adding a second path toLoadTestSuiteSpecsintest/envtest/suite_test.go.cmd/install/install.go) is unaffected — the karpenter CRD is not placed in the hypershift-operator install assets.Checklist:
🤖 Generated with Claude Code via
/jira:solve [CNTRLPLANE-3160](https://redhat.atlassian.net/browse/CNTRLPLANE-3160)Summary by CodeRabbit
New Features
Chores
Bug Fixes