Skip to content

TRT-2084: terminationmessagepolicy: correctly fail on violations#30993

Open
sosiouxme wants to merge 2 commits intoopenshift:mainfrom
sosiouxme:20260409-TRT-2084-terminationMessage-checker
Open

TRT-2084: terminationmessagepolicy: correctly fail on violations#30993
sosiouxme wants to merge 2 commits intoopenshift:mainfrom
sosiouxme:20260409-TRT-2084-terminationMessage-checker

Conversation

@sosiouxme
Copy link
Copy Markdown
Member

@sosiouxme sosiouxme commented Apr 9, 2026

Correct a bug in this monitor that allowed policy violations to flake since all releases were considered "old" until 5.0.

And then add exemptions for all the things that crept in because they only counted as flakes, so they can be corrected when able.

Summary by CodeRabbit

  • Bug Fixes & Refactor
    • Improved version detection logic with more precise matching for identifying specific versions.
    • Expanded monitoring exceptions for cluster namespaces to reduce false-positive violation reports.

@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/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Apr 9, 2026
@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci bot commented Apr 9, 2026

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 9, 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: bbb76726-50d1-408c-8a61-b247d6c996a5

📥 Commits

Reviewing files that changed from the base of the PR and between d381637 and 4930e58.

📒 Files selected for processing (1)
  • pkg/monitortests/clusterversionoperator/terminationmessagepolicy/monitortest.go
🚧 Files skipped from review as they are similar to previous changes (1)
  • pkg/monitortests/clusterversionoperator/terminationmessagepolicy/monitortest.go

Walkthrough

Removed a temporary "5.0" unfixed-version entry, switched older-version detection from substring checks to regex whole-token matching (with fallback behavior on compile failure), adjusted hasOldVersion logic accordingly, and expanded grandfathered existingViolations to include multiple openshift-* namespaces plus an openshift-multus exception.

Changes

Cohort / File(s) Summary
Termination Message Policy Monitor
pkg/monitortests/clusterversionoperator/terminationmessagepolicy/monitortest.go
Removed hardcoded "5.0" from unfixedVersions; replaced strings.Contains checks with compiled regexes using word-boundary whole-token matching; set hasOldVersion when regex compilation fails or when the regex matches history.Version; expanded existingViolations to add multiple openshift-* namespace exceptions and an openshift-multus exception for pods/dhcp-daemon.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~40 minutes


Important

Pre-merge checks failed

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

