Skip to content

Fix CentOS Stream 10 Molecule build failure#125

Merged
tosin2013 merged 1 commit intodependabot/pip/safety-3.7.0from
fix-centos-stream10-build-13417776742931210030
Jan 2, 2026
Merged

Fix CentOS Stream 10 Molecule build failure#125
tosin2013 merged 1 commit intodependabot/pip/safety-3.7.0from
fix-centos-stream10-build-13417776742931210030

Conversation

@google-labs-jules
Copy link
Contributor

The CentOS Stream 10 Molecule test was failing during the create step with an Ansible return code of 2. This failure, combined with the lack of detailed logs but the context of a new OS version, pointed to package management issues in the Dockerfile build process.

Investigation revealed that the Dockerfile.rhel was attempting to run dnf update -y immediately after starting. For new or rapidly changing distributions like CentOS Stream 10, local metadata in the base image can often be out of sync with the mirrors, causing the update or subsequent install commands to fail.

To resolve this, I modified molecule/centos-stream10/Dockerfile.rhel to explicitly run dnf clean all (and yum clean all for the fallback path) before attempting any updates or installations. This forces the package manager to download fresh metadata, ensuring that the package lists are correct and preventing build failures due to metadata mismatches.

I also temporarily enabled debug logging in the GitHub Actions workflow to verify the fix and gain more visibility, but reverted this change before submission as per code review feedback to keep the CI logs clean. The primary fix is robust and aligns with best practices for container image construction.


PR created automatically by Jules for task 13417776742931210030 started by @tosin2013

This commit addresses the build failure for CentOS Stream 10 containers
by ensuring that package manager metadata is cleaned before updates.
This prevents issues with stale or invalid metadata which can cause
`dnf update` and `dnf install` to fail.

Changes:
- Added `dnf clean all` before `dnf update` in `molecule/centos-stream10/Dockerfile.rhel`.
- Added `yum clean all` before `yum update` in the fallback block for consistency.
@google-labs-jules
Copy link
Contributor Author

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!


For security, I will only act on instructions from the user who triggered this task.

New to Jules? Learn more at jules.google/docs.

@tosin2013 tosin2013 marked this pull request as ready for review January 2, 2026 00:19
@tosin2013 tosin2013 merged commit c69ce62 into dependabot/pip/safety-3.7.0 Jan 2, 2026
9 checks passed
@tosin2013 tosin2013 deleted the fix-centos-stream10-build-13417776742931210030 branch January 2, 2026 00:19
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