Skip to content

CNTRLPLANE-400: feat(remediationAllowed in NP): propagate MHC RemediationAllowed to NodePool Ready condition - #9019

Merged
openshift-merge-bot[bot] merged 1 commit into
openshift:mainfrom
sdminonne:CNTRLPLANE-400
Jul 28, 2026
Merged

CNTRLPLANE-400: feat(remediationAllowed in NP): propagate MHC RemediationAllowed to NodePool Ready condition#9019
openshift-merge-bot[bot] merged 1 commit into
openshift:mainfrom
sdminonne:CNTRLPLANE-400

Conversation

@sdminonne

@sdminonne sdminonne commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Bubble up the CAPI MachineHealthCheck RemediationAllowed condition into the NodePool Ready condition. When RemediationAllowed=False (too many unhealthy machines exceed maxUnhealthy), the NodePool Ready condition is overridden to False with reason TooManyUnhealthy and the MHC's original message preserved.
  • Add a MachineHealthCheck watch with a predicate filter so only RemediationAllowed condition changes (Status, Reason, or Message) trigger NodePool reconciliation, avoiding unnecessary reconciliations from unrelated MHC status field updates.
  • Set nodePoolAnnotation on the MHC so the existing enqueueParentNodePool watch handler can map MHC events back to the parent NodePool.

Test plan

  • TestMHCRemediationAllowedBubbledUpToReady — verifies Ready is overridden when RemediationAllowed=False, left untouched when True or absent
  • TestMHCRemediationAllowedChangedPredicate — verifies predicate filters Update events correctly (8 cases: Status changes, Reason-only change, Message-only change, condition appearing/disappearing, no-change cases)
  • TestReconcileMachineHealthCheckAnnotation — verifies nodePoolAnnotation is set on MHC
  • Full nodepool controller test suite passes
  • make verify passes (lint, gitlint, CRD schema check)

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Bug Fixes

    • NodePool readiness now reflects when automatic machine repair is blocked by unhealthy machine limits.
    • NodePool status updates more accurately when machine health repair conditions change.
    • Improved association between health checks and their parent NodePools for reliable reconciliation.
  • Documentation

    • Clarified the conditions under which a NodePool may be marked not ready.

@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 openshift-ci Bot added do-not-merge/needs-area 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 Jul 16, 2026
@openshift-ci
openshift-ci Bot requested review from clebs and jparrill July 16, 2026 15:18
@coderabbitai

coderabbitai Bot commented Jul 16, 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

MachineHealthCheck reconciliation now annotates standard and spot MHCs with their parent NodePool. NodePool reconciliation maps a false RemediationAllowed condition to Ready=False, preserving its reason and message. MHC watch events are filtered to relevant changes in remediation status, reason, or message while retaining hosted-cluster scoping. Unit tests cover annotations, readiness propagation, and predicate behavior.

Sequence Diagram(s)

sequenceDiagram
  participant MachineHealthCheck
  participant NodePoolController
  participant NodePool
  MachineHealthCheck->>NodePoolController: update RemediationAllowed
  NodePoolController->>MachineHealthCheck: inspect condition
  MachineHealthCheck-->>NodePoolController: return status, reason, message
  NodePoolController->>NodePool: set Ready=False with MHC details
Loading

Suggested reviewers: clebs, nirshal, bryan-cox

