Skip to content

NO-JIRA: Fix PodSecurityViolation in set-liveness-probe cmd test#30809

Merged
openshift-merge-bot[bot] merged 1 commit intoopenshift:mainfrom
ardaguclu:fix-cmd-set-liveness-probe
Feb 26, 2026
Merged

NO-JIRA: Fix PodSecurityViolation in set-liveness-probe cmd test#30809
openshift-merge-bot[bot] merged 1 commit intoopenshift:mainfrom
ardaguclu:fix-cmd-set-liveness-probe

Conversation

@ardaguclu
Copy link
Member

@ardaguclu ardaguclu commented Feb 25, 2026

e2e-agnostic-ovn-cmd job is failing due to the PodSecurityViolation error in cmd-set-liveness-probe test https://prow.ci.openshift.org/view/gs/test-platform-results/pr-logs/pull/openshift_oc/2197/pull-ci-openshift-oc-main-e2e-agnostic-ovn-cmd/2026519491961163776

Overall: https://search.dptools.openshift.org/?search=cmd-set-liveness-probe&maxAge=48h&context=1&type=bug%2Bissue%2Bjunit&name=&excludeName=&maxMatches=5&maxBytes=20971520&groupBy=job

This PR updates the probe value to something else to prevent the violation.

Summary by CodeRabbit

  • Tests
    • Updated embedded test data and resources
    • Updated liveness probe test expectations to use localhost configuration

@openshift-ci-robot
Copy link

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-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Feb 25, 2026
@openshift-ci-robot
Copy link

@ardaguclu: This pull request explicitly references no jira issue.

Details

In response to this:

e2e-agnostic-ovn-cmd job is failing due to the PodSecurityViolation error in cmd-set-liveness-probe test https://prow.ci.openshift.org/view/gs/test-platform-results/pr-logs/pull/openshift_oc/2197/pull-ci-openshift-oc-main-e2e-agnostic-ovn-cmd/2026519491961163776

Overall: https://search.dptools.openshift.org/?search=cmd-set-liveness-probe&maxAge=48h&context=1&type=bug%2Bissue%2Bjunit&name=&excludeName=&maxMatches=5&maxBytes=20971520&groupBy=job

This PR updates the probe value to something else to prevent the violation.

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.

@tchap
Copy link
Contributor

tchap commented Feb 25, 2026

/lgtm

@openshift-ci openshift-ci bot requested review from knobunc and sjenning February 25, 2026 10:09
@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Feb 25, 2026
@coderabbitai
Copy link

coderabbitai bot commented Feb 25, 2026

Walkthrough

Test files are updated: bindata.go's embedded test resources are regenerated with updated JSON/YAML/HTML content, and set-liveness-probe.sh test expectations are modified to use localhost:8081 instead of google.com:80 for probe URL validation.

Changes

