Skip to content

Add new container file for eol-checker so we do not use daily-tests#231

Merged
phracek merged 3 commits into
sclorg:masterfrom
phracek:variables_based_on_configuration
May 28, 2026
Merged

Add new container file for eol-checker so we do not use daily-tests#231
phracek merged 3 commits into
sclorg:masterfrom
phracek:variables_based_on_configuration

Conversation

@phracek
Copy link
Copy Markdown
Member

@phracek phracek commented May 28, 2026

Summary by CodeRabbit

  • New Features

    • A new upstream EOL checker container image has been added to the automated build and push pipeline. The image is tagged as 0.10.2 and published to the container registry.
  • Refactor

    • Logging initialization and debug handling have been refactored for better control and configuration management across the application.

Review Change Stack

Signed-off-by: Petr "Stone" Hracek <phracek@redhat.com>
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 28, 2026

Warning

Review limit reached

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

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

Your organization has run out of usage credits. Purchase more in the billing tab.

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

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 835322f6-b7be-4184-b226-60258a340049

📥 Commits

Reviewing files that changed from the base of the PR and between d699cdf and f1ac3ad.

📒 Files selected for processing (2)
  • eol-checker/eol_checker/checker.py
  • eol-checker/tests/test_checker.py
📝 Walkthrough

Walkthrough

This PR refactors debug logging into the ContainerEolChecker class, improves report generation with Jira unavailability handling, and adds container image build infrastructure to package and distribute the eol-checker as a container image to Quay.

Changes

Core Logging and Reporting Changes

Layer / File(s) Summary
Logging Control Delegation
eol-checker/eol-checker, eol-checker/eol_checker/checker.py
Entry script removes setup_logger import and passes debug=args.debug to ContainerEolChecker constructor. Checker class accepts new debug parameter, adds _setup_logger method, and configures logging and send_email behavior from environment variables and constructor arguments.
Report Generation Improvements
eol-checker/eol_checker/checker.py
Summary report header formatting removes extra newline, adds Jira unavailability notice in summary_report when Jira connectivity is unavailable, and removes redundant send_email reassignment from environment variable inside send_emails method.

Container Image Build and Distribution

Layer / File(s) Summary
Dockerfile Configuration
Dockerfile.eol-checker
Adds Dockerfile based on Fedora 42 with Python 3.13, Git, OCI/Kubernetes labels, environment variables for versioning and paths, and installs dependencies via requirements.sh and pip. Copies repository into /root/ci-scripts, sets working directory to /home/eol-checker/eol-checker, and defines container entry point.
Build and Distribution Steps
Makefile, .github/workflows/build-and-push.yml
Makefile adds build_images target to build upstream-eol-checker:0.10.2 from Dockerfile.eol-checker. GitHub Actions workflow adds new build-and-push step to build, tag as 0.10.2, and push image to quay.io/sclorg using existing Quay credentials.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

  • sclorg/ci-scripts#229: Modifies ContainerEolChecker initialization and email-sending flow; this PR refactors constructor wiring around the debug parameter and logging configuration in the same class.

Suggested labels

ready for review

🐰 A logging shift and container birth,
Debug now lives where checker calls forth—
Reports speak clearer when Jira's away,
And Docker now packages our script's new day! 📦✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The pull request title accurately summarizes the main change: adding a new Dockerfile.eol-checker to create a dedicated container image for eol-checker instead of reusing the daily-tests container, as reflected in the new workflow step and Makefile target.
Docstring Coverage ✅ Passed Docstring coverage is 83.33% which is sufficient. The required threshold is 80.00%.
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

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.

Signed-off-by: Petr "Stone" Hracek <phracek@redhat.com>
@codecov
Copy link
Copy Markdown

codecov Bot commented May 28, 2026

Codecov Report

❌ Patch coverage is 92.85714% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 62.56%. Comparing base (c0b1fb9) to head (f1ac3ad).
⚠️ Report is 3 commits behind head on master.

Files with missing lines Patch % Lines
eol-checker/eol_checker/checker.py 92.85% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #231      +/-   ##
==========================================
+ Coverage   60.49%   62.56%   +2.07%     
==========================================
  Files          13       13              
  Lines        1339     1349      +10     
==========================================
+ Hits          810      844      +34     
+ Misses        529      505      -24     
Flag Coverage Δ
daily-tests-unit 44.26% <ø> (ø)
eol-checker-unit 97.37% <92.85%> (+7.28%) ⬆️
ocp-stream-generator-unit 84.47% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
eol-checker/eol_checker/checker.py 98.88% <92.85%> (-0.53%) ⬇️

... and 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Copy Markdown
Contributor

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

Actionable comments posted: 5

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/build-and-push.yml:
- Line 27: Replace the mutable tag reference "uses:
sclorg/build-and-push-action@v4" with the immutable commit SHA by updating the
action invocation to "uses:
sclorg/build-and-push-action@adf1dee2b786ccbb2e2a708c3510a90e2ab3392d" so the
workflow pins the exact commit; locate the "uses:
sclorg/build-and-push-action@v4" occurrence in the workflow and substitute the
tag with the provided SHA.

In `@Dockerfile.eol-checker`:
- Around line 24-29: The Dockerfile.eol-checker currently copies the repo into
/root/ci-scripts and leaves USER 900 commented out so the runtime UID 900 cannot
access /root-owned files; update Dockerfile.eol-checker to copy into the image
HOME (use "${HOME}/ci-scripts" instead of "/root/ci-scripts"), change CMD to
reference "${HOME}/ci-scripts/eol-checker/eol-checker", enable USER 900, and
ensure ownership is fixed by adding a chown for the copied directory (e.g.,
chown -R 900:0 "${HOME}/ci-scripts") or otherwise make "${HOME}/ci-scripts"
writable for UID 900 (the related change should align with the existing chown -R
900:0 "${HOME}" in requirements.sh).
- Line 21: The Dockerfile.eol-checker multi-source COPY currently uses COPY
requirements.sh requirements.txt "${WORK_DIR}" which fails because the
destination must be a directory when copying multiple sources; update the
destination to include a trailing slash (e.g., "${WORK_DIR}/") so Docker treats
it as a directory. While here, review runtime user changes: requirements.sh
creates user 900 but USER 900 is commented out—if you enable USER 900, also
update subsequent COPY . /root/ci-scripts and any CMD paths pointing to
/root/... to use the non-root user's workdir (or adjust paths accordingly) so
files are writable and the runtime paths match the chosen user.

In `@eol-checker/eol_checker/checker.py`:
- Around line 96-99: The logging level selection in _setup_logger is inverted:
the current block uses setup_logger(level=logging.DEBUG) when debug is False and
logging.INFO when debug is True; change the condition so that when the debug
parameter is True you call setup_logger(level=logging.DEBUG) and when False call
setup_logger(level=logging.INFO). Update the conditional in the function that
calls setup_logger (refer to the debug variable and the setup_logger(...) calls)
to swap the two log levels accordingly.
- Around line 72-80: Replace the current truthy-string checks that use
bool(os.getenv(...)) by parsing the environment values into real booleans (e.g.,
val = os.getenv("DEBUG", str(debug)); parsed = val.lower() in
("1","true","yes","on")), then set self.debug and self.send_email from those
parsed booleans and call self._setup_logger(debug=self.debug) (refer to the
constructor logic around the existing DEBUG/SEND_EMAIL handling and the
assignment to self.debug at line ~88). Also fix _setup_logger to map debug=True
-> logging.DEBUG and debug=False -> logging.INFO (update the _setup_logger
function to choose the correct logging level based on the boolean). Ensure all
references use the parsed boolean variables rather than bool(os.getenv(...)).
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: bab34f2c-2b0f-43a6-9a9b-a134f3fc1b7c

📥 Commits

Reviewing files that changed from the base of the PR and between c0b1fb9 and d699cdf.

📒 Files selected for processing (5)
  • .github/workflows/build-and-push.yml
  • Dockerfile.eol-checker
  • Makefile
  • eol-checker/eol-checker
  • eol-checker/eol_checker/checker.py

Comment thread .github/workflows/build-and-push.yml
Comment thread Dockerfile.eol-checker
Comment thread Dockerfile.eol-checker
Comment thread eol-checker/eol_checker/checker.py Outdated
Comment thread eol-checker/eol_checker/checker.py Outdated
Signed-off-by: Petr "Stone" Hracek <phracek@redhat.com>
@phracek phracek force-pushed the variables_based_on_configuration branch from 74b462e to f1ac3ad Compare May 28, 2026 14:25
@phracek phracek merged commit 4547ca0 into sclorg:master May 28, 2026
14 of 15 checks passed
@coderabbitai coderabbitai Bot mentioned this pull request May 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant