Add new container file for eol-checker so we do not use daily-tests#231
Conversation
Signed-off-by: Petr "Stone" Hracek <phracek@redhat.com>
|
Warning Review limit reached
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 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 configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThis 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. ChangesCore Logging and Reporting Changes
Container Image Build and Distribution
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Suggested labels
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
Signed-off-by: Petr "Stone" Hracek <phracek@redhat.com>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ 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
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
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
📒 Files selected for processing (5)
.github/workflows/build-and-push.ymlDockerfile.eol-checkerMakefileeol-checker/eol-checkereol-checker/eol_checker/checker.py
Signed-off-by: Petr "Stone" Hracek <phracek@redhat.com>
74b462e to
f1ac3ad
Compare
Summary by CodeRabbit
New Features
0.10.2and published to the container registry.Refactor