❌ Failed checks (1 warning, 2 inconclusive)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Test Structure And Quality ❓ Inconclusive The file specified in the PR summary (pkg/monitortests/clusterversionoperator/terminationmessagepolicy/monitortest.go) could not be located in the repository. Verify the correct repository, branch, and file path are accessible so that Ginkgo test code quality can be evaluated against the specified criteria.
Ote Binary Stdout Contract ❓ Inconclusive Unable to access the modified file to verify for stdout writes in process-level code. File access required to examine init() function and process-level code for fmt/klog/os.Stdout operations.
✅ Passed checks (7 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title directly relates to the main objective: fixing a bug in terminationmessagepolicy that incorrectly failed on violations.
Stable And Deterministic Test Names ✅ Passed PR modifies monitor test implementation logic, not Ginkgo test specifications. No test names are introduced or modified.
Microshift Test Compatibility ✅ Passed Pull request modifies a monitor test implementation file with no new Ginkgo e2e test declarations, therefore MicroShift Test Compatibility check is not applicable.
Single Node Openshift (Sno) Test Compatibility ✅ Passed The modified file is a monitoring test framework implementation, not an e2e test suite, containing no Ginkgo test patterns and making no changes that add new e2e tests.
Topology-Aware Scheduling Compatibility ✅ Passed PR modifies only monitor test code validating terminationMessagePolicy; does not introduce deployment manifests, operator code, or scheduling constraints affecting cluster topologies.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed The pull request modifies a monitor test file but does not add any new Ginkgo e2e tests, so the IPv4/connectivity check is not applicable.
✨ 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 9, 2026

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: sosiouxme

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 9, 2026
@sosiouxme
Copy link
Copy Markdown
Member Author

/payload-job periodic-ci-openshift-release-main-nightly-5.0-e2e-aws-csi
/payload-job periodic-ci-openshift-release-main-nightly-4.22-e2e-aws-csi
/payload-job periodic-ci-openshift-release-main-nightly-4.19-e2e-aws-csi

@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci bot commented Apr 9, 2026

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

  • periodic-ci-openshift-release-main-nightly-5.0-e2e-aws-csi
  • periodic-ci-openshift-release-main-nightly-4.22-e2e-aws-csi
  • periodic-ci-openshift-release-main-nightly-4.19-e2e-aws-csi

See details on https://pr-payload-tests.ci.openshift.org/runs/ci/4f1c41c0-3461-11f1-8ec6-3f26cee3bd17-0

@sosiouxme
Copy link
Copy Markdown
Member Author

/payload-job periodic-ci-openshift-release-main-nightly-4.22-e2e-rosa-hcp-ovn

@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci bot commented Apr 10, 2026

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

  • periodic-ci-openshift-release-main-nightly-4.22-e2e-rosa-hcp-ovn

See details on https://pr-payload-tests.ci.openshift.org/runs/ci/1ebda420-34f6-11f1-888e-44f9bcdaa466-0

@sosiouxme
Copy link
Copy Markdown
Member Author

relatively quick job with one common violation openshift-insights:
/payload-job periodic-ci-openshift-csi-operator-release-4.22-periodics-periodic-e2e-azure-file-csi
a bit longer with disparate violations:
/payload-job periodic-ci-openshift-release-main-nightly-4.22-e2e-aws-single-node-disruptive-longrunning-techpreview-2of2
longer still with 4 including cnv and frr
/payload-job periodic-ci-openshift-ovn-kubernetes-release-4.22-periodics-e2e-metal-ipi-ovn-bgp-virt-ipv4-techpreview

@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci bot commented Apr 10, 2026

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

  • periodic-ci-openshift-csi-operator-release-4.22-periodics-periodic-e2e-azure-file-csi
  • periodic-ci-openshift-release-main-nightly-4.22-e2e-aws-single-node-disruptive-longrunning-techpreview-2of2
  • periodic-ci-openshift-ovn-kubernetes-release-4.22-periodics-e2e-metal-ipi-ovn-bgp-virt-ipv4-techpreview

See details on https://pr-payload-tests.ci.openshift.org/runs/ci/70e21f20-3527-11f1-8767-1aff209ce180-0

@sosiouxme
Copy link
Copy Markdown
Member Author

Trigger the same jobs but with the exemptions added.
/payload-job periodic-ci-openshift-csi-operator-release-4.22-periodics-periodic-e2e-azure-file-csi
/payload-job periodic-ci-openshift-release-main-nightly-4.22-e2e-aws-single-node-disruptive-longrunning-techpreview-2of2
/payload-job periodic-ci-openshift-ovn-kubernetes-release-4.22-periodics-e2e-metal-ipi-ovn-bgp-virt-ipv4-techpreview

@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci bot commented Apr 10, 2026

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

  • periodic-ci-openshift-csi-operator-release-4.22-periodics-periodic-e2e-azure-file-csi
  • periodic-ci-openshift-release-main-nightly-4.22-e2e-aws-single-node-disruptive-longrunning-techpreview-2of2
  • periodic-ci-openshift-ovn-kubernetes-release-4.22-periodics-e2e-metal-ipi-ovn-bgp-virt-ipv4-techpreview

See details on https://pr-payload-tests.ci.openshift.org/runs/ci/0439ee40-352a-11f1-8e7c-d36a2f481082-0

@sosiouxme sosiouxme changed the title terminationmessagepolicy: correctly fail on violations TRT-2084: terminationmessagepolicy: correctly fail on violations Apr 13, 2026
@openshift-ci-robot
Copy link
Copy Markdown

openshift-ci-robot commented Apr 13, 2026

@sosiouxme: This pull request references TRT-2084 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 bug to target the "4.22.0" version, but no target version was set.

Details

In response to this:

Correct a bug in this monitor that allowed policy violations to flake since all releases were considered "old" until 5.0.

And then add exemptions for all the things that crept in because they only counted as flakes, so they can be corrected when able.

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 openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Apr 13, 2026
@sosiouxme sosiouxme marked this pull request as ready for review April 13, 2026 03:19
@openshift-ci openshift-ci bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Apr 13, 2026
@openshift-ci openshift-ci bot requested review from deads2k and p0lyn0mial April 13, 2026 03:19
@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

These have crept in while the test was erroneously allowed to flake.
See https://redhat.atlassian.net/browse/TRT-2084
We will continue to flake them while working to eradicate them.
Meanwhile, new ones should be hard failures.
@sosiouxme sosiouxme force-pushed the 20260409-TRT-2084-terminationMessage-checker branch from d381637 to 4930e58 Compare April 14, 2026 20:32
@openshift-ci-robot
Copy link
Copy Markdown

openshift-ci-robot commented Apr 14, 2026

@sosiouxme: This pull request references TRT-2084 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 bug to target either version "5.0." or "openshift-5.0.", but it targets "4.22" instead.

Details

In response to this:

Correct a bug in this monitor that allowed policy violations to flake since all releases were considered "old" until 5.0.

And then add exemptions for all the things that crept in because they only counted as flakes, so they can be corrected when able.

Summary by CodeRabbit

  • Bug Fixes & Refactor
  • Improved version detection logic with more precise matching for identifying specific versions.
  • Expanded monitoring exceptions for cluster namespaces to reduce false-positive violation reports.

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

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

@sosiouxme
Copy link
Copy Markdown
Member Author

/retest-required

@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci bot commented Apr 15, 2026

@sosiouxme: 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-vsphere-ovn 4930e58 link true /test e2e-vsphere-ovn
ci/prow/e2e-aws-ovn-fips 4930e58 link true /test e2e-aws-ovn-fips
ci/prow/e2e-vsphere-ovn-upi 4930e58 link true /test e2e-vsphere-ovn-upi
ci/prow/e2e-gcp-ovn 4930e58 link true /test e2e-gcp-ovn
ci/prow/e2e-metal-ipi-ovn-ipv6 4930e58 link true /test e2e-metal-ipi-ovn-ipv6

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