Cohort / File(s) Summary
Test Data Assets
test/extended/testdata/bindata.go
Auto-generated file with updated embedded resource contents (JSON, YAML, HTML). Asset functions and structure remain unchanged; only string constant values are replaced.
Test Fixtures
test/extended/testdata/cmd/test/cmd/set-liveness-probe.sh
Test script expectations updated to validate localhost URL (http://:8081/) instead of external host (google.com:80) for liveness probe verification scenarios.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Test Structure And Quality ❓ Inconclusive The specific test files mentioned in the PR summary could not be located in the repository to assess their quality against custom check requirements. Provide access to the actual test files (set-liveness-probe.sh and bindata.go) and their corresponding Go test code to verify test quality metrics including setup/cleanup patterns, assertion messages, and consistency with codebase patterns.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly identifies the specific issue being fixed (PodSecurityViolation) and the targeted test (set-liveness-probe cmd test), accurately reflecting the main changes.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Stable And Deterministic Test Names ✅ Passed Modified files contain no test name definitions with dynamic information. Changes are to test data and helper scripts only.

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

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 golangci-lint (2.5.0)

Error: can't load config: unsupported version of the configuration: "" See https://golangci-lint.run/docs/product/migration-guide for migration instructions
The command is terminated due to an error: can't load config: unsupported version of the configuration: "" See https://golangci-lint.run/docs/product/migration-guide for migration instructions


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

Copy link

@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/bindata.go (1)

34255-34261: Optional: add a short rationale comment in the source fixture (not bindata).

Because this is generated content, please document in test/extended/testdata/cmd/test/cmd/set-liveness-probe.sh that the empty host in http://:8081/ is intentional for PodSecurity compliance, to prevent accidental regressions on regeneration.

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

In `@test/extended/testdata/bindata.go` around lines 34255 - 34261, Add a short
rationale comment in the source test fixture file that produced this generated
bindata (test/extended/testdata/cmd/test/cmd/set-liveness-probe.sh) explaining
that the empty host in the URL literal "http://:8081/" is intentional for
PodSecurity compliance; locate the invocation that uses --get-url=http://:8081/
(the test case around setting liveness probe / the shell command invoking oc set
probe) and add a one-line comment immediately above it stating the reason so the
intent is preserved in the source (not in the generated bindata.go) to prevent
accidental removal on regeneration.
🤖 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/bindata.go`:
- Around line 34255-34261: Add a short rationale comment in the source test
fixture file that produced this generated bindata
(test/extended/testdata/cmd/test/cmd/set-liveness-probe.sh) explaining that the
empty host in the URL literal "http://:8081/" is intentional for PodSecurity
compliance; locate the invocation that uses --get-url=http://:8081/ (the test
case around setting liveness probe / the shell command invoking oc set probe)
and add a one-line comment immediately above it stating the reason so the intent
is preserved in the source (not in the generated bindata.go) to prevent
accidental removal on regeneration.

ℹ️ Review info

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

Review profile: CHILL

Plan: Pro

Cache: Disabled due to data retention organization setting

Knowledge base: Disabled due to data retention organization setting

📥 Commits

Reviewing files that changed from the base of the PR and between 4939f12 and 5f1d24e.

📒 Files selected for processing (2)
  • test/extended/testdata/bindata.go
  • test/extended/testdata/cmd/test/cmd/set-liveness-probe.sh

@openshift-ci-robot
Copy link

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

@ardaguclu
Copy link
Member Author

/test e2e-agnostic-ovn-cmd

@ardaguclu
Copy link
Member Author

e2e-agnostic-ovn-cmd failed due to unrelated failures.

The tests that this PR tries to fix has passed;

: [sig-cli][Feature:LegacyCommandTests][Disruptive][Serial] test-cmd: test/cmd/set-liveness-probe.sh [apigroup:image.openshift.io]

: [Monitor:audit-log-analyzer] [bz-apiserver-auth][invariant] audit analysis PodSecurityViolation

@ardaguclu
Copy link
Member Author

/test e2e-agnostic-ovn-cmd

@ardaguclu
Copy link
Member Author

/retest-required

@neisw
Copy link
Contributor

neisw commented Feb 25, 2026

/approve

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Feb 25, 2026

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ardaguclu, neisw, tchap

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 Feb 25, 2026
@ardaguclu
Copy link
Member Author

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

@ardaguclu: This PR has been marked as verified by CI.

Details

In response to this:

/verified by CI
https://prow.ci.openshift.org/view/gs/test-platform-results/pr-logs/pull/30809/pull-ci-openshift-origin-main-e2e-agnostic-ovn-cmd/2026639551543382016

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.

@ardaguclu
Copy link
Member Author

/retest-required

@ardaguclu
Copy link
Member Author

/retest

@gangwgr
Copy link
Contributor

gangwgr commented Feb 26, 2026

/test e2e-metal-ipi-ovn-ipv6

@openshift-trt
Copy link

openshift-trt bot commented Feb 26, 2026

Job Failure Risk Analysis for sha: 5f1d24e

Job Name Failure Risk
pull-ci-openshift-origin-main-e2e-metal-ipi-ovn-ipv6 IncompleteTests
Tests for this run (25) are below the historical average (2459): IncompleteTests (not enough tests ran to make a reasonable risk analysis; this could be due to infra, installation, or upgrade problems)

@ardaguclu
Copy link
Member Author

/retest

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Feb 26, 2026

@ardaguclu: 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 7563f3d into openshift:main Feb 26, 2026
22 checks passed
@ardaguclu ardaguclu deleted the fix-cmd-set-liveness-probe branch February 27, 2026 04:05
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. 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