Skip to content

openstack-test: migrate CI config to OTE (openshift-tests-extension)#79487

Open
mandre wants to merge 1 commit into
openshift:mainfrom
shiftstack:openstack-test-ote
Open

openstack-test: migrate CI config to OTE (openshift-tests-extension)#79487
mandre wants to merge 1 commit into
openshift:mainfrom
shiftstack:openstack-test-ote

Conversation

@mandre
Copy link
Copy Markdown
Member

@mandre mandre commented May 19, 2026

Update the openstack-test main CI configuration to support the OTE migration in openshift/openstack-test#260.

Changes:

  • binary_build_commands: build OTE extension binary via 'make tests-ext-build', package as tar.gz, and place at /usr/bin/ for payload discovery by openshift-tests
  • build test: verify the extension binary with --help instead of the removed openstack-tests binary
  • test/ccpmso jobs: use new openstack-test-openstack-ote step ref
  • dualstack jobs: override test phase with openshift-e2e-test + openstack-test-openstack-ote (replacing the old chain that used openstack-test-openstack)

New step registry ref openstack-test-openstack-ote:

  • Runs from 'tests' image (openshift-tests) instead of 'openstack-tests'
  • Discovers the openstack-test extension from the release payload
  • Grants image-puller access for extension discovery
  • Supports same env vars: OS_CLOUD, OPENSTACK_TEST_SKIPS, CONFIG_TYPE
  • Runs 'openshift-tests run openstack-test/all' suite

The old openstack-test-openstack step ref is preserved for older release branches that still use the standalone openstack-tests binary.

OpenStack Test CI Migration to OTE (OpenShift Tests Extension)

This PR migrates the OpenStack test CI configuration from the traditional approach to the OpenShift Tests Extension (OTE) framework. The changes update how OpenStack tests are built, packaged, and executed in the OpenShift release pipeline.

Build Configuration Changes

The main CI config for openstack-test is updated to:

  • Build the OTE extension binary using make tests-ext-build instead of the traditional OpenStack test binary build
  • Package the extension as a tar.gz archive from the bin/ directory and place the binary at /usr/bin/ for discovery by openshift-tests
  • Update the build verification step to use the extension binary's --help flag instead of checking for the removed openstack-tests binary

New Step Registry Entry

A new step registry entry openstack-test-openstack-ote is introduced that:

  • Executes from the tests image (openshift-tests) instead of the separate openstack-tests image
  • Discovers the openstack-test extension from the release payload
  • Grants the necessary system:image-puller permissions for extension discovery
  • Supports the same configuration environment variables: OS_CLOUD, OPENSTACK_TEST_SKIPS, and CONFIG_TYPE
  • Runs tests via openshift-tests run openstack-test/all

The implementation script handles OpenStack client configuration, proxy setup, test filtering via regex patterns, and cluster role grants for image pulling from the build farm.

Job Configuration Updates

Test/ccpmso jobs and dualstack jobs are updated to:

  • Replace references to the old openstack-test-openstack step with the new openstack-test-openstack-ote step reference
  • For dualstack jobs, the test phase is overridden to use openshift-e2e-test alongside openstack-test-openstack-ote

The existing openstack-test-openstack step reference is preserved for compatibility with older release branches.

Update the openstack-test main CI configuration to support the OTE
migration in openshift/openstack-test#260.

Changes:
- binary_build_commands: build OTE extension binary via 'make
  tests-ext-build', package as tar.gz, and place at /usr/bin/ for
  payload discovery by openshift-tests
- build test: verify the extension binary with --help instead of the
  removed openstack-tests binary
- test/ccpmso jobs: use new openstack-test-openstack-ote step ref
- dualstack jobs: override test phase with openshift-e2e-test +
  openstack-test-openstack-ote (replacing the old chain that used
  openstack-test-openstack)

New step registry ref openstack-test-openstack-ote:
- Runs from 'tests' image (openshift-tests) instead of 'openstack-tests'
- Discovers the openstack-test extension from the release payload
- Grants image-puller access for extension discovery
- Supports same env vars: OS_CLOUD, OPENSTACK_TEST_SKIPS, CONFIG_TYPE
- Runs 'openshift-tests run openstack-test/all' suite

