Skip to content

Conversation

@jiridanek
Copy link
Member

@jiridanek jiridanek commented Nov 6, 2025

Carrying on with

Description

Reformat inline bash commands into HEREDOC blocks, so they can be later extracted to separate script files.

How Has This Been Tested?

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
    • Improved Docker build process reliability for Jupyter environments by enhancing error handling and readability in build steps.

… commands with bash for improved readability and error handling (opendatahub-io#2646)
@openshift-ci openshift-ci bot added the size/m label Nov 6, 2025
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 6, 2025

Walkthrough

Refactors two multi-line RUN blocks in the CUDA Dockerfile into heredoc syntax with bash error handling (set -Eeuxo pipefail). Reorganizes OS package installation and Python dependency setup steps while preserving command sequences and functionality.

Changes

Cohort / File(s) Summary
Dockerfile refactoring
jupyter/minimal/ubi9-python-3.12/Dockerfile.cuda
Converts RUN blocks to heredoc syntax with enhanced error handling; wraps OS package installation (dnf install, cleanup) and Python dependency setup (uv pip install, JupyterLab config, permissions) in /bin/bash heredocs with set -Eeuxo pipefail for explicit error tracing

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

  • Straightforward syntax refactoring with no logic changes
  • Commands and execution order preserved, only structural reorganization
  • Addition of set -Eeuxo pipefail is a Docker best practice with minimal risk
  • Single file scope limits review surface area

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Description check ⚠️ Warning The description covers the main objective and provides context via related PRs, but the 'How Has This Been Tested?' section and all merge criteria checkboxes remain unchecked, indicating incomplete testing documentation. Complete the testing section with specific test commands and results, and check off the merge criteria boxes once verified. At minimum, document that make test was run and that changes were manually verified.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the main refactoring work: wrapping RUN commands with bash heredocs in a specific Dockerfile to improve readability and error handling.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 7c7e9a7 and 1bd045b.

📒 Files selected for processing (1)
  • jupyter/minimal/ubi9-python-3.12/Dockerfile.cuda (2 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (8)
  • GitHub Check: build (rocm-jupyter-minimal-ubi9-python-3.12, 3.12, linux/amd64, false) / build
  • GitHub Check: build (cuda-jupyter-minimal-ubi9-python-3.12, 3.12, linux/arm64, false) / build
  • GitHub Check: build (jupyter-minimal-ubi9-python-3.12, 3.12, linux/amd64, false) / build
  • GitHub Check: build (cuda-jupyter-minimal-ubi9-python-3.12, 3.12, linux/amd64, false) / build
  • GitHub Check: build (jupyter-minimal-ubi9-python-3.12, 3.12, linux/s390x, false) / build
  • GitHub Check: build (jupyter-minimal-ubi9-python-3.12, 3.12, linux/ppc64le, false) / build
  • GitHub Check: Red Hat Konflux / odh-workbench-jupyter-minimal-cuda-py312-ubi9-on-pull-request
  • GitHub Check: code-static-analysis
🔇 Additional comments (2)
jupyter/minimal/ubi9-python-3.12/Dockerfile.cuda (2)

39-44: Heredoc refactoring is syntactically correct; minor consistency note on dnf flags.

The refactored heredoc syntax is proper and commands are preserved. However, line 42 uses dnf clean all without the -y flag, while line 33 uses dnf clean all -y. Verify this inconsistency is intentional (dnf clean typically doesn't prompt, but flags should be consistent for clarity).


99-116: Verify strict error handling under set -Eeuxo pipefail doesn't introduce build failures.

The heredoc refactoring is syntactically sound and preserves the command sequence. However, the introduction of set -e enforces stricter error handling than implied by the original && chaining. Several commands require verification:

  • Line 106 (jupyter labextension disable): Will fail the entire build if the extension is not installed. Verify this command is designed to succeed silently or fail fatally as intended.
  • Line 113 (fix-permissions): Must exist in the base image; build will fail if unavailable.
  • Line 115 (/opt/app-root/bin/utils/addons/apply.sh): Any error will now halt the build. Verify this script is designed for fatal-error semantics.

Test locally to confirm no new build failures are introduced by the stricter error handling.


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.

@github-actions github-actions bot added the review-requested GitHub Bot creates notification on #pr-review-ai-ide-team slack channel label Nov 6, 2025
@openshift-ci openshift-ci bot requested review from daniellutz and dibryant November 6, 2025 12:36
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Nov 6, 2025

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: ide-developer
Once this PR has been reviewed and has the lgtm label, please assign caponetto 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

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Nov 6, 2025

@jiridanek: The following tests 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/notebook-jupyter-ubi9-python-3-12-pr-image-mirror 1bd045b link true /test notebook-jupyter-ubi9-python-3-12-pr-image-mirror
ci/prow/notebook-rocm-jupyter-ubi9-python-3-12-pr-image-mirror 1bd045b link true /test notebook-rocm-jupyter-ubi9-python-3-12-pr-image-mirror
ci/prow/notebook-cuda-jupyter-ubi9-python-3-12-pr-image-mirror 1bd045b link true /test notebook-cuda-jupyter-ubi9-python-3-12-pr-image-mirror
ci/prow/images 1bd045b link true /test images
ci/prow/notebooks-py312-ubi9-e2e-tests 1bd045b link true /test notebooks-py312-ubi9-e2e-tests

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.

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/m

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants