Skip to content

HIVE-3148: Hive test extension binary#31059

Open
miyadav wants to merge 1 commit intoopenshift:mainfrom
miyadav:hivetestsbinary
Open

HIVE-3148: Hive test extension binary#31059
miyadav wants to merge 1 commit intoopenshift:mainfrom
miyadav:hivetestsbinary

Conversation

@miyadav
Copy link
Copy Markdown
Member

@miyadav miyadav commented Apr 23, 2026

/hold

depends on - openshift/hive#2894

Summary by CodeRabbit

Release Notes

  • New Features
    • Test binaries can now be marked as optional, allowing extraction to continue if optional components are unavailable.
    • Improved extraction robustness: missing optional binaries trigger warnings instead of causing extraction failure.
    • Added a new optional extension binary for enhanced testing features.

@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: automatic mode

@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 23, 2026
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 23, 2026

Walkthrough

A test binary extraction system is enhanced to support optional extensions. A new flag is added to designate test binaries as optional, allowing extraction failures for optional entries to produce warnings and be skipped rather than fail the entire extraction process.

Changes

Cohort / File(s) Summary
Optional Binary Support
pkg/test/extensions/binary.go
Added optional flag to TestBinary type; updated extensionBinaries registry to allow optional extensions; registered new optional hive/openshift-tests-extension.gz binary; modified extraction logic to skip failed optional entries with warnings while preserving fatal errors for non-optional entries.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~15 minutes


Important

Pre-merge checks failed

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

❌ Failed checks (1 error)

Check name Status Explanation Resolution
Ote Binary Stdout Contract ❌ Error No verification output was provided to transform into the required JSON format. Provide the verification output content to be converted into the specified JSON structure.
✅ Passed checks (11 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
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 PR modifies infrastructure code for test binary extraction with no Ginkgo test title definitions found.
Test Structure And Quality ✅ Passed The PR modifies only pkg/test/extensions/binary.go, a production code file managing test binary extensions, not a Ginkgo test file containing test definitions.
Microshift Test Compatibility ✅ Passed The pull request does not add any new Ginkgo e2e tests; it only modifies binary extraction utility code in pkg/test/extensions/binary.go.
Single Node Openshift (Sno) Test Compatibility ✅ Passed This PR modifies test infrastructure code in pkg/test/extensions/binary.go to add an optional flag for handling extension binaries. No new Ginkgo e2e tests are introduced.
Topology-Aware Scheduling Compatibility ✅ Passed PR modifies only test infrastructure code in pkg/test/extensions/binary.go that handles extraction of test binaries. No deployment manifests, operator code, controllers, or scheduling constraints are introduced.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed This pull request does not add any new Ginkgo e2e tests. The changes are limited to infrastructure code in pkg/test/extensions/binary.go, which modifies the TestBinary struct to add an optional flag and registers a new optional extension binary for the hive component. Since no e2e test definitions are being added, the IPv6 and disconnected network compatibility check does not apply.
Title check ✅ Passed The title directly references the HIVE-3148 issue and accurately describes the main change: adding support for a hive test extension binary.
✨ 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 requested review from deads2k and sjenning April 23, 2026 10:42
@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented Apr 23, 2026

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: miyadav
Once this PR has been reviewed and has the lgtm label, please assign smg247 for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found 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

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

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 the current code and only fix it if needed.

Inline comments:
In `@pkg/test/extensions/binary.go`:
- Around line 694-697: The current optional-binary handling inside the
extraction loop (where b.optional and b.imageTag are used) skips on any error,
which can hide real failures; change the logic to call a helper
isMissingFromPayloadError(err) (implement as per the suggested string checks)
and only warn+continue when that helper returns true; for any other error, log
it as an error/return it (don’t silently continue) so auth/transport/path issues
surface. Ensure the helper is used where the extraction error is checked and
maintain the existing log format for the skip case.
🪄 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: openshift/coderabbit/.coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: eeab91a2-f7da-467b-84d1-e0b02adaf8c2

📥 Commits

Reviewing files that changed from the base of the PR and between 88e6572 and 7e1febd.

📒 Files selected for processing (1)
  • pkg/test/extensions/binary.go

Comment on lines +694 to +697
if b.optional {
logrus.Warnf("Skipping optional extension %s (not in payload): %v", b.imageTag, err)
continue
}
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Handle only “missing from payload” as skippable for optional binaries.

At Line 694, the current logic skips on any extraction error for optional binaries. That can mask real failures (auth/transport/path regressions) and silently drop coverage for callers that continue on success.

Proposed hardening
-					if err != nil {
-						if b.optional {
-							logrus.Warnf("Skipping optional extension %s (not in payload): %v", b.imageTag, err)
-							continue
-						}
-						errCh <- err
-						continue
-					}
+					if err != nil {
+						if b.optional && isMissingFromPayloadError(err) {
+							logrus.Warnf("Skipping optional extension %s (%s): %v", b.imageTag, b.binaryPath, err)
+							continue
+						}
+						errCh <- fmt.Errorf("failed extracting extension %s (%s): %w", b.imageTag, b.binaryPath, err)
+						continue
+					}
func isMissingFromPayloadError(err error) bool {
	msg := strings.ToLower(err.Error())
	return strings.Contains(msg, "not found") ||
		strings.Contains(msg, "manifest unknown") ||
		strings.Contains(msg, "no such image")
}
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@pkg/test/extensions/binary.go` around lines 694 - 697, The current
optional-binary handling inside the extraction loop (where b.optional and
b.imageTag are used) skips on any error, which can hide real failures; change
the logic to call a helper isMissingFromPayloadError(err) (implement as per the
suggested string checks) and only warn+continue when that helper returns true;
for any other error, log it as an error/return it (don’t silently continue) so
auth/transport/path issues surface. Ensure the helper is used where the
extraction error is checked and maintain the existing log format for the skip
case.

@openshift-merge-bot
Copy link
Copy Markdown
Contributor

Scheduling required tests:
/test e2e-aws-csi
/test e2e-aws-ovn-fips
/test e2e-aws-ovn-microshift
/test e2e-aws-ovn-microshift-serial
/test e2e-aws-ovn-serial-1of2
/test e2e-aws-ovn-serial-2of2
/test e2e-gcp-csi
/test e2e-gcp-ovn
/test e2e-gcp-ovn-upgrade
/test e2e-metal-ipi-ovn-ipv6
/test e2e-vsphere-ovn
/test e2e-vsphere-ovn-upi

@miyadav miyadav changed the title Hive test extension binary HIVE-3148: Hive test extension binary Apr 23, 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 Apr 23, 2026
@openshift-ci-robot
Copy link
Copy Markdown

openshift-ci-robot commented Apr 23, 2026

@miyadav: This pull request references HIVE-3148 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:

/hold

depends on - openshift/hive#2894

Summary by CodeRabbit

Release Notes

  • New Features
  • Test binaries can now be marked as optional, allowing extraction to continue if optional components are unavailable.
  • Improved extraction robustness: missing optional binaries trigger warnings instead of causing extraction failure.
  • Added a new optional extension binary for enhanced testing features.

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
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented Apr 23, 2026

@miyadav: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/e2e-gcp-ovn 7e1febd link true /test e2e-gcp-ovn
ci/prow/e2e-aws-ovn-serial-1of2 7e1febd link true /test e2e-aws-ovn-serial-1of2
ci/prow/e2e-aws-ovn-fips 7e1febd link true /test e2e-aws-ovn-fips

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.

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

Labels

do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants