Skip to content

OCPBUGS-83512: add retry in nested container tests#31015

Open
bitoku wants to merge 1 commit intoopenshift:mainfrom
bitoku:usernamespace
Open

OCPBUGS-83512: add retry in nested container tests#31015
bitoku wants to merge 1 commit intoopenshift:mainfrom
bitoku:usernamespace

Conversation

@bitoku
Copy link
Copy Markdown
Contributor

@bitoku bitoku commented Apr 16, 2026

Add retries so that it won't fail by transient network issues.

Summary by CodeRabbit

  • Tests
    • Enabled retry behavior for Bats tests by setting BATS_TEST_RETRIES=3 in the test runtime setup, affecting both serial and parallel test executions. No other test command arguments, reporting output locations, or failure-handling behavior were changed.

@openshift-ci-robot openshift-ci-robot added jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. labels Apr 16, 2026
@openshift-ci-robot
Copy link
Copy Markdown

@bitoku: This pull request references Jira Issue OCPBUGS-83512, which is invalid:

  • expected the bug to target the "5.0.0" version, but no target version was set

Comment /jira refresh to re-evaluate validity if changes to the Jira bug are made, or edit the title of this pull request to link to a different bug.

The bug has been updated to refer to the pull request using the external bug tracker.

Details

In response to this:

Add retries so that it won't fail by transient network issues.

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-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 requested review from deads2k and sjenning April 16, 2026 00:48
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 16, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository: openshift/coderabbit/.coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 6cf121b6-bbed-4b2d-9400-6d39515be7d9

📥 Commits

Reviewing files that changed from the base of the PR and between 7998f3e and ebd16ea.

📒 Files selected for processing (2)
  • test/extended/testdata/bindata.go
  • test/extended/testdata/node/nested_container/run_tests.sh
🚧 Files skipped from review as they are similar to previous changes (2)
  • test/extended/testdata/node/nested_container/run_tests.sh
  • test/extended/testdata/bindata.go

Walkthrough

Adds an environment assignment BATS_TEST_RETRIES=3 into the generated embedded test script and the node nested-container test runner, so Bats tests load BATS_TEST_RETRIES=3 before Podman/Bats invocations. No other control flow or arguments were changed.

Changes

Cohort / File(s) Summary
Test Retry Configuration
test/extended/testdata/bindata.go, test/extended/testdata/node/nested_container/run_tests.sh
Appends BATS_TEST_RETRIES=3 to test/system/helpers.bash (setting the environment variable) prior to serial and parallel podman bats runs. No other invocation flags or failure handling were modified.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

