Skip to content

Add debug log output to redhat release policy test and remove unnec…#7

Merged
cuipinghuo merged 1 commit into
mainfrom
add-debug
Jun 18, 2026
Merged

Add debug log output to redhat release policy test and remove unnec…#7
cuipinghuo merged 1 commit into
mainfrom
add-debug

Conversation

@cuipinghuo

Copy link
Copy Markdown
Contributor

…essary RuleData override

The 'verifies redhat products pass the redhat policy rule collection
before release' test was missing the step-report-json container log
output that the other release policy test cases include. Add the same
GetContainerLogs/GinkgoWriter pattern for easier debugging on failure.

Also remove the restrict_cve_security_levels RuleData override since the
golden image has zero critical/high CVEs and the default policy settings
already allow it to pass without overriding.

@coderabbitai

coderabbitai Bot commented Jun 18, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@cuipinghuo, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 48 minutes and 25 seconds. Learn how PR review limits work.

Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file).

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits.

🚦 How do rate limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan refill rate.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, the refill rate gradually slows as usage increases. The highest same-day bursts are limited more strictly.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Enterprise

Run ID: 6df765fc-7bc1-4190-a697-5c4c581c3f4a

📥 Commits

Reviewing files that changed from the base of the PR and between 5bd7fab and f18a717.

📒 Files selected for processing (1)
  • tests/contract/contract.go
📝 Walkthrough

Walkthrough

In tests/contract/contract.go, the "Release Policy" test removes the RuleData JSON assignment (which previously restricted CVE security levels) from the ECP source exclusion setup. A new assertion is added after the non-FAILURE check: it fetches logs from the step-report-json container, prints them, and asserts the retrieval succeeded.

Changes

Release Policy Test Adjustments

Layer / File(s) Summary
Release Policy test: RuleData removal and log assertion
tests/contract/contract.go
Removes the RuleData JSON assignment from the ECP source exclusion config; after the non-FAILURE result assertion, retrieves logs from the step-report-json container, prints them via GinkgoWriter, and asserts no error.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main changes: adding debug log output and removing unnecessary RuleData override in a RedHat release policy test.
Description check ✅ Passed The description is directly related to the changeset, clearly explaining both modifications made to the test and their rationale.
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.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch add-debug

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

…ssary RuleData override

  The 'verifies redhat products pass the redhat policy rule collection
  before release' test was missing the step-report-json container log
  output that the other release policy test cases include. Add the same
  GetContainerLogs/GinkgoWriter pattern for easier debugging on failure.

  Also remove the restrict_cve_security_levels RuleData override since the
  golden image has zero critical/high CVEs and the default policy settings
  already allow it to pass without overriding.
@cuipinghuo

cuipinghuo commented Jun 18, 2026

Copy link
Copy Markdown
Contributor Author

Test pass:

 [19.425 seconds]
------------------------------

Ran 12 of 12 Specs in 442.213 seconds
SUCCESS! -- 12 Passed | 0 Failed | 0 Pending | 0 Skipped
PASS

Ginkgo ran 1 suite in 7m23.837485321s
Test Suite Passed

@simonbaird simonbaird left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Lgtm.

@cuipinghuo cuipinghuo merged commit f7b2b9e into main Jun 18, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants