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.

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

@bitoku
Copy link
Copy Markdown
Contributor Author

bitoku commented Apr 16, 2026

/retest

@bitoku
Copy link
Copy Markdown
Contributor Author

bitoku commented Apr 16, 2026

There's no way to confirm if it retries or not from junit files, but I confirmed the behavior in local.
Can you PTAL? @haircommander @cpmeadors

@haircommander
Copy link
Copy Markdown
Member

/lgtm
/verified by ci

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

@haircommander: This PR has been marked as verified by ci.

Details

In response to this:

/lgtm
/verified by ci

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 added the lgtm Indicates that a PR is ready to be merged. label Apr 16, 2026
@petr-muller
Copy link
Copy Markdown
Member

/approve

@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci bot commented Apr 16, 2026

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: bitoku, haircommander, petr-muller

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 Apr 16, 2026
@dgoodwin
Copy link
Copy Markdown
Contributor

/hold

I'm sorry but retries make the tests effectively pointless for anything but a permanent failure. This change would mean any of these tests could fail up to 66% of the time with 3 retries and we'd have absolutely no way to know, plus the leeway we give tests beyond that. This is far too dangerous for product quality and we've seen the single retry we give e2e's bite us hard in rare cases we were able to spot it.

@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 16, 2026
@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci bot commented Apr 16, 2026

@bitoku: The following test 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-vsphere-ovn-upi ebd16ea link true /test e2e-vsphere-ovn-upi

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

openshift-trt bot commented Apr 16, 2026

Job Failure Risk Analysis for sha: ebd16ea

Job Name Failure Risk
pull-ci-openshift-origin-main-e2e-vsphere-ovn-upi Low
[sig-instrumentation] Prometheus [apigroup:image.openshift.io] when installed on the cluster shouldn't report any alerts in firing state apart from Watchdog and AlertmanagerReceiversNotConfigured [Early][apigroup:config.openshift.io] [Suite:openshift/conformance/parallel]
This test has passed 0.00% of 14 runs on release 5.0 [Architecture:amd64 FeatureSet:default Installer:upi JobTier:standard Network:ovn NetworkStack:ipv4 OS:rhcos9 Owner:eng Platform:vsphere Procedure:none SecurityMode:default Topology:ha Upgrade:none] in the last week.

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. do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. 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. 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.

5 participants