Skip to content

Conversation

@jiridanek
Copy link
Member

@jiridanek jiridanek commented Nov 12, 2025

follows up on

https://issues.redhat.com/browse/RHAIENG-948

Description

we may have c9s, ubi9, as well as rhel9, either already subscribed or not; every case must be handled

when there is subscription-manager present, we need to then check if we are pre-subscribed or not, and if we are, we refresh the subscription

it is a mistake trying to run subscription-manger on c9s (binary not present) or when we are not pre-subscribed (refresh fails)

this should be the universal pattern applicable in odh-io as well as rhods

[2/3] STEP 6/10: RUN /bin/bash <<'EOF' (set -Eeuxo pipefail...)
+ dnf -y upgrade --refresh --nobest --skip-broken --nodocs --noplugins --setopt=install_weak_deps=0 --setopt=keepcache=0
Red Hat Enterprise Linux 9 for x86_64 - AppStre 6.5 kB/s | 473  B     00:00
Errors during downloading metadata for repository 'rhel-9-for-x86_64-appstream-eus-rpms':
  - Status code: 403 for https://cdn.redhat.com/content/eus/rhel9/9.6/x86_64/appstream/os/repodata/repomd.xml (IP: 23.60.144.251)
Error: Failed to download metadata for repo 'rhel-9-for-x86_64-appstream-eus-rpms': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried
Error: building at STEP "RUN /bin/bash <<'EOF'": while running runtime: exit status 1

How Has This Been Tested?

Tried this out first in

Self checklist (all need to be checked):

  • Ensure that you have run make test (gmake on macOS) before asking for review
  • Changes to everything except Dockerfile.konflux files should be done in odh/notebooks and automatically synced to rhds/notebooks. For Konflux-specific changes, modify Dockerfile.konflux files directly in rhds/notebooks as these require special attention in the downstream repository and flow to the upcoming RHOAI release.

Merge criteria:

  • The commits are squashed in a cohesive manner and have meaningful messages.
  • Testing instructions have been added in the PR body (for PRs involving changes that are not immediately obvious).
  • The developer has manually tested the changes and verified that the changes work

Summary by CodeRabbit

  • Chores
    • Updated CPU and CUDA Docker image builds with conditional subscription-manager checks that gracefully handle environments where the manager is unavailable or unregistered, improving build robustness across different deployment scenarios.

@github-actions github-actions bot added the review-requested GitHub Bot creates notification on #pr-review-ai-ide-team slack channel label Nov 12, 2025
@openshift-ci openshift-ci bot added the size/s label Nov 12, 2025
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 12, 2025

Walkthrough

Both CPU and CUDA variant Dockerfiles for RHEL9 Python 3.12 add conditional subscription-manager checks during base stage image build. If subscription-manager exists, identity and refresh commands execute; otherwise a fallback message outputs. Package upgrade steps remain unchanged.

Changes

Cohort / File(s) Summary
Conditional subscription-manager refresh
rstudio/rhel9-python-3.12/Dockerfile.cpu, rstudio/rhel9-python-3.12/Dockerfile.cuda
Adds RUN block in base stages that conditionally executes subscription-manager identity and refresh operations if the tool is available; outputs skip message if not registered or tool absent

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

  • Both changes follow an identical pattern applied consistently across two related Dockerfiles
  • Conditional shell logic is straightforward with no complex error handling or dependencies
  • Changes are isolated to build configuration with no impact on runtime behavior

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically describes the main change: adding a conditional subscription-manager refresh step to the RStudio Dockerfile configuration.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description check ✅ Passed The PR description provides comprehensive context with issue reference, problem statement, code block example, testing evidence, and self-checklist completion.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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.

@openshift-ci openshift-ci bot added size/s and removed size/s labels Nov 12, 2025
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Nov 12, 2025

@jiridanek: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/images 1270037 link true /test images

Full PR test history. Your PR dashboard.

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.

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Nov 12, 2025

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: ide-developer, ysok
Once this PR has been reviewed and has the lgtm label, please assign jiridanek for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

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

@jiridanek jiridanek merged commit b3c3835 into opendatahub-io:main Nov 12, 2025
15 of 17 checks passed
@jiridanek jiridanek deleted the jd_subscribe branch November 12, 2025 18:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lgtm review-requested GitHub Bot creates notification on #pr-review-ai-ide-team slack channel size/s

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants