Skip to content

CNTRLPLANE-3307: add unit tests for Azure Private Link Service controllers#8285

Merged
openshift-merge-bot[bot] merged 1 commit into
openshift:mainfrom
bryan-cox:CNTRLPLANE-3307
Apr 30, 2026
Merged

CNTRLPLANE-3307: add unit tests for Azure Private Link Service controllers#8285
openshift-merge-bot[bot] merged 1 commit into
openshift:mainfrom
bryan-cox:CNTRLPLANE-3307

Conversation

@bryan-cox

@bryan-cox bryan-cox commented Apr 20, 2026

Copy link
Copy Markdown
Member

What this PR does / why we need it:

Adds comprehensive behavior-driven unit tests for the Azure Private Link Service observer and controller in control-plane-operator/controllers/azureprivatelinkservice/, increasing code coverage from 68% to 92.7%.

Tests cover:

  • Observer: service discovery, HCP owner reference lookup, AzurePrivateLinkService CR creation/update, base domain extraction, ILB annotation checks, error paths
  • Controller: reconcile lifecycle (create, update, delete), private endpoint provisioning, DNS zone/VNet link/A record reconciliation, finalizer management, HCP deletion cleanup, Azure API error handling, status patch conflicts, sibling CR detection

Which issue(s) this PR fixes:

Fixes CNTRLPLANE-3307

Special notes for your reviewer:

  • SetupWithManager functions (0% coverage) require a real controller manager and are excluded from unit testing
  • All tests follow Gherkin-style naming (When... it should...) and use gomega assertions
  • Azure SDK pollers are tested via custom PollingHandler implementations
  • Interceptor-based fake clients are used to test conflict and status patch error paths

Checklist:

  • Subject and description added to both, commit and PR.
  • Relevant issues have been referenced.
  • This change includes docs.
  • This change includes unit tests.

Summary by CodeRabbit

  • Tests
    • Expanded and hardened unit tests for Azure Private Link Service: cover async create/delete outcomes, error/requeue paths, conflict scenarios, mapping and extraction edge cases, observer cases for missing platform/private-type, and behavior when the service resource is absent. Tests now run in parallel and include helpers to simulate completed pollers and client conflicts.
  • No user-facing changes in this release.

@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 Apr 20, 2026
@openshift-ci-robot

openshift-ci-robot commented Apr 20, 2026

Copy link
Copy Markdown

@bryan-cox: This pull request references CNTRLPLANE-3307 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 task to target the "5.0.0" version, but no target version was set.

Details

In response to this:

What this PR does / why we need it:

Adds comprehensive behavior-driven unit tests for the Azure Private Link Service observer and controller in control-plane-operator/controllers/azureprivatelinkservice/, increasing code coverage from 68% to 92.7%.

Tests cover:

  • Observer: service discovery, HCP owner reference lookup, AzurePrivateLinkService CR creation/update, base domain extraction, ILB annotation checks, error paths
  • Controller: reconcile lifecycle (create, update, delete), private endpoint provisioning, DNS zone/VNet link/A record reconciliation, finalizer management, HCP deletion cleanup, Azure API error handling, status patch conflicts, sibling CR detection

Which issue(s) this PR fixes:

Fixes CNTRLPLANE-3307

Special notes for your reviewer:

  • SetupWithManager functions (0% coverage) require a real controller manager and are excluded from unit testing
  • All tests follow Gherkin-style naming (When... it should...) and use gomega assertions
  • Azure SDK pollers are tested via custom PollingHandler implementations
  • Interceptor-based fake clients are used to test conflict and status patch error paths

Checklist:

  • Subject and description added to both, commit and PR.
  • Relevant issues have been referenced.
  • This change includes docs.
  • This change includes unit tests.

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 commented Apr 20, 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

@openshift-ci openshift-ci Bot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. do-not-merge/needs-area labels Apr 20, 2026
@coderabbitai

coderabbitai Bot commented Apr 20, 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 pull request expands and hardens unit tests for the Azure Private Link Service controller and observer. Mock Azure SDK clients were updated to return configurable azruntime.Poller instances for BeginCreateOrUpdate/BeginDelete, and new poller helpers (donePollingHandler, newDonePoller, newErrorPoller) were added. Tests now exercise create/delete poller success and failure paths, requeue and error propagation, “already linked”/“already deleted” cases, reconciliation mapping (mapHCPToAzurePLS), DNS error-message qualifiers, and nil-safety in extractPrivateEndpointIP. Tests use t.Context(), t.Parallel(), meta.FindStatusCondition, and include fake-client interceptors to simulate conflict errors. A new observer test verifies no error when the Service is absent.


Important

Pre-merge checks failed

Please resolve all errors before merging. Addressing warnings is optional.

❌ Failed checks (1 warning, 3 inconclusive)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 4.60% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Stable And Deterministic Test Names ❓ Inconclusive Test files referenced in PR summary could not be located in repository despite comprehensive search methods. Provide access to actual test files, verify PR branch is checked out, or confirm correct repository path containing these files.
Test Structure And Quality ❓ Inconclusive Custom check targets Ginkgo test patterns, but codebase uses standard Go table-driven tests with testing.T. While tests demonstrate good setup/cleanup and single responsibility, some assertions lack meaningful failure messages. Clarify whether check applies to standard Go or Ginkgo tests. Add failure messages to all Expect() assertions lacking context to aid debugging.
Ote Binary Stdout Contract ❓ Inconclusive Test files mentioned in PR summary could not be located in repository, preventing verification of OTE Binary Stdout Contract compliance. Locate and examine controller_test.go and observer_test.go to verify absence of process-level stdout writes in test setup/teardown functions.
✅ Passed checks (6 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately and concisely summarizes the main change: adding comprehensive unit tests for Azure Private Link Service controllers, matching the detailed file changes in both controller_test.go and observer_test.go.
Microshift Test Compatibility ✅ Passed This PR adds standard Go unit tests using the testing package, not Ginkgo e2e tests. The custom check for MicroShift compatibility is not applicable.
Single Node Openshift (Sno) Test Compatibility ✅ Passed PR adds standard Go unit tests for Azure Private Link Service controller logic using fake Kubernetes clients, not Ginkgo e2e tests.
Topology-Aware Scheduling Compatibility ✅ Passed This PR exclusively adds unit tests for Azure Private Link Service controllers with no deployment manifests, scheduling constraints, or topology-specific code.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed Custom check applies to new Ginkgo e2e tests; this PR adds standard Go unit tests with mocked Azure SDK clients that don't require external connectivity or IPv6 compatibility.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

@openshift-ci openshift-ci Bot added area/control-plane-operator Indicates the PR includes changes for the control plane operator - in an OCP release area/platform/azure PR/issue for Azure (AzurePlatform) platform labels Apr 20, 2026
@openshift-ci

openshift-ci Bot commented Apr 20, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: bryan-cox

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 approved Indicates a PR has been approved by an approver from all required OWNERS files. and removed do-not-merge/needs-area labels Apr 20, 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.

🧹 Nitpick comments (1)
control-plane-operator/controllers/azureprivatelinkservice/observer_test.go (1)

435-460: Consider adding t.Parallel() for consistency.

Other tests in this file (e.g., TestControllerName, TestBaseDomainFromServices) use t.Parallel() at the top of the test function. This test could also benefit from parallel execution.

Suggested fix
 func TestReconcile_WhenServiceNotFound_ItShouldReturnNoError(t *testing.T) {
+	t.Parallel()
 	g := NewGomegaWithT(t)
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@control-plane-operator/controllers/azureprivatelinkservice/observer_test.go`
around lines 435 - 460, Add t.Parallel() to the top of the
TestReconcile_WhenServiceNotFound_ItShouldReturnNoError test to enable parallel
execution consistent with other tests; edit the
TestReconcile_WhenServiceNotFound_ItShouldReturnNoError function (which
constructs AzurePrivateLinkServiceObserver and calls observer.Reconcile) and
insert a call to t.Parallel() immediately after the function starts to allow
this test to run concurrently with others.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@control-plane-operator/controllers/azureprivatelinkservice/observer_test.go`:
- Around line 435-460: Add t.Parallel() to the top of the
TestReconcile_WhenServiceNotFound_ItShouldReturnNoError test to enable parallel
execution consistent with other tests; edit the
TestReconcile_WhenServiceNotFound_ItShouldReturnNoError function (which
constructs AzurePrivateLinkServiceObserver and calls observer.Reconcile) and
insert a call to t.Parallel() immediately after the function starts to allow
this test to run concurrently with others.

ℹ️ Review info
⚙️ Run configuration

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

Review profile: CHILL

Plan: Pro Plus

Run ID: 176674bb-97d4-45f7-bb26-d903e712d5f8

📥 Commits

Reviewing files that changed from the base of the PR and between 5c06422 and 0d5d5aa.

📒 Files selected for processing (2)
  • control-plane-operator/controllers/azureprivatelinkservice/controller_test.go
  • control-plane-operator/controllers/azureprivatelinkservice/observer_test.go

@codecov

codecov Bot commented Apr 20, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 36.71%. Comparing base (60802b1) to head (67f3e17).
⚠️ Report is 31 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8285      +/-   ##
==========================================
+ Coverage   36.46%   36.71%   +0.24%     
==========================================
  Files         765      765              
  Lines       93256    93256              
==========================================
+ Hits        34010    34238     +228     
+ Misses      56532    56338     -194     
+ Partials     2714     2680      -34     

see 2 files with indirect coverage changes

Flag Coverage Δ
cmd-support 30.34% <ø> (ø)
cpo-hostedcontrolplane 37.05% <ø> (ø)
cpo-other 37.58% <ø> (+1.89%) ⬆️
hypershift-operator 47.89% <ø> (ø)
other 28.37% <ø> (ø)

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.

@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: 2

🧹 Nitpick comments (2)
control-plane-operator/controllers/azureprivatelinkservice/controller_test.go (2)

409-415: Consider extracting a shared reconciler/test fixture builder.

This setup pattern repeats heavily across the file, which makes future updates noisy. A small fixture helper (scheme/client/mocks/reconciler) would reduce duplication and improve readability.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@control-plane-operator/controllers/azureprivatelinkservice/controller_test.go`
around lines 409 - 415, Extract a reusable test fixture builder to reduce
duplication: create a helper function (e.g., newTestReconciler or
buildReconcilerFixture) that constructs and returns an
*AzurePrivateLinkServiceReconciler pre-populated with the common pieces (scheme,
fakeClient, and the mock implementations currently used such as
mockPrivateEndpoints, mockPrivateDNSZones, mockVirtualNetworkLinks,
mockRecordSets). Replace repeated inline construction sites with calls to this
helper, allowing callers to override or pass optional mock overrides (like
getErr on mockPrivateEndpoints) so individual tests can customize behavior
without duplicating the entire setup.

1848-1852: Assert mapped request identities, not only count.

TestMapHCPToAzurePLS currently validates only length, so incorrect names/namespaces can still pass. Assert exact types.NamespacedName values for stronger coverage.

✅ Suggested assertion hardening
-			if tt.expectedLen == 0 {
-				g.Expect(requests).To(BeEmpty())
-			} else {
-				g.Expect(requests).To(HaveLen(tt.expectedLen))
-			}
+			if tt.expectedLen == 0 {
+				g.Expect(requests).To(BeEmpty())
+			} else {
+				g.Expect(requests).To(HaveLen(tt.expectedLen))
+				got := map[types.NamespacedName]struct{}{}
+				for _, req := range requests {
+					got[req.NamespacedName] = struct{}{}
+				}
+				g.Expect(got).To(HaveKey(types.NamespacedName{Name: "pls-1", Namespace: "test-ns"}))
+				g.Expect(got).To(HaveKey(types.NamespacedName{Name: "pls-2", Namespace: "test-ns"}))
+			}
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@control-plane-operator/controllers/azureprivatelinkservice/controller_test.go`
around lines 1848 - 1852, TestMapHCPToAzurePLS currently only checks request
count; change the test to assert the exact mapped identities
(types.NamespacedName) instead of just length. For each table entry in
TestMapHCPToAzurePLS, add an expected slice of namespaced names (e.g.,
expectedRequests) and replace the g.Expect(requests).To(HaveLen(...))/BeEmpty()
checks with an equality or unordered membership assertion that compares requests
to the expected slice (use the existing requests variable and compare to
[]types.NamespacedName built from your test case data), ensuring incorrect
names/namespaces will fail the test. Ensure you reference the same
types.NamespacedName format used by the MapHCPToAzurePLS mapping logic when
constructing expected values.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In
`@control-plane-operator/controllers/azureprivatelinkservice/controller_test.go`:
- Around line 2271-2273: Update the inaccurate inline comment above the
AzurePrivateLinkServiceReconciler test: it currently states the first delete is
for hypershift.local "api" but the test actually uses "oauth-openshift" and is
checking base-domain deletion behavior. Edit the comment near the
AzurePrivateLinkServiceReconciler instantiation to mention "oauth-openshift" as
the first delete target and that the test validates base-domain deletion
semantics rather than an "api" hypershift.local record.
- Around line 585-588: Update the misleading comment about reconcileDelete in
controller_test.go: change or remove the phrase “reconcileDelete is best-effort,
always returns nil” and instead state that reconcileDelete normally returns nil
for successful/expected delete flows but tests may assert non-nil errors for
simulated non-404 delete failures; reference the reconcileDelete call in the
test (r.reconcileDelete(t.Context(), azPLS, testr.New(t))) and adjust wording to
reflect that some tests deliberately assert non-nil errors for failure
scenarios.

---

Nitpick comments:
In
`@control-plane-operator/controllers/azureprivatelinkservice/controller_test.go`:
- Around line 409-415: Extract a reusable test fixture builder to reduce
duplication: create a helper function (e.g., newTestReconciler or
buildReconcilerFixture) that constructs and returns an
*AzurePrivateLinkServiceReconciler pre-populated with the common pieces (scheme,
fakeClient, and the mock implementations currently used such as
mockPrivateEndpoints, mockPrivateDNSZones, mockVirtualNetworkLinks,
mockRecordSets). Replace repeated inline construction sites with calls to this
helper, allowing callers to override or pass optional mock overrides (like
getErr on mockPrivateEndpoints) so individual tests can customize behavior
without duplicating the entire setup.
- Around line 1848-1852: TestMapHCPToAzurePLS currently only checks request
count; change the test to assert the exact mapped identities
(types.NamespacedName) instead of just length. For each table entry in
TestMapHCPToAzurePLS, add an expected slice of namespaced names (e.g.,
expectedRequests) and replace the g.Expect(requests).To(HaveLen(...))/BeEmpty()
checks with an equality or unordered membership assertion that compares requests
to the expected slice (use the existing requests variable and compare to
[]types.NamespacedName built from your test case data), ensuring incorrect
names/namespaces will fail the test. Ensure you reference the same
types.NamespacedName format used by the MapHCPToAzurePLS mapping logic when
constructing expected values.
🪄 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: Pro Plus

Run ID: 567e9139-ccb0-4cf5-a965-55693d2d7536

📥 Commits

Reviewing files that changed from the base of the PR and between 0d5d5aa and f70903b.

📒 Files selected for processing (2)
  • control-plane-operator/controllers/azureprivatelinkservice/controller_test.go
  • control-plane-operator/controllers/azureprivatelinkservice/observer_test.go
🚧 Files skipped from review as they are similar to previous changes (1)
  • control-plane-operator/controllers/azureprivatelinkservice/observer_test.go

Comment thread control-plane-operator/controllers/azureprivatelinkservice/controller_test.go Outdated
@bryan-cox bryan-cox force-pushed the CNTRLPLANE-3307 branch 2 times, most recently from 37706f0 to db09aef Compare April 20, 2026 13:36
@bryan-cox bryan-cox marked this pull request as ready for review April 20, 2026 13:41
@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 Apr 20, 2026
@openshift-ci openshift-ci Bot requested review from csrwng and sjenning April 20, 2026 13:47
@bryan-cox

Copy link
Copy Markdown
Member Author

/verified by ut

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

Copy link
Copy Markdown

@bryan-cox: This PR has been marked as verified by ut.

Details

In response to this:

/verified by ut

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.

@bryan-cox

Copy link
Copy Markdown
Member Author

/test security

@openshift-ci openshift-ci Bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Apr 22, 2026
@openshift-ci-robot openshift-ci-robot removed the verified Signifies that the PR passed pre-merge verification criteria label Apr 22, 2026
@hypershift-jira-solve-ci

Copy link
Copy Markdown

AI Test Failure Analysis

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

View full analysis report


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

@hypershift-jira-solve-ci

Copy link
Copy Markdown

AI Test Failure Analysis

Job: pull-ci-openshift-hypershift-main-e2e-azure-self-managed | Build: 2047737520988360704 | Cost: $2.116585 | Failed step: hypershift-azure-run-e2e-self-managed

View full analysis report


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

@hypershift-jira-solve-ci

Copy link
Copy Markdown

AI Test Failure Analysis

Job: pull-ci-openshift-hypershift-main-e2e-aws | Build: 2047737520904474624 | Cost: $5.2471644999999985 | 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

@bryan-cox

Copy link
Copy Markdown
Member Author

/retest

@hypershift-jira-solve-ci

Copy link
Copy Markdown

AI Test Failure Analysis

Job: pull-ci-openshift-hypershift-main-e2e-azure-self-managed | Build: 2047791144309362688 | Cost: $1.6715 | Failed step: hypershift-azure-run-e2e-self-managed

View full analysis report


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

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

/retest-required

Remaining retests: 0 against base HEAD c1a8bb6 and 2 for PR HEAD 0790fbb in total

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

/retest-required

Remaining retests: 0 against base HEAD b4192d4 and 1 for PR HEAD 0790fbb in total

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

/retest-required

Remaining retests: 0 against base HEAD ae7a018 and 0 for PR HEAD 0790fbb in total

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

/hold

Revision 0790fbb was retested 3 times: holding

@openshift-ci openshift-ci Bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Apr 27, 2026
@openshift-ci-robot openshift-ci-robot removed the verified Signifies that the PR passed pre-merge verification criteria label Apr 27, 2026
@openshift-ci openshift-ci Bot removed the lgtm Indicates that a PR is ready to be merged. label Apr 27, 2026
Add comprehensive behavior-driven unit tests for the observer and
controller in the azureprivatelinkservice package, increasing coverage
from 68% to 92.7%.

Signed-off-by: Bryan Cox <[email protected]>
Commit-Message-Assisted-by: Claude (via Claude Code)
@bryan-cox

Copy link
Copy Markdown
Member Author

/hold cancel

@openshift-ci openshift-ci Bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Apr 29, 2026
@Nirshal

Nirshal commented Apr 29, 2026

Copy link
Copy Markdown
Contributor

/lgtm

@bryan-cox

Copy link
Copy Markdown
Member Author

/verified by UT

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

Copy link
Copy Markdown

@bryan-cox: This PR has been marked as verified by UT.

Details

In response to this:

/verified by UT

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.

@Nirshal

Nirshal commented Apr 30, 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 Apr 30, 2026
@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-kubevirt-aws-ovn-reduced
/test e2e-v2-aws

@hypershift-jira-solve-ci

hypershift-jira-solve-ci Bot commented Apr 30, 2026

Copy link
Copy Markdown

I now have the complete root cause analysis. Here is the report:

Test Failure Analysis Complete

Job Information

Test Failure Analysis

Error

OUTDATED: .github/workflows/envtest-kube.yaml has been updated on main since this branch diverged.
OUTDATED: .github/workflows/envtest-ocp.yaml has been updated on main since this branch diverged.
OUTDATED: .github/workflows/test.yaml has been updated on main since this branch diverged.

Rebase your branch on main: git fetch upstream main && git rebase upstream/main

Summary

The verify-workflows presubmit check failed because the PR branch (CNTRLPLANE-3307) has diverged from main and three GitHub Actions workflow files have been updated on main since the branch was created. The PR only modifies test files (controller_test.go and observer_test.go) and does not touch any workflow files, so the outdated workflow definitions on the PR branch are detected as stale. This is not a product bug or test code issue — it is a branch hygiene check requiring a rebase.

Root Cause

The verify-workflows CI check compares .github/workflows/ files between the PR branch head and the main branch. For each workflow file present on main, it computes the git blob hash on both branches and at their merge-base. If the PR branch's version matches the merge-base version (i.e., the PR did not modify it) but main has a newer version, the file is flagged as OUTDATED.

Three workflow files were modified on main after the PR branch diverged:

  1. .github/workflows/envtest-kube.yaml — Modified by commit 366f255318 ("ci: add karpenter test path to envtest GHA workflow triggers", 2026-04-20) which landed on main shortly after the branch was created.

  2. .github/workflows/envtest-ocp.yaml — Modified by the same commit 366f255318 on 2026-04-20.

  3. .github/workflows/test.yaml — Modified by commit 15b9f13637 ("CNTRLPLANE-3308: deps: bump k8s.io 0.34 → 0.35 and openshift/api (CNTRLPLANE-3308: deps: bump k8s.io 0.34 → 0.35 and openshift/api #8286)", 2026-04-29) which merged very recently.

The PR branch was created on 2026-04-20 from base commit 60802b1b. The PR head is 67f3e17e which only adds two test files and does not touch any .github/workflows/ files. Since the branch has not been rebased to incorporate these workflow changes from main, the verify-workflows script correctly identifies the divergence and exits with code 1.

Recommendations
  1. Rebase the PR branch onto main to pick up the latest workflow file changes:

    git fetch upstream main && git rebase upstream/main

    Then force-push the rebased branch.

  2. Re-run the job after rebasing by commenting /test verify-workflows on the PR, or wait for Prow to automatically trigger on the force-push.

  3. No code changes needed — this is purely a branch staleness issue. The PR's actual changes (Azure Private Link Service controller unit tests) are unrelated to the workflow files.

Evidence
Evidence Detail
PR branch base commit 60802b1b18c8a67b5eecd04759617310c61c538b (merge-base with main)
PR head commit 67f3e17ed0b791a1e12c96fe7e4c4328decd06e7
Main branch head a9b5118ea663f59bde04abd164c06854063e9985
PR files changed controller_test.go, observer_test.go (no workflow files)
Outdated file 1 .github/workflows/envtest-kube.yaml — updated by 366f2553 on 2026-04-20
Outdated file 2 .github/workflows/envtest-ocp.yaml — updated by 366f2553 on 2026-04-20
Outdated file 3 .github/workflows/test.yaml — updated by 15b9f136 on 2026-04-29
Check script verify-workflows in openshift-hypershift-main.yaml
Exit code 1 (FAILED=1 set by outdated file detection)
JUnit test name Run test verify-workflows - container test

@bryan-cox

Copy link
Copy Markdown
Member Author

/override "ci/prow/verify-workflows"

This is just UT in this PR

@openshift-ci

openshift-ci Bot commented Apr 30, 2026

Copy link
Copy Markdown
Contributor

@bryan-cox: Overrode contexts on behalf of bryan-cox: ci/prow/verify-workflows

Details

In response to this:

/override "ci/prow/verify-workflows"

This is just UT in this PR

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.

@openshift-ci

openshift-ci Bot commented Apr 30, 2026

Copy link
Copy Markdown
Contributor

@bryan-cox: 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 9bb7d76 into openshift:main Apr 30, 2026
41 checks passed
@bryan-cox bryan-cox deleted the CNTRLPLANE-3307 branch April 30, 2026 16:16
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/control-plane-operator Indicates the PR includes changes for the control plane operator - in an OCP release area/platform/azure PR/issue for Azure (AzurePlatform) platform 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.

4 participants