🚥 Pre-merge checks | ✅ 10 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Test Structure And Quality ⚠️ Warning Tests are well-scoped and have no timeout/cleanup issues, but they use bare Gomega expectations without diagnostic messages. Add failure context to the main Expect calls in these tests (create/get/reconcile/status checks) so failures are easier to diagnose.
✅ Passed checks (10 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Stable And Deterministic Test Names ✅ Passed Added/updated test titles are static literals; no dynamic names, timestamps, UUIDs, or generated identifiers appear in the new subtest names.
Topology-Aware Scheduling Compatibility ✅ Passed Changes only add MHC watch/predicate, annotations, and Ready-condition bubbling; no affinity, topologySpread, nodeSelector, or toleration logic was introduced.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed PASS: The PR adds only Go unit tests and controller logic; no new Ginkgo e2e tests, IPv4-only assumptions, or external connectivity were introduced.
No-Weak-Crypto ✅ Passed Patch only adds MHC/status/watch/test logic; diff scan found no MD5/SHA1/DES/RC4/3DES/Blowfish/ECB, crypto, or constant-time comparison usage.
Container-Privileges ✅ Passed Patch only touches Go controller/test/docs files; no manifest or securityContext privilege settings were added.
No-Sensitive-Data-In-Logs ✅ Passed PASS: the new MHC ready/predicate/annotation code adds no new logging; it only updates conditions/annotations, and existing logs are generic.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: propagating MachineHealthCheck RemediationAllowed into NodePool Ready.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands.

@sdminonne

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 16, 2026

Copy link
Copy Markdown
Contributor
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@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 (1)
hypershift-operator/controllers/nodepool/capi_test.go (1)

3829-3846: 📐 Maintainability & Code Quality | 🔵 Trivial | 🏗️ Heavy lift

Exercise CAPI.Reconcile instead of duplicating its new branch.

This reproduces the production condition logic, so it can pass if CAPI.Reconcile stops invoking that logic. Drive the MHC status through the existing reconciliation fixture and assert the resulting NodePool condition.

As per coding guidelines, unit test any code changes and additions.

🤖 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 `@hypershift-operator/controllers/nodepool/capi_test.go` around lines 3829 -
3846, Replace the duplicated condition-handling block in the test with an
invocation of CAPI.Reconcile using the existing reconciliation fixture,
configuring the fixture’s MachineHealthCheck status with tt.mhcConditions.
Assert the resulting NodePool condition produced by reconciliation, preserving
coverage of the remediation-allowed behavior without directly calling
findMHCRemediationAllowedCondition or SetStatusCondition. Add or update unit
assertions for the reconciled outcomes.

Source: Coding guidelines

🤖 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 `@hypershift-operator/controllers/nodepool/capi.go`:
- Around line 1458-1466: The MHC condition change detection only compares
Status, so same-status Reason or Message updates do not trigger reconciliation.
In hypershift-operator/controllers/nodepool/capi.go lines 1458-1466, update the
comparison in the findMHCRemediationAllowedCondition flow to also detect Reason
and Message changes. In hypershift-operator/controllers/nodepool/capi_test.go
lines 3895-3898, add a test case with unchanged Status but changed Reason and/or
Message that expects reconciliation.

---

Nitpick comments:
In `@hypershift-operator/controllers/nodepool/capi_test.go`:
- Around line 3829-3846: Replace the duplicated condition-handling block in the
test with an invocation of CAPI.Reconcile using the existing reconciliation
fixture, configuring the fixture’s MachineHealthCheck status with
tt.mhcConditions. Assert the resulting NodePool condition produced by
reconciliation, preserving coverage of the remediation-allowed behavior without
directly calling findMHCRemediationAllowedCondition or SetStatusCondition. Add
or update unit assertions for the reconciled outcomes.
🪄 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: fbc73ca4-b40a-4d1d-8510-f6bd6114cd38

📥 Commits

Reviewing files that changed from the base of the PR and between 3eefe36 and 5a73424.

📒 Files selected for processing (3)
  • hypershift-operator/controllers/nodepool/capi.go
  • hypershift-operator/controllers/nodepool/capi_test.go
  • hypershift-operator/controllers/nodepool/nodepool_controller.go

Comment thread hypershift-operator/controllers/nodepool/capi.go Outdated
@sdminonne
sdminonne marked this pull request as draft July 16, 2026 15:25
@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 Jul 16, 2026
@codecov

codecov Bot commented Jul 16, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 87.50000% with 7 lines in your changes missing coverage. Please review.
✅ Project coverage is 44.54%. Comparing base (d166b4f) to head (6cfaad0).
⚠️ Report is 22 commits behind head on main.

Files with missing lines Patch % Lines
hypershift-operator/controllers/nodepool/capi.go 89.09% 4 Missing and 2 partials ⚠️
...erator/controllers/nodepool/nodepool_controller.go 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #9019      +/-   ##
==========================================
+ Coverage   44.51%   44.54%   +0.02%     
==========================================
  Files         774      774              
  Lines       96997    97053      +56     
==========================================
+ Hits        43179    43232      +53     
  Misses      50830    50830              
- Partials     2988     2991       +3     
Files with missing lines Coverage Δ
...erator/controllers/nodepool/nodepool_controller.go 44.38% <0.00%> (-0.05%) ⬇️
hypershift-operator/controllers/nodepool/capi.go 72.79% <89.09%> (+0.83%) ⬆️

... and 1 file with indirect coverage changes

Flag Coverage Δ
cmd-support 38.39% <ø> (ø)
cpo-hostedcontrolplane 47.22% <ø> (ø)
cpo-other 45.25% <ø> (ø)
hypershift-operator 54.54% <87.50%> (+0.08%) ⬆️
other 32.64% <ø> (ø)

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.

@sdminonne
sdminonne marked this pull request as ready for review July 17, 2026 06:08
@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 Jul 17, 2026
@openshift-ci
openshift-ci Bot requested review from Nirshal and bryan-cox July 17, 2026 06:08
@sdminonne sdminonne changed the title feat(CNTRLPLANE-400): propagate MHC RemediationAllowed to NodePool Ready condition CNTRLPLANE-400: feat(remediationAlloowed in NP): propagate MHC RemediationAllowed to NodePool Ready condition Jul 17, 2026
@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Jul 17, 2026
@openshift-ci-robot

openshift-ci-robot commented Jul 17, 2026

Copy link
Copy Markdown

@sdminonne: This pull request references CNTRLPLANE-400 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 "5.0.0" version, but no target version was set.

Details

In response to this:

Summary

  • Bubble up the CAPI MachineHealthCheck RemediationAllowed condition into the NodePool Ready condition. When RemediationAllowed=False (too many unhealthy machines exceed maxUnhealthy), the NodePool Ready condition is overridden to False with reason TooManyUnhealthy and the MHC's original message preserved.
  • Add a MachineHealthCheck watch with a predicate filter so only RemediationAllowed condition changes (Status, Reason, or Message) trigger NodePool reconciliation, avoiding unnecessary reconciliations from unrelated MHC status field updates.
  • Set nodePoolAnnotation on the MHC so the existing enqueueParentNodePool watch handler can map MHC events back to the parent NodePool.

Test plan

  • TestMHCRemediationAllowedBubbledUpToReady — verifies Ready is overridden when RemediationAllowed=False, left untouched when True or absent
  • TestMHCRemediationAllowedChangedPredicate — verifies predicate filters Update events correctly (8 cases: Status changes, Reason-only change, Message-only change, condition appearing/disappearing, no-change cases)
  • TestReconcileMachineHealthCheckAnnotation — verifies nodePoolAnnotation is set on MHC
  • Full nodepool controller test suite passes
  • make verify passes (lint, gitlint, CRD schema check)

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features

  • NodePool readiness now reflects whether MachineHealthCheck remediation is currently allowed.

  • MachineHealthCheck updates can automatically trigger NodePool reconciliation when remediation status details change.

  • MachineHealthChecks are linked to their corresponding NodePools for improved update tracking.

  • Bug Fixes

  • Prevented NodePools from reporting ready when required remediation is blocked.

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.

@jparrill jparrill 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.

Dropped some comments. Thanks!


// When MHC RemediationAllowed is False, override the Ready condition to signal
// that auto-repair is blocked because too many machines are unhealthy.
if remediationAllowed := findMHCRemediationAllowedCondition(mhc.Status.Conditions); remediationAllowed != nil {

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.

Question: Should this be a dedicated condition type instead of overriding Ready?

Today Ready is documented as "bubbles up CAPI MachineDeployment/MachineSet Ready condition — true when all replicas are ready Nodes" (nodepool_conditions.go:50-53). After this change, Ready=False could also mean "nodes are fine but the MHC circuit breaker tripped." An operator seeing Ready=False, Reason=TooManyUnhealthy can't easily distinguish an infrastructure failure from a remediation threshold breach.

The existing pattern is one condition per signal: AutorepairEnabled, AllMachinesReady, AllNodesHealthy, UpdatingVersion. Something like RemediationPaused would follow that pattern and keep Ready's contract intact.

If overriding Ready is the intended approach, the doc comment at nodepool_conditions.go:50 should be updated to reflect this new source.

Wdyt @sdminonne?

@mgencur mgencur Jul 22, 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.

If we go for a separate condition, please not that there are two separate conditions on MachineHealthCheck:
RemediationAllowed and Paused. I would probably choose MachineRemediationAllowed because it's clear it's related to machines and reflects the right condition RemediationAllowed. Using RemediationPaused could confuse this with the other condition "Paused".

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.

I think that I took the override-readyCondition path 'cause @enxebre pushed for that path in some slack chat (but I cannot find it anymore so let's take it's my choice (and fault).

Overriding 'Ready' is intentional: When the MHC circuit breaker fires, the NodePool is notReady. Not ready nodes won't be replaced and the pool is degraded so I would say notReady it's the right semantic.
I knot that we're adding other signals to Ready but this is already the case since it already aggregates multiple signals: it bubbles up MachineDeployment/MachineSet readiness, which itself reflects infrastructure provider status, node readiness, and replica counts. Adding one more signal source (MHC circuit breaker) is just another one: same pattern.

The existing per-signal conditions (AutorepairEnabled, AllMachinesReady, AllNodesHealthy) exist to provide drill-down detail when Ready is false — they don't replace Ready. An operator seeing Ready=F alse, Reason=TooManyUnhealthy gets an immediately actionable signal; they can then inspect AllMachinesReady and AllNodesHealthy for details.

But the doc in nodepool_conditions.go is updated as requested by @jparrill

// When MHC RemediationAllowed is False, override the Ready condition to signal
// that auto-repair is blocked because too many machines are unhealthy.
if remediationAllowed := findMHCRemediationAllowedCondition(mhc.Status.Conditions); remediationAllowed != nil {
if remediationAllowed.Status != corev1.ConditionTrue {

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.

Nit: ConditionUnknown also satisfies != ConditionTrue and would override Ready to False. Is that intentional? If so, worth adding a test case for it. If Unknown should be treated as "we don't know yet, leave Ready alone," you'd need == ConditionFalse instead.

if mhc.Annotations == nil {
mhc.Annotations = map[string]string{}
}
mhc.Annotations[nodePoolAnnotation] = client.ObjectKeyFromObject(nodePool).String()

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.

Bug: reconcileSpotMachineHealthCheck (line ~1180) does not set nodePoolAnnotation. The new MHC watch uses enqueueParentNodePool which depends on this annotation to map events back to the parent NodePool — spot MHC events that pass the predicate will be silently dropped.

Even if MaxUnhealthy=100% makes RemediationAllowed=False unlikely for spot, every other CAPI child resource (MachineDeployment, MachineSet, Machine, MachineTemplate) carries this annotation. The spot MHC should too.

// NodePool reconciliations from unrelated MHC status field changes (e.g. CurrentHealthy,
// Targets) that are already covered by MachineDeployment/MachineSet/Machine watches.
func mhcRemediationAllowedChangedPredicate() predicate.Funcs {
return predicate.Funcs{

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.

Nit: The comment says "Create and Delete events always pass through" but that's implicit (unset predicate.Funcs fields default to true). Two thoughts:

  1. Consider making it explicit with CreateFunc/DeleteFunc returning true for readability.
  2. The controller itself creates the MHC, so every Create event triggers an immediate redundant re-reconciliation. A CreateFunc returning false would avoid that wasted cycle.

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.

I"m not totally positive about this but here is my claude answer:

Suppressing Create events is premature optimization. The controller itself creates the MHC, so the "wasted" Create reconciliation is a single no-op pass through an already-idempotent reconciler. The cost is negligible — one extra reconcile per MHC creation (which happens once per NodePool lifecycle). Suppressing it would add code to save microseconds, and would make the predicate less predictable if the watch is ever reused in a context where Create events matter.

I'm not fixing this

},
}

if remediationAllowed := findMHCRemediationAllowedCondition(mhc.Status.Conditions); remediationAllowed != nil {

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.

Important: This test copies the production logic from Reconcile() verbatim instead of calling the actual method. If someone refactors Reconcile() and breaks the ordering or conditional branches, this test still passes on its own copy.

Consider calling CAPI.Reconcile() with a fake client containing an MHC with RemediationAllowed=False and asserting on the resulting NodePool conditions — same pattern as TestCAPIReconcile at line 1317.

Comment thread hypershift-operator/controllers/nodepool/capi_test.go Outdated
}
}

func TestMHCRemediationAllowedChangedPredicate(t *testing.T) {

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.

Nit: The 8 Update cases are thorough — nice coverage. Two optional additions:

  • A test confirming Create events pass through (the predicate comment says they do, but it's implicit behavior from predicate.Funcs defaults).
  • A test with a non-MHC object type hitting the !ok guard clause.

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.

The 8 existing Update test cases cover the actual filtering logic where bugs can live. Testing that predicate.Funcs defaults to true for Create/Delete events is testing the controller-runtime framework, not our code. The !ok type assertion guard clause is defensive code that cannot be reached with a properly typed watch registration — controller-runtime guarantees the object type matches the watch source. Testing unreachable code paths adds maintenance cost without catching real bugs.

Pushing back on this

@openshift-ci openshift-ci Bot added the area/api Indicates the PR includes changes for the API label Jul 23, 2026
@openshift-ci openshift-ci Bot added the area/control-plane-operator Indicates the PR includes changes for the control plane operator - in an OCP release label Jul 23, 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: 1

🤖 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
`@control-plane-operator/controllers/hostedcontrolplane/v2/assets/assets_test.go`:
- Around line 56-58: Wrap the body of TestKonnectivityServerAuthenticatesAgents
in a subtest whose name follows the required “When ... it should ...” format,
specifically describing the configured cluster CA flag and agent authentication
behavior. Preserve the existing test setup and assertions inside that subtest.
🪄 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: d7cb6007-c541-4242-8e83-547ca46818d5

📥 Commits

Reviewing files that changed from the base of the PR and between 8ebd740 and bbb77de.

⛔ Files ignored due to path filters (7)
  • control-plane-operator/controllers/hostedcontrolplane/testdata/kube-apiserver/AROSwift/zz_fixture_TestControlPlaneComponents_kube_apiserver_deployment.yaml is excluded by !**/testdata/**
  • control-plane-operator/controllers/hostedcontrolplane/testdata/kube-apiserver/GCP/zz_fixture_TestControlPlaneComponents_kube_apiserver_deployment.yaml is excluded by !**/testdata/**
  • control-plane-operator/controllers/hostedcontrolplane/testdata/kube-apiserver/IBMCloud/zz_fixture_TestControlPlaneComponents_kube_apiserver_deployment.yaml is excluded by !**/testdata/**
  • control-plane-operator/controllers/hostedcontrolplane/testdata/kube-apiserver/ModernTLS/zz_fixture_TestControlPlaneComponents_kube_apiserver_deployment.yaml is excluded by !**/testdata/**
  • control-plane-operator/controllers/hostedcontrolplane/testdata/kube-apiserver/TechPreviewNoUpgrade/zz_fixture_TestControlPlaneComponents_kube_apiserver_deployment.yaml is excluded by !**/testdata/**
  • control-plane-operator/controllers/hostedcontrolplane/testdata/kube-apiserver/zz_fixture_TestControlPlaneComponents_kube_apiserver_deployment.yaml is excluded by !**/testdata/**
  • vendor/github.com/openshift/hypershift/api/hypershift/v1beta1/nodepool_conditions.go is excluded by !vendor/**, !**/vendor/**
📒 Files selected for processing (6)
  • api/hypershift/v1beta1/nodepool_conditions.go
  • control-plane-operator/controllers/hostedcontrolplane/v2/assets/assets_test.go
  • control-plane-operator/controllers/hostedcontrolplane/v2/assets/kube-apiserver/deployment.yaml
  • hypershift-operator/controllers/nodepool/capi.go
  • hypershift-operator/controllers/nodepool/capi_test.go
  • hypershift-operator/controllers/nodepool/nodepool_controller.go
🚧 Files skipped from review as they are similar to previous changes (3)
  • hypershift-operator/controllers/nodepool/nodepool_controller.go
  • hypershift-operator/controllers/nodepool/capi.go
  • hypershift-operator/controllers/nodepool/capi_test.go

Comment on lines +56 to +58
func TestKonnectivityServerAuthenticatesAgents(t *testing.T) {
t.Parallel()
g := NewWithT(t)

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.

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Add a guideline-compliant test description.

Wrap the test body in a subtest named like “When the cluster CA flag is configured, it should authenticate agents” to follow the repository’s required test-case format.

As per coding guidelines, unit-test cases must use the “When ... it should ...” format.

🤖 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
`@control-plane-operator/controllers/hostedcontrolplane/v2/assets/assets_test.go`
around lines 56 - 58, Wrap the body of TestKonnectivityServerAuthenticatesAgents
in a subtest whose name follows the required “When ... it should ...” format,
specifically describing the configured cluster CA flag and agent authentication
behavior. Preserve the existing test setup and assertions inside that subtest.

Source: Coding guidelines

@sdminonne

Copy link
Copy Markdown
Contributor Author

/rebase

@github-actions

Copy link
Copy Markdown

🤖 Rebasing PR onto main: workflow run

@openshift-ci-robot openshift-ci-robot removed the verified Signifies that the PR passed pre-merge verification criteria label Jul 25, 2026
@openshift-ci openshift-ci Bot removed the lgtm Indicates that a PR is ready to be merged. label Jul 25, 2026
@sdminonne

Copy link
Copy Markdown
Contributor Author

/verified by @sdminonne in dev cluster

@openshift-ci-robot openshift-ci-robot added the verified Signifies that the PR passed pre-merge verification criteria label Jul 25, 2026
@openshift-ci-robot

Copy link
Copy Markdown

@sdminonne: This PR has been marked as verified by @sdminonne in dev cluster.

Details

In response to this:

/verified by @sdminonne in dev cluster

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.

@sdminonne

Copy link
Copy Markdown
Contributor Author

Simply rebased. Now #9095 got merged and unit tests shouldn't race anymore

@sdminonne

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-4-22
/test e2e-aws-4-22
/test e2e-aks
/test e2e-aws
/test e2e-aws-upgrade-hypershift-operator
/test e2e-azure-v2-self-managed
/test e2e-kubevirt-aws-ovn-reduced
/test e2e-v2-aws
/test e2e-v2-gke
/test unit
/test verify

@sdminonne

Copy link
Copy Markdown
Contributor Author

/retest-required

2 similar comments
@sdminonne

Copy link
Copy Markdown
Contributor Author

/retest-required

@sdminonne

Copy link
Copy Markdown
Contributor Author

/retest-required

@sdminonne sdminonne changed the title CNTRLPLANE-400: feat(remediationAlloowed in NP): propagate MHC RemediationAllowed to NodePool Ready condition CNTRLPLANE-400: feat(remediationAllowed in NP): propagate MHC RemediationAllowed to NodePool Ready condition Jul 26, 2026
@sdminonne

Copy link
Copy Markdown
Contributor Author

/retest-required

@mgencur

mgencur commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

/lgtm

@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label Jul 27, 2026
@openshift-merge-bot

Copy link
Copy Markdown
Contributor

Tests from second stage were triggered manually. Pipeline can be controlled only manually, until HEAD changes. Use command to trigger second stage.

@sdminonne

Copy link
Copy Markdown
Contributor Author

/retest-require

@mgencur

mgencur commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

The gke failure depends on #9099 because the the osImageStream changed for 5.0

osImageStream:
    name: rhel-10

There is a related slack thread about this known issue. Some testing is ongoing

@mgencur

mgencur commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

/retest-required

@jparrill

Copy link
Copy Markdown
Contributor

/approve

@jparrill

Copy link
Copy Markdown
Contributor

/label acknowledge-critical-fixes-only

@openshift-ci openshift-ci Bot added the acknowledge-critical-fixes-only Indicates if the issuer of the label is OK with the policy. label Jul 28, 2026
@csrwng

csrwng commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

/approve

@openshift-ci

openshift-ci Bot commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: csrwng, jparrill, sdminonne

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 Jul 28, 2026
@mgencur

mgencur commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

/test images

@openshift-ci

openshift-ci Bot commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

@sdminonne: all tests passed!

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.

@openshift-merge-bot
openshift-merge-bot Bot merged commit fcfa0d2 into openshift:main Jul 28, 2026
52 checks passed
@sdminonne

Copy link
Copy Markdown
Contributor Author

@mgencur @jparrill @everettraven TY!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

acknowledge-critical-fixes-only Indicates if the issuer of the label is OK with the policy. approved Indicates a PR has been approved by an approver from all required OWNERS files. area/api Indicates the PR includes changes for the API 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. lgtm Indicates that a PR is ready to be merged. verified Signifies that the PR passed pre-merge verification criteria

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants