Skip to content

OCPBUGS-84344: yum.conf: omit docs, weak deps#231

Open
sdodson wants to merge 1 commit intoopenshift:masterfrom
sdodson:omit-docs
Open

OCPBUGS-84344: yum.conf: omit docs, weak deps#231
sdodson wants to merge 1 commit intoopenshift:masterfrom
sdodson:omit-docs

Conversation

@sdodson
Copy link
Copy Markdown
Member

@sdodson sdodson commented Apr 25, 2026

Example, machine-config-operator has 1786 files that are listed as docs and only 670 of those come from the true base image.

~ podman run -it --entrypoint /usr/bin/rpm registry.redhat.io/rhel9-6-els/rhel-minimal -qad | wc -l
670
~ podman run -it --entrypoint /usr/bin/rpm `oc adm release info 4.22.0-rc.0 --image-for machine-config-operator` -qad | wc -l
1786

Summary by CodeRabbit

  • Chores
    • Optimized container builds to omit package documentation, producing smaller images and faster deployments.
    • Disabled installation of weak/optional package dependencies to further reduce image size and unnecessary packages.
    • Preserved existing package selection and cleanup behavior while applying these build-time optimizations.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 25, 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: Enterprise

Run ID: 2393b2a0-de80-4469-b0be-deb4d6b48b15

📥 Commits

Reviewing files that changed from the base of the PR and between 046017a and f7d063d.

📒 Files selected for processing (5)
  • base/Dockerfile
  • base/Dockerfile.centos7
  • base/Dockerfile.rhel
  • base/Dockerfile.rhel7
  • base/Dockerfile.rhel9
✅ Files skipped from review due to trivial changes (3)
  • base/Dockerfile
  • base/Dockerfile.centos7
  • base/Dockerfile.rhel7

Walkthrough

Appends YUM/DNF configuration lines to /etc/yum.conf in multiple base Dockerfiles: tsflags=nodocs added across all modified files; install_weak_deps=0 added in several RHEL/CentOS variants. One RHEL Dockerfile also removes inline per-command --setopt options in favor of the global config.

Changes

Cohort / File(s) Summary
Base Dockerfiles
base/Dockerfile, base/Dockerfile.centos7, base/Dockerfile.rhel, base/Dockerfile.rhel7, base/Dockerfile.rhel9
Writes tsflags=nodocs into /etc/yum.conf in each Dockerfile. Also writes install_weak_deps=0 in RHEL/CentOS variants (base/Dockerfile, base/Dockerfile.rhel, base/Dockerfile.rhel7). base/Dockerfile.rhel removes inline --setopt flags and uses the global yum config for those settings.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

🚥 Pre-merge checks | ✅ 12
✅ Passed checks (12 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'OCPBUGS-84344: yum.conf: omit docs, weak deps' accurately and concisely summarizes the main changes: configuring yum to omit documentation and weak dependencies across multiple Dockerfiles to reduce image size.
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.
Stable And Deterministic Test Names ✅ Passed This PR modifies only Dockerfile files in the base/ directory. The custom check targets Ginkgo test definitions in Go test files, which are not present in this PR.
Test Structure And Quality ✅ Passed Test files use standard Go testing package, not Ginkgo framework, so custom check designed for Ginkgo tests is not applicable.
Microshift Test Compatibility ✅ Passed The custom check for MicroShift Test Compatibility is not applicable to this PR as it only modifies Docker build configuration files without adding, modifying, or removing any Ginkgo e2e tests.
Single Node Openshift (Sno) Test Compatibility ✅ Passed PR contains only Docker image build configuration changes; no Ginkgo e2e tests added.
Topology-Aware Scheduling Compatibility ✅ Passed PR modifies only Dockerfiles for build optimization, not deployment manifests, operator code, or controllers where topology-aware scheduling is relevant.
Ote Binary Stdout Contract ✅ Passed PR modifies only Dockerfile configuration files for container image optimization and does not change any Go source code. Existing Go code complies with OTE Binary Stdout Contract.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed This custom check is not applicable to the provided pull request. The check specifically targets new Ginkgo e2e tests (Go testing code with It(), Describe(), Context(), etc.), but this PR only modifies Docker build configuration files (base/Dockerfile variants) to add YUM package manager settings for reducing image size. The repository search confirms no Go test files are present or modified in this PR, so the IPv6 and disconnected network compatibility requirements do not apply.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

@sdodson sdodson changed the title yum.conf: omit docs and tests OCPBUGS-84344: yum.conf: omit docs and tests Apr 25, 2026
@openshift-ci openshift-ci Bot requested review from csrwng and jupierce April 25, 2026 03:06
@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented Apr 25, 2026

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: sdodson

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 25, 2026
@openshift-ci-robot openshift-ci-robot added jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. labels Apr 25, 2026
@openshift-ci-robot
Copy link
Copy Markdown
Contributor

@sdodson: This pull request references Jira Issue OCPBUGS-84344, which is valid. The bug has been moved to the POST state.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (5.0.0) matches configured target version for branch (5.0.0)
  • bug is in the state New, which is one of the valid states (NEW, ASSIGNED, POST)

The bug has been updated to refer to the pull request using the external bug tracker.

Details

In response to this:

Example, machine-config-operator has 1786 files that are listed as docs and only 670 of those come from the true base image.

~ podman run -it --entrypoint /usr/bin/rpm registry.redhat.io/rhel9-6-els/rhel-minimal -qad | wc -l
670
~ podman run -it --entrypoint /usr/bin/rpm `oc adm release info 4.22.0-rc.0 --image-for machine-config-operator` -qad | wc -l
1786

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
Copy link
Copy Markdown
Contributor

@sdodson: This pull request references Jira Issue OCPBUGS-84344, which is valid.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (5.0.0) matches configured target version for branch (5.0.0)
  • bug is in the state POST, which is one of the valid states (NEW, ASSIGNED, POST)
Details

In response to this:

Example, machine-config-operator has 1786 files that are listed as docs and only 670 of those come from the true base image.

~ podman run -it --entrypoint /usr/bin/rpm registry.redhat.io/rhel9-6-els/rhel-minimal -qad | wc -l
670
~ podman run -it --entrypoint /usr/bin/rpm `oc adm release info 4.22.0-rc.0 --image-for machine-config-operator` -qad | wc -l
1786

Summary by CodeRabbit

  • Chores
  • Optimized Docker image build configuration to exclude non-essential package components, resulting in a smaller, more efficient image.

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.

Copy link
Copy Markdown

@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: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@base/Dockerfile`:
- Line 16: The tsflags line in the Dockerfile currently appends
"tsflags=nodocs,test" which sets RPM to dry-run mode; remove the "test" flag so
packages actually install by changing the echo that writes "tsflags=nodocs,test"
>> /etc/yum.conf to only write "tsflags=nodocs" (i.e., update the echo statement
that contains 'tsflags=nodocs,test' so it no longer includes 'test').
🪄 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: Repository: openshift/coderabbit/.coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 36140874-a132-40b3-a880-7cf42e22ae0f

📥 Commits

Reviewing files that changed from the base of the PR and between edb8b1e and dd9f65d.

📒 Files selected for processing (1)
  • base/Dockerfile

Comment thread base/Dockerfile Outdated
@sdodson sdodson changed the title OCPBUGS-84344: yum.conf: omit docs and tests OCPBUGS-84344: yum.conf: omit docs Apr 25, 2026
@openshift-ci-robot
Copy link
Copy Markdown
Contributor

@sdodson: This pull request references Jira Issue OCPBUGS-84344, which is valid.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (5.0.0) matches configured target version for branch (5.0.0)
  • bug is in the state POST, which is one of the valid states (NEW, ASSIGNED, POST)

The bug has been updated to refer to the pull request using the external bug tracker.

Details

In response to this:

Example, machine-config-operator has 1786 files that are listed as docs and only 670 of those come from the true base image.

~ podman run -it --entrypoint /usr/bin/rpm registry.redhat.io/rhel9-6-els/rhel-minimal -qad | wc -l
670
~ podman run -it --entrypoint /usr/bin/rpm `oc adm release info 4.22.0-rc.0 --image-for machine-config-operator` -qad | wc -l
1786

Summary by CodeRabbit

  • Chores
  • Optimized container build to exclude non-essential package documentation, producing a smaller, leaner image and improved deployment efficiency.

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.

@sdodson sdodson changed the title OCPBUGS-84344: yum.conf: omit docs OCPBUGS-84344: yum.conf: omit docs, weak deps Apr 25, 2026
@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented Apr 25, 2026

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

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-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. 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