🚥 Pre-merge checks | ✅ 10
✅ Passed checks (10 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: adding retry logic to nested container tests via BATS_TEST_RETRIES=3 configuration.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Stable And Deterministic Test Names ✅ Passed PR modifies BATS bash test scripts to add BATS_TEST_RETRIES=3 configuration; no Ginkgo test specifications or test names are changed.
Test Structure And Quality ✅ Passed PR modifies BATS test infrastructure (shell scripts), not Ginkgo test code. Custom check is not applicable.
Microshift Test Compatibility ✅ Passed PR modifies only BATS test configuration scripts, not Ginkgo e2e tests. No new Ginkgo tests (It(), Describe(), Context(), When()) are being added.
Single Node Openshift (Sno) Test Compatibility ✅ Passed PR adds Ginkgo e2e test for nested containers with user namespace functionality that executes on a single node with no SNO compatibility issues.
Topology-Aware Scheduling Compatibility ✅ Passed PR modifies only test infrastructure files with no changes to production code, deployment manifests, or scheduling constraints.
Ote Binary Stdout Contract ✅ Passed Bash script in embedded test data executes within Kubernetes pod container, not affecting main binary stdout or JSON parent process communication.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed PR does not add new Ginkgo e2e tests; only modifies BATS test infrastructure with retry configuration.

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

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

openshift-ci bot commented Apr 16, 2026

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: bitoku
Once this PR has been reviewed and has the lgtm label, please assign stbenjam 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

@bitoku
Copy link
Copy Markdown
Contributor Author

bitoku commented Apr 16, 2026

/refresh

@bitoku
Copy link
Copy Markdown
Contributor Author

bitoku commented Apr 16, 2026

/jira refresh

@openshift-ci-robot openshift-ci-robot added jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. and removed jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. labels Apr 16, 2026
@openshift-ci-robot
Copy link
Copy Markdown

@bitoku: This pull request references Jira Issue OCPBUGS-83512, which is valid. The bug has been moved to the POST state.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (5.0.0) matches configured target version for branch (5.0.0)
  • bug is in the state New, which is one of the valid states (NEW, ASSIGNED, POST)
Details

In response to this:

/jira refresh

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

@bitoku: This pull request references Jira Issue OCPBUGS-83512, which is valid.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (5.0.0) matches configured target version for branch (5.0.0)
  • bug is in the state POST, which is one of the valid states (NEW, ASSIGNED, POST)
Details

In response to this:

Add retries so that it won't fail by transient network issues.

Summary by CodeRabbit

  • Tests
  • Updated test runner configuration to set BATS_TEST_RETRIES=3 for both serial and parallel test executions in the Podman Bats test suite. Changes applied across multiple test runner scripts without altering other command-line arguments or failure handling behavior.

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.

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.

🧹 Nitpick comments (1)
test/extended/testdata/node/nested_container/run_tests.sh (1)

6-6: Quote $(nproc) on Line 6 to resolve SC2046 and harden shell parsing.

ShellCheck flags $(nproc) with SC2046 warning: word splitting may occur if the command substitution contains multiple tokens. Adding quotes prevents this: "$(nproc)".

Proposed diff
-PODMAN=$(pwd)/bin/podman BATS_TEST_RETRIES=3 bats -T --report-formatter junit -o parallel-junit --filter-tags ci:parallel -j $(nproc) test/system/ || touch fail
+PODMAN=$(pwd)/bin/podman BATS_TEST_RETRIES=3 bats -T --report-formatter junit -o parallel-junit --filter-tags ci:parallel -j "$(nproc)" test/system/ || touch fail
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@test/extended/testdata/node/nested_container/run_tests.sh` at line 6, The
command in run_tests.sh uses an unquoted command substitution $(nproc) which
triggers ShellCheck SC2046 and can cause word-splitting; update the invocation
that sets PODMAN and runs bats (the line containing PODMAN=$(pwd)/bin/podman
BATS_TEST_RETRIES=3 bats ... -j $(nproc) test/system/ || touch fail) to quote
the substitution as "$(nproc)" so the -j argument receives a single token.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@test/extended/testdata/node/nested_container/run_tests.sh`:
- Line 6: The command in run_tests.sh uses an unquoted command substitution
$(nproc) which triggers ShellCheck SC2046 and can cause word-splitting; update
the invocation that sets PODMAN and runs bats (the line containing
PODMAN=$(pwd)/bin/podman BATS_TEST_RETRIES=3 bats ... -j $(nproc) test/system/
|| touch fail) to quote the substitution as "$(nproc)" so the -j argument
receives a single token.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository: openshift/coderabbit/.coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 0211d9b3-272f-49e6-b92d-6d17d0550637

📥 Commits

Reviewing files that changed from the base of the PR and between 53cc9e6 and 7998f3e.

📒 Files selected for processing (2)
  • test/extended/testdata/bindata.go
  • test/extended/testdata/node/nested_container/run_tests.sh

@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci bot commented Apr 16, 2026

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

@bitoku
Copy link
Copy Markdown
Contributor Author

bitoku commented Apr 16, 2026

/payload-aggregate periodic-ci-openshift-release-main-ci-4.22-e2e-gcp-ovn-usernamespace 10

@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci bot commented Apr 16, 2026

@bitoku: trigger 1 job(s) for the /payload-(with-prs|job|aggregate|job-with-prs|aggregate-with-prs) command

  • periodic-ci-openshift-release-main-ci-4.22-e2e-gcp-ovn-usernamespace

See details on https://pr-payload-tests.ci.openshift.org/runs/ci/0f0a3590-3945-11f1-85f0-4a1fbecf30a8-0

@bitoku
Copy link
Copy Markdown
Contributor Author

bitoku commented Apr 16, 2026

/payload-aggregate periodic-ci-openshift-release-main-ci-4.22-e2e-gcp-ovn-usernamespace 10

@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci bot commented Apr 16, 2026

@bitoku: trigger 1 job(s) for the /payload-(with-prs|job|aggregate|job-with-prs|aggregate-with-prs) command

  • periodic-ci-openshift-release-main-ci-4.22-e2e-gcp-ovn-usernamespace

See details on https://pr-payload-tests.ci.openshift.org/runs/ci/59c63850-396c-11f1-8cd8-dd74cf8bc276-0

@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

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

Labels

jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. 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