The old openstack-test-openstack step ref is preserved for older release
branches that still use the standalone openstack-tests binary.
@openshift-ci openshift-ci Bot requested review from gryf and rlobillo May 19, 2026 16:16
@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented May 19, 2026

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: mandre

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 May 19, 2026
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 19, 2026

Walkthrough

This pull request introduces a new openstack-test-openstack-ote step-registry entry for running OpenShift tests via the OTE framework on OpenStack. It includes a shell script that configures OpenStack connectivity, proxy support, test filtering, and RBAC permissions, along with step metadata and ownership. The pipeline config is updated to build and package a tests-ext artifact and to use the new OTE step across test selections and workflows.

Changes

OpenStack OTE Step Registry Integration

Layer / File(s) Summary
New openstack-test-openstack-ote step definition and governance
ci-operator/step-registry/openstack/test/openstack-ote/openstack-test-openstack-ote-ref.yaml, ci-operator/step-registry/openstack/test/openstack-ote/openstack-test-openstack-ote-commands.sh, ci-operator/step-registry/openstack/test/openstack-ote/openstack-test-openstack-ote-ref.metadata.json, ci-operator/step-registry/openstack/test/openstack-ote/OWNERS
New step-registry YAML entry defines the openstack-test-openstack-ote step with CPU/memory resource requests and limits. The bash script sets up OpenStack client connectivity via OS_CLIENT_CONFIG_FILE and OS_CLOUD, sources proxy configuration from ${SHARED_DIR}/proxy-conf.sh, conditionally enables disconnected provider mode based on HTTP_PROXY/HTTPS_PROXY, grants image-puller RBAC permissions by temporarily unsetting and restoring KUBECONFIG, and supports test filtering via OPENSTACK_TEST_SKIPS regex before executing openshift-tests. Metadata and OWNERS files record the step's location and governance.
Pipeline config updates to use OTE step and adjust binary builds
ci-operator/config/openshift/openstack-test/openshift-openstack-test-main.yaml
Binary build commands are changed to build tests-ext-build, archive the bin/ directory as openstack-test-test-extension.tar.gz, and copy to /usr/bin/, replacing the previous direct Go build output. Test command help target updates from openstack-tests --help to ./bin/openstack-test-tests-ext --help. The tests workflow replaces openstack-test-openstack with openstack-test-openstack-ote. The e2e-openstack-dualstack and e2e-openstack-dualstack-v6primary workflows adjust their test steps to include openshift-e2e-test and openstack-test-openstack-ote alongside the cluster_profile configuration.

🎯 2 (Simple) | ⏱️ ~12 minutes

Suggested labels: lgtm, approved, rehearsals-ack

🚥 Pre-merge checks | ✅ 12
✅ Passed checks (12 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and specifically describes the main change: migrating the OpenStack test CI configuration to use the OTE (openshift-tests-extension) framework, which aligns with the core objective of the PR.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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 This PR modifies only CI/OpenShift config files (YAML, JSON, shell scripts), not Go test code. The check for Ginkgo test names is not applicable.
Test Structure And Quality ✅ Passed Custom check is not applicable. This PR contains no Ginkgo test code—only CI configuration, shell scripts, and YAML files. Check targets Go test structure quality.
Microshift Test Compatibility ✅ Passed No new Ginkgo e2e tests are added in this PR. It only updates CI configuration, test orchestration scripts, and metadata. The MicroShift compatibility check is not applicable.
Single Node Openshift (Sno) Test Compatibility ✅ Passed No new Ginkgo e2e tests are added in this PR. Changes are CI/build configuration and infrastructure scripts only, not test definitions.
Topology-Aware Scheduling Compatibility ✅ Passed No deployment manifests, operator code, or controllers added/modified. Changes are CI/CD pipeline config files only. No scheduling constraints present.
Ote Binary Stdout Contract ✅ Passed This PR contains CI configuration, not OTE binary source code. Binary is built from openshift/openstack-test repo, not included here. Test script stdout writes are legitimate CI orchestration.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed This PR adds CI orchestration config (YAML, shell scripts, metadata) but no new Ginkgo tests. Tests are run via existing openstack-test extension. Check is not applicable without new test definitions.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Warning

Review ran into problems

🔥 Problems

Git: Failed to clone repository. Please run the @coderabbitai full review command to re-trigger a full review. If the issue persists, set path_filters to include or exclude specific files.


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

@openshift-merge-bot
Copy link
Copy Markdown
Contributor

[REHEARSALNOTIFIER]
@mandre: the pj-rehearse plugin accommodates running rehearsal tests for the changes in this PR. Expand 'Interacting with pj-rehearse' for usage details. The following rehearsable tests have been affected by this change:

Test name Repo Type Reason
pull-ci-openshift-openstack-test-main-build openshift/openstack-test presubmit Ci-operator config changed
pull-ci-openshift-openstack-test-main-e2e-openstack-ccpmso openshift/openstack-test presubmit Ci-operator config changed
pull-ci-openshift-openstack-test-main-e2e-openstack-dualstack openshift/openstack-test presubmit Ci-operator config changed
pull-ci-openshift-openstack-test-main-e2e-openstack-dualstack-v6primary openshift/openstack-test presubmit Ci-operator config changed
pull-ci-openshift-openstack-test-main-images openshift/openstack-test presubmit Ci-operator config changed
pull-ci-openshift-openstack-test-main-test openshift/openstack-test presubmit Ci-operator config changed
pull-ci-openshift-openstack-test-main-verify openshift/openstack-test presubmit Ci-operator config changed

Prior to this PR being merged, you will need to either run and acknowledge or opt to skip these rehearsals.

Interacting with pj-rehearse

Comment: /pj-rehearse to run up to 5 rehearsals
Comment: /pj-rehearse skip to opt-out of rehearsals
Comment: /pj-rehearse {test-name}, with each test separated by a space, to run one or more specific rehearsals
Comment: /pj-rehearse more to run up to 10 rehearsals
Comment: /pj-rehearse max to run up to 25 rehearsals
Comment: /pj-rehearse auto-ack to run up to 5 rehearsals, and add the rehearsals-ack label on success
Comment: /pj-rehearse list to get an up-to-date list of affected jobs
Comment: /pj-rehearse abort to abort all active rehearsals
Comment: /pj-rehearse network-access-allowed to allow rehearsals of tests that have the restrict_network_access field set to false. This must be executed by an openshift org member who is not the PR author

Once you are satisfied with the results of the rehearsals, comment: /pj-rehearse ack to unblock merge. When the rehearsals-ack label is present on your PR, merge will no longer be blocked by rehearsals.
If you would like the rehearsals-ack label removed, comment: /pj-rehearse reject to re-block merging.

Copy link
Copy Markdown
Contributor

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

🤖 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
`@ci-operator/config/openshift/openstack-test/openshift-openstack-test-main.yaml`:
- Around line 1-2: The current binary_build_commands creates a tarball instead
of delivering the executable expected by OTE; update the build step referenced
by binary_build_commands so the actual Go binary (openstack-test-tests-ext) ends
up in /usr/bin/ — either extract the tarball and copy the extracted binary into
/usr/bin/ or skip tarball creation and copy bin/openstack-test-tests-ext
directly to /usr/bin/ after running make tests-ext-build.

In
`@ci-operator/step-registry/openstack/test/openstack-ote/openstack-test-openstack-ote-commands.sh`:
- Line 49: The script line that pipes TESTS into grep and assigns exit_code uses
"return $exit_code" which is invalid outside a function; change that final
"return $exit_code" to "exit $exit_code" so the script terminates properly when
no tests match OPENSTACK_TEST_SKIPS (the line referencing TESTS,
OPENSTACK_TEST_SKIPS and exit_code).
🪄 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: 4b31c67c-254c-476e-87de-b50a6f7db460

📥 Commits

Reviewing files that changed from the base of the PR and between 369d8b2 and cc98bdd.

📒 Files selected for processing (5)
  • ci-operator/config/openshift/openstack-test/openshift-openstack-test-main.yaml
  • ci-operator/step-registry/openstack/test/openstack-ote/OWNERS
  • ci-operator/step-registry/openstack/test/openstack-ote/openstack-test-openstack-ote-commands.sh
  • ci-operator/step-registry/openstack/test/openstack-ote/openstack-test-openstack-ote-ref.metadata.json
  • ci-operator/step-registry/openstack/test/openstack-ote/openstack-test-openstack-ote-ref.yaml

Comment on lines +1 to +2
binary_build_commands: make tests-ext-build && cd bin && tar -czvf openstack-test-test-extension.tar.gz
openstack-test-tests-ext && cp openstack-test-test-extension.tar.gz /usr/bin/
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Search for similar tests-ext or extension packaging patterns in CI configs
rg -n -C3 'tests-ext.*tar.*usr/bin' --type yaml

# Also check for any documentation on openshift-tests extension discovery
rg -n 'openshift-tests.*extension' --type yaml -g 'ci-operator/**' | head -20

Repository: openshift/release

Length of output: 3188


🏁 Script executed:

#!/bin/bash
# Search for openshift-tests extension documentation or discovery code
rg -n 'extension.*discover\|extension.*load\|extension.*tar\|\.tar\.gz.*extension' --type yaml -g 'ci-operator/**' | head -30

# Look for environment variables or configurations related to extensions
rg -n 'OPENSHIFT.*EXTENSION\|TEST.*EXTENSION' --type yaml -g 'ci-operator/**' | head -20

# Check the actual step registry files for extension-related commands
fd -e 'sh' -e 'yaml' 'extension' ci-operator/step-registry/ -x grep -l 'extension' {} \; | head -10

Repository: openshift/release

Length of output: 326


🏁 Script executed:

#!/bin/bash
# Read the extension commands script to understand how extensions are discovered
cat ci-operator/step-registry/openshift-tests-extension/admission-crd-install/openshift-tests-extension-admission-crd-install-commands.sh

# Search for any documentation about openshift-tests extension format
rg -n 'extension' --type md -g '**' | grep -i 'format\|install\|package\|tar\|extract' | head -20

Repository: openshift/release

Length of output: 4353


🏁 Script executed:

#!/bin/bash
# Search for any documentation or code that shows extension discovery patterns
rg -n '/usr/bin.*extension\|extension.*discover\|OPENSHIFT_TEST.*EXTENSION' --type yaml --type sh | head -30

# Search for references to bin directories and extensions
rg -n 'bin.*extension\|extension.*bin' --type yaml -g 'ci-operator/**' | head -20

# Look for openshift-tests references to understand how it loads extensions
rg -n 'openshift-tests' --type sh -g 'ci-operator/**' | grep -i 'extension\|usr/bin' | head -20

Repository: openshift/release

Length of output: 3930


🏁 Script executed:

#!/bin/bash
# Search for how extensions are expected to be discovered in openshift-tests
rg -n 'OPENSHIFT.*TEST.*PATH\|TEST.*EXTENSION.*PATH\|extension.*path' --type yaml --type sh | head -30

# Look for environment variables related to external tests
rg -n 'OPENSHIFT_SKIP_EXTERNAL_TESTS\|EXTERNAL_TESTS\|TEST_EXTENSION' --type yaml --type sh -g 'ci-operator/**' | head -20

# Check if there's any Makefile or build documentation in openstack-test references
rg -n 'tests-ext-build\|tests-ext' --type yaml -g 'ci-operator/**' -C 3 | head -40

Repository: openshift/release

Length of output: 43


🏁 Script executed:

#!/bin/bash
# Read the full config file to understand the complete context
cat ci-operator/config/openshift/openstack-test/openshift-openstack-test-main.yaml

# Search for any references to extension binary naming patterns
rg -n 'test.*extension\|extension.*tar\|tar.*extension' --type sh --type yaml -i | head -30

Repository: openshift/release

Length of output: 2389


🏁 Script executed:

#!/bin/bash
# Find the openstack-test-openstack-ote step definition
fd -e yaml 'openstack-test-openstack-ote' ci-operator/step-registry/

# If not found, search for the step in the registry
rg -n 'openstack-test-openstack-ote' --type yaml | head -10

Repository: openshift/release

Length of output: 920


🏁 Script executed:

#!/bin/bash
# Read the step commands to see how the extension is loaded
cat ci-operator/step-registry/openstack/test/openstack-ote/openstack-test-openstack-ote-commands.sh

Repository: openshift/release

Length of output: 2240


🏁 Script executed:

#!/bin/bash
# Search for how openshift-tests discovers external test suites or extensions
rg -n 'external.*test\|openstack-test' --type sh -g 'ci-operator/step-registry/**' | grep -i 'discover\|load\|pull\|image' | head -30

# Check if there's documentation on test suite naming or discovery
rg -n 'openshift-tests.*run\|test.*suite' --type sh -g 'ci-operator/step-registry/**' | head -20

# Look for how the extension binary is expected to be found
rg -n '/usr/bin' --type sh -g 'ci-operator/step-registry/**' | grep -i 'extension\|test\|discover' | head -20

Repository: openshift/release

Length of output: 3280


🏁 Script executed:

#!/bin/bash
# Search for how extensions are named or packaged for openshift-tests
rg -n 'extension.*tar\|\.tar\.gz' --type yaml -g 'ci-operator/config/**' | head -20

# Look for any patterns showing how openshift-tests loads extensions
rg -n 'extension' --type yaml -g 'ci-operator/step-registry/**' -C 2 | grep -i 'path\|bin\|tar\|discover\|load' | head -30

# Check if there's documentation in step registry about extensions
fd -e md 'extension' ci-operator/step-registry/ -x cat {} \; | head -50

Repository: openshift/release

Length of output: 5674


🏁 Script executed:

#!/bin/bash
# Read the full step definition with documentation
cat ci-operator/step-registry/openstack/test/openstack-ote/openstack-test-openstack-ote-ref.yaml

Repository: openshift/release

Length of output: 1362


🏁 Script executed:

#!/bin/bash
# Check how the binary is used in the image promotion/build
cat ci-operator/config/openshift/openstack-test/openshift-openstack-test-main.yaml | grep -A 10 -B 10 "images\|promotion"

# Search for how extensions are packaged for release payloads
rg -n 'from.*bin\|to.*bin.*extension' --type yaml -g 'ci-operator/config/**' -C 2 | head -50

Repository: openshift/release

Length of output: 709


🏁 Script executed:

#!/bin/bash
# Check if there's any issue tracking or documentation about OTE extension format
rg -n 'openstack-test-test-extension\|openstack-test-tests-ext' --type yaml --type sh | head -30

# Look for how other test extensions are packaged
rg -n 'extension.*tar\|tar.*extension' --type yaml -g 'ci-operator/config/**' -C 3 | head -50

# Check if there's any reference to how extensions should be formatted
rg -n 'TestExtensionAdmission\|extension.*format' --type yaml | head -20

Repository: openshift/release

Length of output: 43


🏁 Script executed:

#!/bin/bash
# Search for documentation or code about openshift-tests extension format expectations
web_search "openshift-tests extension format tarball binary"

# Also check for any comments in the openstack-test repository or related files
rg -n 'extension.*binary\|binary.*extension\|tar.*extension\|extension.*extract' --type yaml --type sh --type md | head -40

Repository: openshift/release

Length of output: 110


🌐 Web query:

openshift-tests extension binary format discovery

💡 Result:

The OpenShift Tests Extension (OTE) framework is a standardized system designed to allow external repositories to contribute tests to the main OpenShift test suite [1]. It does not rely on a specific proprietary binary format for the extension itself; rather, it utilizes standard, executable Go binaries that implement a specific interface provided by the openshift-tests-extension Go module [1][2]. Key aspects of the OTE binary format and discovery include: 1. Binary Structure: An OTE-compatible extension is a standalone Go binary (e.g., cluster-etcd-operator-tests-ext, oc-tests-ext) [3][4]. These binaries are typically built using the Go toolchain and are often packaged within container images for CI/CD integration [3][4][5]. 2. Framework Integration: The binary uses the openshift-tests-extension framework, specifically the registry pattern, to register itself [3][6]. Developers use the extension.NewRegistry and extension.NewExtension functions to define the extension's identity (e.g., "openshift", "payload", "component-name") [3][7]. 3. Discovery and Execution: The OTE framework provides a standardized interface for test discovery and execution [1]. The binary must support commands such as listing available test suites and individual tests, as well as executing them and reporting results in standardized formats like JUnit XML [3][5][2]. 4. Admission and Extraction: Recent developments have introduced infrastructure for the discovery and extraction of non-payload OTE binaries [8]. This includes the TestExtensionAdmission CRD (testextension.redhat.io/v1), which allows the system to manage, classify, and validate permitted versus unpermitted extensions [8]. In summary, there is no unique binary format; OTE extensions are standard executable binaries that adhere to the OTE framework's Go-based API for registration, discovery, and execution [1][2].

Citations:


🏁 Script executed:

#!/bin/bash
# Check how the binary from /usr/bin/ is included in the release payload
# Look at the docker image definition and promotion

# Search for how other extensions are packaged in images
rg -n 'COPY.*usr/bin\|ADD.*usr/bin' --type yaml -g 'ci-operator/config/**' -C 3 | head -40

# Check if there are any dockerfile literals that reference /usr/bin/
rg -n 'dockerfile_literal' --type yaml -g 'ci-operator/config/**' -A 20 | grep -E 'RUN|COPY|ADD|usr/bin' | head -30

# Look for how extensions are actually delivered in the image
rg -n 'openstack-test' --type yaml -g 'ci-operator/config/**' -B 5 -A 5

Repository: openshift/release

Length of output: 50374


Extract the extension binary for delivery instead of packaging as tarball.

The OTE framework expects executable Go binaries, not tarballs. The current build commands create a tarball (openstack-test-test-extension.tar.gz) and copy it to /usr/bin/, but this needs to be the extracted binary instead. Either extract the tarball before copying to /usr/bin/:

binary_build_commands: make tests-ext-build && cd bin && tar -czvf openstack-test-test-extension.tar.gz openstack-test-tests-ext && tar -xzf openstack-test-test-extension.tar.gz -C /usr/bin/

Or copy the binary directly without creating the tarball intermediate:

binary_build_commands: make tests-ext-build && cp bin/openstack-test-tests-ext /usr/bin/
🤖 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
`@ci-operator/config/openshift/openstack-test/openshift-openstack-test-main.yaml`
around lines 1 - 2, The current binary_build_commands creates a tarball instead
of delivering the executable expected by OTE; update the build step referenced
by binary_build_commands so the actual Go binary (openstack-test-tests-ext) ends
up in /usr/bin/ — either extract the tarball and copy the extracted binary into
/usr/bin/ or skip tarball creation and copy bin/openstack-test-tests-ext
directly to /usr/bin/ after running make tests-ext-build.

TESTS="$(openshift-tests run --dry-run --provider "${TEST_PROVIDER}" "${TEST_SUITE}")"
echo "${TESTS}" | grep -v "${OPENSTACK_TEST_SKIPS}" >/tmp/tests
echo "Skipping tests:"
echo "${TESTS}" | grep "${OPENSTACK_TEST_SKIPS}" || { exit_code=$?; echo 'Error: no tests were found matching the OPENSTACK_TEST_SKIPS regex:'; echo "$OPENSTACK_TEST_SKIPS"; return $exit_code; }
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical | ⚡ Quick win

Use exit instead of return in script context.

Line 49 uses return outside of a function. In a script (non-function context), return is invalid and will cause an error. Use exit to terminate the script with an exit code.

🐛 Proposed fix
-	echo "${TESTS}" | grep "${OPENSTACK_TEST_SKIPS}" || { exit_code=$?; echo 'Error: no tests were found matching the OPENSTACK_TEST_SKIPS regex:'; echo "$OPENSTACK_TEST_SKIPS"; return $exit_code; }
+	echo "${TESTS}" | grep "${OPENSTACK_TEST_SKIPS}" || { exit_code=$?; echo 'Error: no tests were found matching the OPENSTACK_TEST_SKIPS regex:'; echo "$OPENSTACK_TEST_SKIPS"; exit $exit_code; }
📝 Committable suggestion

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

Suggested change
echo "${TESTS}" | grep "${OPENSTACK_TEST_SKIPS}" || { exit_code=$?; echo 'Error: no tests were found matching the OPENSTACK_TEST_SKIPS regex:'; echo "$OPENSTACK_TEST_SKIPS"; return $exit_code; }
echo "${TESTS}" | grep "${OPENSTACK_TEST_SKIPS}" || { exit_code=$?; echo 'Error: no tests were found matching the OPENSTACK_TEST_SKIPS regex:'; echo "$OPENSTACK_TEST_SKIPS"; exit $exit_code; }
🤖 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
`@ci-operator/step-registry/openstack/test/openstack-ote/openstack-test-openstack-ote-commands.sh`
at line 49, The script line that pipes TESTS into grep and assigns exit_code
uses "return $exit_code" which is invalid outside a function; change that final
"return $exit_code" to "exit $exit_code" so the script terminates properly when
no tests match OPENSTACK_TEST_SKIPS (the line referencing TESTS,
OPENSTACK_TEST_SKIPS and exit_code).

@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented May 19, 2026

@mandre: 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.

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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant