Skip to content

[rhoai-2.25] RHAIENG-287: fix(Dockerfiles): wrap remaining RUN && chains in bash heredocs - #2485

Open
jiridanek wants to merge 3 commits into
rhoai-2.25from
fix/rhoai-2.25-run-heredoc-chains
Open

[rhoai-2.25] RHAIENG-287: fix(Dockerfiles): wrap remaining RUN && chains in bash heredocs#2485
jiridanek wants to merge 3 commits into
rhoai-2.25from
fix/rhoai-2.25-run-heredoc-chains

Conversation

@jiridanek

@jiridanek jiridanek commented Jul 10, 2026

Copy link
Copy Markdown
Member

Description

Follow-up to #2471. Converts remaining RUN ... && ... chains in 32 workbench Dockerfiles to RUN /bin/bash <<'EOF' blocks with set -Eeuxo pipefail, matching the pattern already applied to datascience images.

Scope: jupyter/, runtimes/, and codeserver/ workbench images (cpu/cuda/rocm + konflux pairs). Excludes rstudio/ (RHAIENG-2430) and datascience (done in #2471).

Conventions:

  • source preserved inside bash heredocs (not .) for gcc-toolset / profile.d scripts
  • Blank line after EOF before the next Dockerfile instruction (hadolint)
  • bash -c mount blocks expanded to multiline if/fi where applicable
  • ROCm images: removed stray \ on standalone # Fix permissions... comments

How Has This Been Tested?

  • hadolint --config ./ci/hadolint-config.yaml on all 52 workbench Dockerfiles (0 errors)

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

Made with Cursor

Summary by CodeRabbit

  • Bug Fixes
    • Improved container image build reliability with stricter error handling across CPU, CUDA, and ROCm variants.
    • OpenShift and MongoDB CLI downloads now provide clearer failure reporting.
    • Preserved existing package installation, cleanup, Python dependency, Jupyter configuration, and permissions behavior.
  • Chores
    • Streamlined image build steps for more consistent execution.
    • Removed an unused PDF builder stage.

@openshift-ci
openshift-ci Bot requested review from atheo89 and dibryant July 10, 2026 06:32
@coderabbitai

coderabbitai Bot commented Jul 10, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: c73f4624-974c-4f7c-97d6-af0824c54e7e

📥 Commits

Reviewing files that changed from the base of the PR and between 1ec7bf9 and 8b99c7a.

📒 Files selected for processing (7)
  • jupyter/pytorch+llmcompressor/ubi9-python-3.12/Dockerfile.konflux.cuda
  • jupyter/pytorch/ubi9-python-3.12/Dockerfile.konflux.cuda
  • jupyter/rocm/pytorch/ubi9-python-3.12/Dockerfile.konflux.rocm
  • jupyter/rocm/tensorflow/ubi9-python-3.12/Dockerfile.konflux.rocm
  • jupyter/tensorflow/ubi9-python-3.12/Dockerfile.konflux.cuda
  • jupyter/trustyai/ubi9-python-3.12/Dockerfile.konflux.cpu
  • runtimes/minimal/ubi9-python-3.12/Dockerfile.konflux.cpu

Included review availability: Your plan provides up to 12 included reviews per hour; 11 remain after this review.


📝 Walkthrough

Walkthrough

The pull request converts provisioning commands in 15 Dockerfiles to strict Bash heredocs. It preserves package installation, OpenShift client setup, Python dependencies, Jupyter configuration, permissions, and ROCm library installation.

Changes

Dockerfile build command refactor

Layer / File(s) Summary
Base image provisioning
jupyter/*/ubi9-python-3.12/Dockerfile.konflux.*, runtimes/*/ubi9-python-3.12/Dockerfile.konflux.*
Builder, package upgrade, OS dependency, cleanup, architecture-specific setup, and data science package commands now use Bash heredocs with set -Eeuxo pipefail.
OpenShift client installation
jupyter/*/ubi9-python-3.12/Dockerfile.konflux.*, runtimes/*/ubi9-python-3.12/Dockerfile.konflux.*
OpenShift client download, extraction, and archive removal now run in heredocs. Downloads use explicit curl failure and error-reporting flags.
Python and Jupyter runtime setup
jupyter/*/ubi9-python-3.12/Dockerfile.konflux.*, runtimes/*/ubi9-python-3.12/Dockerfile.konflux.*
Python installation, Jupyter configuration, kernel updates, addons, ROCm de-vendoring, and permission fixes now run in strict Bash heredocs.
ROCm device library installation
jupyter/minimal/ubi9-python-3.12/Dockerfile.konflux.rocm, jupyter/rocm/*/ubi9-python-3.12/Dockerfile.konflux.rocm, runtimes/rocm-pytorch/ubi9-python-3.12/Dockerfile.konflux.rocm
ROCm device library installation and DNF cleanup now use strict Bash heredocs.

Estimated code review effort: 4 (Complex) | ~60 minutes

Merge Risk: ⚪ Minimal · up to 8b99c

The PR standardizes Dockerfile shell execution across the remaining workbench images, with linting reported clean and no actionable merge-blocking risk remaining beyond normal checks.

Possibly related issues

  • red-hat-data-services/notebooks#2650: Related ROCm PyTorch dependency, de-vendoring, and permission-layer changes.

Possibly related PRs

Suggested labels: lgtm

Suggested reviewers: atheo89

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main change: converting remaining Dockerfile RUN chains to Bash heredocs.
Description check ✅ Passed The description covers the scope, implementation details, exclusions, testing, and merge criteria, but two checklist items remain unchecked.
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.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/rhoai-2.25-run-heredoc-chains

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

Comment thread jupyter/minimal/ubi9-python-3.12/Dockerfile.konflux.cuda Fixed
Comment thread jupyter/pytorch/ubi9-python-3.12/Dockerfile.cuda Fixed
Comment thread jupyter/tensorflow/ubi9-python-3.12/Dockerfile.cuda Fixed
Comment thread runtimes/pytorch/ubi9-python-3.12/Dockerfile.konflux.cuda Fixed
Comment thread runtimes/tensorflow/ubi9-python-3.12/Dockerfile.cuda Fixed
@jiridanek jiridanek changed the title RHAIENG-287: fix(Dockerfiles): wrap remaining RUN && chains in bash heredocs [rhoai-2.25] RHAIENG-287: fix(Dockerfiles): wrap remaining RUN && chains in bash heredocs Jul 10, 2026
@jiridanek jiridanek added this to the rhoai-2.25.10 milestone Jul 10, 2026
@jiridanek jiridanek changed the title [rhoai-2.25] RHAIENG-287: fix(Dockerfiles): wrap remaining RUN && chains in bash heredocs [rhoai-2.25.10] RHAIENG-287: fix(Dockerfiles): wrap remaining RUN && chains in bash heredocs Jul 10, 2026
@jiridanek jiridanek changed the title [rhoai-2.25.10] RHAIENG-287: fix(Dockerfiles): wrap remaining RUN && chains in bash heredocs [rhoai-2.25] RHAIENG-287: fix(Dockerfiles): wrap remaining RUN && chains in bash heredocs Jul 27, 2026
@jiridanek
jiridanek force-pushed the fix/rhoai-2.25-run-heredoc-chains branch from 0ffb761 to dd37667 Compare July 27, 2026 11:16
@github-actions

github-actions Bot commented Jul 27, 2026

Copy link
Copy Markdown

Superseded by newer run: https://github.com/red-hat-data-services/notebooks/actions/runs/30263039119

CI status [antigravity]

Run: Build Notebooks (push) #302613137392/2 complete · 2 skipped
Last updated: 2026-07-27T11:16:46Z

Workflow completed with skipped jobs.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🧹 Nitpick comments (1)
jupyter/pytorch/ubi9-python-3.12/Dockerfile.cuda (1)

71-78: 🩺 Stability & Availability | 🔵 Trivial | ⚡ Quick win

Add --fail to curl to actually benefit from strict mode.

curl -L -o exits 0 on HTTP 4xx/5xx and writes the error page to the tarball, so set -e never trips here — the build fails later inside tar with a misleading message. The same block is duplicated in the sibling CUDA/ROCm/CPU Dockerfiles in this PR; worth fixing consistently.

🛡️ Proposed fix
-curl -L https://mirror.openshift.com/pub/openshift-v4/$(uname -m)/clients/ocp/stable/openshift-client-linux.tar.gz \
+curl --fail --location --show-error https://mirror.openshift.com/pub/openshift-v4/$(uname -m)/clients/ocp/stable/openshift-client-linux.tar.gz \
     -o /tmp/openshift-client-linux.tar.gz
🤖 Prompt for 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.

In `@jupyter/pytorch/ubi9-python-3.12/Dockerfile.cuda` around lines 71 - 78,
Update the curl download command in the Dockerfile heredoc to include the --fail
option, ensuring HTTP 4xx/5xx responses cause the command to exit nonzero before
tar runs. Apply the same change to the duplicated OpenShift client download
blocks in the sibling CUDA, ROCm, and CPU Dockerfiles.
🤖 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 `@jupyter/pytorch`+llmcompressor/ubi9-python-3.12/Dockerfile.cuda:
- Around line 19-26: Update the heredoc delimiter for the MongoDB CLI build
block in the Dockerfile so MONGOCLI_VERSION expands before bash executes, and
apply the same fix to the corresponding block in Dockerfile.konflux.cuda.
Preserve the existing download, extraction, and build commands.

In `@jupyter/pytorch`+llmcompressor/ubi9-python-3.12/Dockerfile.konflux.cuda:
- Around line 19-26: Update the heredoc in the Dockerfile’s mongocli build RUN
block to use an expanding delimiter instead of the quoted <<'EOF', so
${MONGOCLI_VERSION} is resolved in the curl URL, archive filename, and directory
path.

---

Nitpick comments:
In `@jupyter/pytorch/ubi9-python-3.12/Dockerfile.cuda`:
- Around line 71-78: Update the curl download command in the Dockerfile heredoc
to include the --fail option, ensuring HTTP 4xx/5xx responses cause the command
to exit nonzero before tar runs. Apply the same change to the duplicated
OpenShift client download blocks in the sibling CUDA, ROCm, and CPU Dockerfiles.
🪄 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: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: ce048ad0-3145-4063-98c3-ce189744e1e7

📥 Commits

Reviewing files that changed from the base of the PR and between 41f0865 and dd3766715c2b9ffb773126d36a5ac29e89334aae.

📒 Files selected for processing (30)
  • jupyter/minimal/ubi9-python-3.12/Dockerfile.cpu
  • jupyter/minimal/ubi9-python-3.12/Dockerfile.cuda
  • jupyter/minimal/ubi9-python-3.12/Dockerfile.konflux.cpu
  • jupyter/minimal/ubi9-python-3.12/Dockerfile.konflux.cuda
  • jupyter/minimal/ubi9-python-3.12/Dockerfile.konflux.rocm
  • jupyter/minimal/ubi9-python-3.12/Dockerfile.rocm
  • jupyter/pytorch+llmcompressor/ubi9-python-3.12/Dockerfile.cuda
  • jupyter/pytorch+llmcompressor/ubi9-python-3.12/Dockerfile.konflux.cuda
  • jupyter/pytorch/ubi9-python-3.12/Dockerfile.cuda
  • jupyter/pytorch/ubi9-python-3.12/Dockerfile.konflux.cuda
  • jupyter/rocm/pytorch/ubi9-python-3.12/Dockerfile.konflux.rocm
  • jupyter/rocm/pytorch/ubi9-python-3.12/Dockerfile.rocm
  • jupyter/rocm/tensorflow/ubi9-python-3.12/Dockerfile.konflux.rocm
  • jupyter/rocm/tensorflow/ubi9-python-3.12/Dockerfile.rocm
  • jupyter/tensorflow/ubi9-python-3.12/Dockerfile.cuda
  • jupyter/tensorflow/ubi9-python-3.12/Dockerfile.konflux.cuda
  • jupyter/trustyai/ubi9-python-3.12/Dockerfile.cpu
  • jupyter/trustyai/ubi9-python-3.12/Dockerfile.konflux.cpu
  • runtimes/minimal/ubi9-python-3.12/Dockerfile.cpu
  • runtimes/minimal/ubi9-python-3.12/Dockerfile.konflux.cpu
  • runtimes/pytorch+llmcompressor/ubi9-python-3.12/Dockerfile.cuda
  • runtimes/pytorch+llmcompressor/ubi9-python-3.12/Dockerfile.konflux.cuda
  • runtimes/pytorch/ubi9-python-3.12/Dockerfile.cuda
  • runtimes/pytorch/ubi9-python-3.12/Dockerfile.konflux.cuda
  • runtimes/rocm-pytorch/ubi9-python-3.12/Dockerfile.konflux.rocm
  • runtimes/rocm-pytorch/ubi9-python-3.12/Dockerfile.rocm
  • runtimes/rocm-tensorflow/ubi9-python-3.12/Dockerfile.konflux.rocm
  • runtimes/rocm-tensorflow/ubi9-python-3.12/Dockerfile.rocm
  • runtimes/tensorflow/ubi9-python-3.12/Dockerfile.cuda
  • runtimes/tensorflow/ubi9-python-3.12/Dockerfile.konflux.cuda

Comment thread jupyter/pytorch+llmcompressor/ubi9-python-3.12/Dockerfile.cuda Outdated
@github-actions

github-actions Bot commented Jul 27, 2026

Copy link
Copy Markdown

Superseded by newer run: https://github.com/red-hat-data-services/notebooks/actions/runs/30261316332

CI status [antigravity]

Run: Build Notebooks (push) #302630391192/2 complete · 2 skipped
Last updated: 2026-07-27T11:44:03Z

Workflow completed with skipped jobs.

@github-actions

github-actions Bot commented Jul 27, 2026

Copy link
Copy Markdown

Superseded by newer run: https://github.com/red-hat-data-services/notebooks/actions/runs/30263042493

CI status [antigravity]

Run: Build Notebooks (pr) #3026131633222/22 complete · 15 passed · 3 failed · 4 cancelled
Last updated: 2026-07-27T11:44:32Z after workflow update completed

Failures so far

Job Failed step Link
jupyter-minimal-ubi9-python-3.12 · linux/ppc64le [rhoai] / build Build: make jupyter-minimal-ubi9-python-3.12 logs
jupyter-minimal-ubi9-python-3.12 · linux/s390x [rhoai] / build Build: make jupyter-minimal-ubi9-python-3.12 logs
rocm-runtime-pytorch-ubi9-python-3.12 · linux/amd64 [rhoai] / build Build: make rocm-runtime-pytorch-ubi9-python-3.12 logs
cuda-jupyter-pytorch-llmcompressor-ubi9-python-3.12 · linux/amd64 [rhoai] / build Run Testcontainers container tests (in PyTest) logs
jupyter-trustyai-ubi9-python-3.12 · linux/amd64 [rhoai] / build Build: make jupyter-trustyai-ubi9-python-3.12 logs
runtime-minimal-ubi9-python-3.12 · linux/s390x [rhoai] / build Build: make runtime-minimal-ubi9-python-3.12 logs
rocm-jupyter-pytorch-ubi9-python-3.12 · linux/amd64 [rhoai] / build Build: make rocm-jupyter-pytorch-ubi9-python-3.12 logs

Likely root causes

  • Disk Space Exhaustion (no space left on device): The rocm-runtime-pytorch-ubi9-python-3.12 and rocm-jupyter-pytorch-ubi9-python-3.12 builds failed during container image layer writing with write /var/tmp/container_images_storage...: no space left on device.
  • Unsatisfied Shared Library Dependencies (libcrypt.so.1 => not found): The test container validation test test_elf_files_can_link_runtime_libs failed for cuda-jupyter-pytorch-llmcompressor-ubi9-python-3.12 because /opt/app-root/lib/python3.12/site-packages/mysql/vendor/private/sasl2/libplain.so (and related files) have an unsatisfied dependency on libcrypt.so.1.
  • Workflow Cancellation: Multiple ppc64le, s390x, and trustyai/runtime jobs were cancelled (conclusion: cancelled), likely due to a fail-fast policy triggered by other job failures or resource exhaustion.

Suggested next steps

  • Free Disk Space / Scale Runner Storage: Increase temporary storage or clean up container build caches and temporary storage directories (/var/tmp) on runners executing ROCm builds.
  • Add Missing System Dependency: Ensure libcrypt or the appropriate compatibility package providing libcrypt.so.1 is included in CUDA/PyTorch base images or container dependency sets.
  • Rerun CI Workflow: Retrigger the pull request CI workflow once runner disk space issues are resolved and dependency fixes are applied.

Comment thread jupyter/minimal/ubi9-python-3.12/Dockerfile.konflux.cuda
Comment thread runtimes/pytorch/ubi9-python-3.12/Dockerfile.konflux.cuda
@github-actions

github-actions Bot commented Jul 27, 2026

Copy link
Copy Markdown

Superseded by newer run: https://github.com/red-hat-data-services/notebooks/actions/runs/30267564468

CI status [antigravity]

Run: Build Notebooks (pr) #3026304249322/22 complete · 16 passed · 6 failed
Last updated: 2026-07-27T12:34:29Z after workflow update completed

Failures so far

Job Failed step Link
cuda-jupyter-pytorch-llmcompressor-ubi9-python-3.12 · linux/amd64 [rhoai] / build Run Testcontainers container tests (in PyTest) logs
jupyter-trustyai-ubi9-python-3.12 · linux/amd64 [rhoai] / build Run image tests logs
jupyter-minimal-ubi9-python-3.12 · linux/ppc64le [rhoai] / build Run image tests logs
rocm-runtime-pytorch-ubi9-python-3.12 · linux/amd64 [rhoai] / build Build: make rocm-runtime-pytorch-ubi9-python-3.12 logs
jupyter-minimal-ubi9-python-3.12 · linux/s390x [rhoai] / build Run OpenShift container tests (in PyTest) logs
rocm-jupyter-pytorch-ubi9-python-3.12 · linux/amd64 [rhoai] / build Build: make rocm-jupyter-pytorch-ubi9-python-3.12 logs

Likely root causes

  • Disk space exhaustion on runner instances during container image builds and caching layers (e.g., write /var/tmp/...: no space left on device and disk space warnings reaching 0 MB).
  • Missing dependency libcrypt.so.1 causing ELF runtime linking checks to fail in cuda-jupyter-pytorch-llmcompressor-ubi9-python-3.12.
  • Podman/Kubernetes connection timeouts or missing container instances (container not found ("notebook")) when running OpenShift/Testcontainers end-to-end tests for jupyter-minimal-ubi9-python-3.12 and jupyter-trustyai-ubi9-python-3.12.

Suggested next steps

  • Free up disk space or increase runner storage limits to prevent container image build failures due to storage exhaustion.
  • Ensure required system shared libraries like libcrypt.so.1 are correctly packaged or linked in the base/runtime container images.
  • Investigate pod startup stability and networking timeouts during OpenShift test executions.

@jiridanek
jiridanek force-pushed the fix/rhoai-2.25-run-heredoc-chains branch from 84ca4f9 to de943d4 Compare July 27, 2026 12:50
@github-actions

github-actions Bot commented Jul 27, 2026

Copy link
Copy Markdown

Superseded by newer run: https://github.com/red-hat-data-services/notebooks/actions/runs/30267567465

CI status [antigravity]

Run: Build Notebooks (push) #302675644682/2 complete · 2 skipped
Last updated: 2026-07-27T12:50:22Z

Workflow completed with skipped jobs.

@github-actions

github-actions Bot commented Jul 27, 2026

Copy link
Copy Markdown

Superseded by newer run: https://github.com/red-hat-data-services/notebooks/actions/runs/30351317338

CI status [antigravity]

Run: Build Notebooks (pr) #3026756746522/22 complete · 18 passed · 4 failed
Last updated: 2026-07-27T14:41:38Z after workflow update completed

Failures so far

Job Failed step Link
jupyter-trustyai-ubi9-python-3.12 · linux/amd64 [rhoai] / build Run image tests logs
rocm-jupyter-pytorch-ubi9-python-3.12 · linux/amd64 [rhoai] / build Build: make rocm-jupyter-pytorch-ubi9-python-3.12 logs
jupyter-minimal-ubi9-python-3.12 · linux/ppc64le [rhoai] / build Run image tests logs
rocm-runtime-pytorch-ubi9-python-3.12 · linux/amd64 [rhoai] / build Build: make rocm-runtime-pytorch-ubi9-python-3.12 logs

Likely root causes

  • Disk Space Exhaustion (no space left on device): Build jobs for ROCm images (rocm-jupyter-pytorch-ubi9-python-3.12 and rocm-runtime-pytorch-ubi9-python-3.12) failed due to insufficient disk space when writing container image layers/metadata under /var/tmp/container_images_storage*.
  • E2E Test Pod/Container Execution Failures: End-to-end test jobs (jupyter-trustyai-ubi9-python-3.12 and jupyter-minimal-ubi9-python-3.12) encountered container exit code 137 (indicating OOM kill or termination) or missing container connection errors (error: unable to upgrade connection: container not found ("notebook")) when running papermill tests via kubectl.

Suggested next steps

  • Free up disk space on the CI runner environment or optimize container storage cleanup during podman builds.
  • Inspect cluster pod resource limits and statefulset pod health logs for the minimal and trustyai e2e test failures to identify whether memory limits (2Gi) were exceeded during notebook execution.

@jiridanek

Copy link
Copy Markdown
Member Author

/build-konflux

@github-actions

github-actions Bot commented Jul 28, 2026

Copy link
Copy Markdown

Superseded by newer run: https://github.com/red-hat-data-services/notebooks/actions/runs/30351318770

CI status [antigravity]

Run: Build Notebooks (push) #303513173382/2 complete · 2 skipped
Last updated: 2026-07-28T10:35:16Z

Workflow completed with skipped jobs.

@jiridanek

Copy link
Copy Markdown
Member Author

/build-konflux

jiridanek and others added 2 commits August 20, 2026 08:28
…eredocs

Convert workbench Dockerfiles (excluding datascience and rstudio) to
RUN /bin/bash <<'EOF' blocks so hadolint accepts source and multiline
install steps stay readable.

Co-authored-by: Cursor <cursoragent@cursor.com>
Use curl --fail --location --show-error so 4xx/5xx responses abort the
heredoc before tar runs with a misleading error page tarball.

Co-authored-by: Cursor <cursoragent@cursor.com>
@jiridanek
jiridanek force-pushed the fix/rhoai-2.25-run-heredoc-chains branch from 8956cf2 to 1ec7bf9 Compare August 20, 2026 06:35
@github-actions

github-actions Bot commented Aug 20, 2026

Copy link
Copy Markdown

Superseded by newer run: https://github.com/red-hat-data-services/notebooks/actions/runs/32340232896

CI status [antigravity]

Run: Build Notebooks (push) #323402301392/2 complete · 2 skipped
Last updated: 2026-08-20T06:35:40Z

Workflow completed with skipped jobs.

@jiridanek

Copy link
Copy Markdown
Member Author

/build-konflux

@github-actions

github-actions Bot commented Aug 20, 2026

Copy link
Copy Markdown

Superseded by newer run: https://github.com/red-hat-data-services/notebooks/actions/runs/32356123803

CI status [antigravity]

Run: Build Notebooks (pr) #3234023289622/22 passed
Last updated: 2026-08-20T07:16:57Z

All matrix jobs completed successfully.

@github-actions

github-actions Bot commented Aug 20, 2026

Copy link
Copy Markdown

📋 Review Summary

This pull request systematically refactors remaining single-line RUN ... && ... command chains across workbench and runtime Konflux Dockerfiles into clean /bin/bash <<'EOF' heredoc blocks with set -Eeuxo pipefail enabled. The changes improve build reliability, ensure robust error propagation, and maintain consistency with previous refactoring efforts in the repository. All associated CI checks and checks for generated code/tests have successfully passed.

🔍 General Feedback

  • The adoption of bash heredocs with strict error handling (set -Eeuxo pipefail) across all Dockerfiles enhances script readability and ensures failures within multi-command steps are properly caught.
  • All Konflux workbench and runtime Dockerfile modifications consistently follow the established repository conventions.

@ide-developer ide-developer left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@openshift-ci

openshift-ci Bot commented Aug 20, 2026

Copy link
Copy Markdown

[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 jesuino for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found 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

@ide-developer ide-developer left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review (10-angle deep review + empirical verification)

Method: 10 finder angles (line-by-line scan, removed-behavior audit, cross-file tracer, bash/Dockerfile pitfall specialist, wrapping-fidelity check, plus reuse/simplification/efficiency/altitude/conventions), each run independently, followed by empirical verification against real podman build runs and a final gap-sweep.

Overall verdict: the mechanical heredoc conversion itself is faithful — verified line-for-line across all 59 hunks, no dropped/duplicated/reordered commands, no cross-file contamination. Finding 1 below is the only one worth real attention; the rest are minor/optional.

Findings

  1. jupyter/pytorch+llmcompressor/ubi9-python-3.12/Dockerfile.konflux.cuda:21 (and 5 sibling files: jupyter/pytorch, jupyter/tensorflow, jupyter/rocm/pytorch, jupyter/rocm/tensorflow, jupyter/trustyai) — the oc-client curl -L was hardened to curl --fail --location --show-error in this PR, but the mongocli-builder stage's curl -Lo mongodb-cli-mongocli-v${VERSION}.zip ... in the same diff/heredoc block was left unfixed. Same failure class: a non-2xx response silently writes an HTML error page to the .zip (verified: curl without --fail exits 0), and the build fails one step later at unzip with a confusing "End-of-central-directory signature not found" instead of a clear curl error — undercutting this PR's own stated goal of clearer failure reporting.

  2. ci/hadolint-config.yaml:25 — no lint rule or SHELL directive stops a future contributor from reintroducing the exact fragile RUN a && b && c pattern this PR removes (DL4006 is disabled; verified a synthetic chain passes hadolint with 0 warnings next to a converted heredoc). Only covers the 32 RUN instructions touched today, not future ones.

  3. Doubled blank line after EOF in 5 of the 6 mongocli-builder files (all except jupyter/trustyai) — cosmetic only.

  4. runtimes/minimal/ubi9-python-3.12/Dockerfile.konflux.cpu:46 — keeps dnf clean all && rm -rf /var/cache/yum as one line while ~10 sibling files split the identical pair; the if-body above (line 43) also lost its indentation. Not a functional bug (last line of a set -e script still propagates failure), but reads as an incomplete conversion next to its siblings.

  5. jupyter/rocm/tensorflow/ubi9-python-3.12/Dockerfile.konflux.rocm:188 — wraps an already-terse single &&-pair command in a 4-line heredoc for no benefit (/tmp/link-solibs.sh && rm /tmp/link-solibs.sh).

  6. jupyter/trustyai/ubi9-python-3.12/Dockerfile.konflux.cpu:209 — two --mount flags and the heredoc marker crammed onto one ~141-character line, less readable than the backslash-continuation style used elsewhere in this same PR.

Several plausible-looking theories were tested and refuted rather than reported: ARG values do expand correctly inside quoted <<'EOF' heredocs; RUN --mount=... <<'EOF' builds fine; a trailing A && B as the last line of a set -e script still propagates the failure; scripts/dockerfile_fragments.py's stale curl -L template is dead code for existing files (its ### BEGIN/### END markers match zero Dockerfiles in the repo).

@ide-developer ide-developer left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated review (max effort — 10 finder angles + empirical verification + gap sweep)

Reviewed the full diff (15 Dockerfile.konflux.* files, RUN a && b && cbash heredoc conversion + oc-client curl hardening). Several theoretical concerns were empirically tested against podman build and refuted (ARG expansion inside quoted <<'EOF' heredocs works fine; RUN --mount=... <<'EOF' works fine; a trailing A && B as the last line of a set -e script still propagates A's failure correctly). One real consistency gap and a handful of minor cleanup items survived verification.

1. mongocli-builder curl still lacks the --fail hardening (6 files) — most significant finding

This PR's own follow-up commit hardened the oc-client download from curl -L ... to curl --fail --location --show-error ... specifically so HTTP error responses fail the build cleanly instead of being silently written to the output file. The same class of problem exists one section earlier in the same files, in the same new heredoc-conversion diff, and was not given the same fix:

curl -Lo mongodb-cli-mongocli-v${MONGOCLI_VERSION}.zip https://github.com/mongodb/mongodb-cli/archive/refs/tags/mongocli/v${MONGOCLI_VERSION}.zip

e.g. jupyter/pytorch+llmcompressor/ubi9-python-3.12/Dockerfile.konflux.cuda:21, and identically in jupyter/pytorch, jupyter/tensorflow, jupyter/rocm/pytorch, jupyter/rocm/tensorflow, jupyter/trustyai.

Verified locally: if GitHub returns a non-2xx for this URL (rate-limit, moved/deleted tag, transient 5xx), curl -Lo (no --fail) exits 0 and writes the HTML error page into the .zip file. set -e does still abort the build overall — but one step later, at unzip ./mongodb-cli-mongocli-v${MONGOCLI_VERSION}.zip, with a confusing End-of-central-directory signature not found instead of the clear curl HTTP-failure message the sibling fix now provides. Worth adding --fail --location --show-error here too for consistency with the stated PR goal.

2. No guardrail against reintroducing the fixed pattern

ci/hadolint-config.yaml disables DL4006 (the one built-in rule that gestures at "use pipefail/safe RUN semantics"), and hadolint has no other rule that flags a plain RUN a && b && c chain — confirmed by running hadolint against a synthetic chain added next to a converted heredoc: 0 warnings, exit 0. Nothing stops the next contributor from adding a new multi-command RUN in one of these files without the heredoc+set -Eeuxo pipefail wrapper, silently reintroducing the exact fragile pattern this PR removes for the 32 RUN instructions it touches today. Not blocking for this PR, but worth a follow-up (lint rule, or a SHELL ["/bin/bash","-Eeuxo","pipefail","-c"] directive per stage) so the fix doesn't erode over time.

3. Minor cleanup (cosmetic, non-blocking)

  • Doubled blank line after EOF: jupyter/pytorch+llmcompressor/ubi9-python-3.12/Dockerfile.konflux.cuda:26-27 (and identically in jupyter/pytorch, jupyter/tensorflow, jupyter/rocm/pytorch, jupyter/rocm/tensorflow — all 6 mongocli-builder files except jupyter/trustyai) has two consecutive blank lines before the next comment block, where every other converted RUN block in the PR has exactly one.
  • Inconsistent && retention + lost indentation: runtimes/minimal/ubi9-python-3.12/Dockerfile.konflux.cpu:46 keeps dnf clean all && rm -rf /var/cache/yum as one line while ~10 sibling files split the identical pair into two; the same file's if body at line 43 also lost its original indentation (plus a now-pointless trailing ;). Not a functional bug (it's the last line of the script, so set -e still catches a failure there), just the one file that looks like an incomplete conversion next to its siblings.
  • No-op heredoc wrap: jupyter/rocm/tensorflow/ubi9-python-3.12/Dockerfile.konflux.rocm:188-191 wraps the already-terse /tmp/link-solibs.sh && rm /tmp/link-solibs.sh in a 4-line heredoc — no chain was actually unwound, so it's pure ceremony.
  • Readability: jupyter/trustyai/ubi9-python-3.12/Dockerfile.konflux.cpu:209 combines two --mount flags and the heredoc marker onto one ~141-character line; the backslash-continuation style used elsewhere in this same PR (e.g. the oc-client curl/tar block) would be more readable here too.

Verdict

No build-breaking issues found in the heredoc conversion itself — the mechanical transformation is faithful (verified line-for-line across all 59 hunks: no dropped/duplicated/reordered commands, no cross-file package-list contamination). Item 1 is worth fixing for consistency with this PR's own stated goal; items 2-3 are optional follow-ups/nits.


Posted by an automated review (Claude, max effort: 10 finder angles, empirical podman verification, gap sweep).

@coderabbitai

coderabbitai Bot commented Aug 20, 2026

Copy link
Copy Markdown

Tip

For best results, initiate chat on the files or code changes.

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

repo="red-hat-data-services/notebooks"
pr="2485"

echo "== Pull request =="
gh pr view "$pr" --repo "$repo" --json number,title,state,reviewDecision,comments,reviews \
  --jq '{number,title,state,reviewDecision,reviews: [.reviews[] | {author: .author.login, state, submittedAt, body}], comments: [.comments[] | {author: .author.login, createdAt, body}]}'

echo
echo "== Inline review comments =="
gh api --paginate "repos/$repo/pulls/$pr/comments?per_page=100" \
  --jq '.[] | {id, user: .user.login, created_at, path, line, side, body, in_reply_to_id}'

Length of output: 62647


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== Current PR file list and diff statistics =="
git diff --stat origin/rhoai-2.25...HEAD
git diff --name-only origin/rhoai-2.25...HEAD

echo
echo "== MongoCLI download commands =="
rg -n -C 4 --glob 'Dockerfile*' \
  'curl\s+(-Lo|--location|--fail)|MONGOCLI_VERSION|mongodb-cli-mongocli' \
  jupyter

echo
echo "== OpenShift-client download commands in changed Dockerfiles =="
git diff --name-only origin/rhoai-2.25...HEAD \
  | while IFS= read -r file; do
      case "$file" in
        *Dockerfile*)
          printf '\n===== %s =====\n' "$file"
          rg -n -C 2 'openshift-client-linux|curl\s+' "$file" || true
          ;;
      esac
    done

echo
echo "== Claimed cleanup locations =="
for file_and_range in \
  'runtimes/minimal/ubi9-python-3.12/Dockerfile.konflux.cpu:34,52' \
  'jupyter/rocm/tensorflow/ubi9-python-3.12/Dockerfile.konflux.rocm:180,195' \
  'jupyter/trustyai/ubi9-python-3.12/Dockerfile.konflux.cpu:200,216'
do
  file="${file_and_range%%:*}"
  range="${file_and_range#*:}"
  printf '\n===== %s (Lines %s) =====\n' "$file" "$range"
  nl -ba "$file" | sed -n "${range}p"
done

echo
echo "== Hadolint policy configuration =="
nl -ba ci/hadolint-config.yaml | sed -n '1,120p'

Length of output: 1798


🏁 Script executed:

#!/bin/bash
set -euo pipefail

repo="red-hat-data-services/notebooks"
pr="2485"

echo "== Pull request base and head =="
gh pr view "$pr" --repo "$repo" --json baseRefOid,headRefOid,baseRefName,headRefName \
  --jq '{baseRefName, baseRefOid, headRefName, headRefOid}'

echo
echo "== MongoCLI download commands =="
rg -n -C 4 --glob 'Dockerfile*' \
  'curl\s+(-Lo|--location|--fail)|MONGOCLI_VERSION|mongodb-cli-mongocli' \
  jupyter

echo
echo "== OpenShift-client download commands in current Dockerfiles =="
rg -n -C 2 --glob 'Dockerfile*' \
  'openshift-client-linux|curl\s+(--fail|--location|-L)' \
  jupyter runtimes

echo
echo "== Claimed cleanup locations =="
for file_and_range in \
  'runtimes/minimal/ubi9-python-3.12/Dockerfile.konflux.cpu:34,52' \
  'jupyter/rocm/tensorflow/ubi9-python-3.12/Dockerfile.konflux.rocm:180,195' \
  'jupyter/trustyai/ubi9-python-3.12/Dockerfile.konflux.cpu:200,216'
do
  file="${file_and_range%%:*}"
  range="${file_and_range#*:}"
  printf '\n===== %s (Lines %s) =====\n' "$file" "$range"
  nl -ba "$file" | sed -n "${range}p"
done

echo
echo "== Hadolint policy configuration =="
nl -ba ci/hadolint-config.yaml | sed -n '1,120p'

Length of output: 40915


🏁 Script executed:

#!/bin/bash
set -euo pipefail

repo="red-hat-data-services/notebooks"
base="d4ba344eb5e7cee97f71068b6c644b9d462c09cb"
head="1ec7bf924ef74f6560b136302a3c47b352cda383"

echo "== Changed Dockerfiles that contain MongoCLI downloads =="
gh api "repos/$repo/compare/$base...$head" --paginate \
  --jq '.files[] | select(.filename | test("^jupyter/.*/Dockerfile\\.konflux\\.")) | .filename' \
  | while IFS= read -r file; do
      if grep -q 'mongodb-cli-mongocli' "$file"; then
        echo "$file"
      fi
    done

show_range() {
  file="$1"
  start="$2"
  end="$3"
  printf '\n===== %s (Lines %s-%s) =====\n' "$file" "$start" "$end"
  sed -n "${start},${end}{=;p;}" "$file" | sed 'N;s/\n/: /'
}

show_range 'runtimes/minimal/ubi9-python-3.12/Dockerfile.konflux.cpu' 38 50
show_range 'jupyter/rocm/tensorflow/ubi9-python-3.12/Dockerfile.konflux.rocm' 184 194
show_range 'jupyter/trustyai/ubi9-python-3.12/Dockerfile.konflux.cpu' 204 214

echo
echo "== Hadolint configuration =="
sed -n '1,120{=;p;}' ci/hadolint-config.yaml | sed 'N;s/\n/: /'

Length of output: 5998


@ide-developer I reviewed the findings and agree with the main item.

The six changed mongocli-builder stages still use curl -Lo without --fail. This differs from the hardened OpenShift client downloads in the same Dockerfiles. An HTTP error can therefore create an invalid ZIP file and make unzip report the failure later.

I recommend this in all six affected Dockerfiles:

curl --fail --location --show-error \
    -o mongodb-cli-mongocli-v${MONGOCLI_VERSION}.zip \
    https://github.com/mongodb/mongodb-cli/archive/refs/tags/mongocli/v${MONGOCLI_VERSION}.zip

The other items are valid but non-blocking:

  • runtimes/minimal/ubi9-python-3.12/Dockerfile.konflux.cpu Line 46 retains an && chain. Line 43 has an unnecessary trailing semicolon.
  • jupyter/rocm/tensorflow/ubi9-python-3.12/Dockerfile.konflux.rocm Lines 188-191 add a heredoc around only two commands. This is unnecessary but safe.
  • jupyter/trustyai/ubi9-python-3.12/Dockerfile.konflux.cpu Line 209 is difficult to read. Split the mount options across lines if this file changes again.
  • ci/hadolint-config.yaml does not prevent future RUN ... && ... chains. DL4006 applies to pipelines, not general command chains. A separate project-specific lint check would be required.

The latest Konflux matrix run completed successfully with 22/22 jobs passed.

You are interacting with an AI system.

@ide-developer

Copy link
Copy Markdown
Collaborator

@coderabbitai please take a look at #2485 (review) as well.

@ide-developer

Copy link
Copy Markdown
Collaborator

@coderabbitai please take a look at #2485 (review) as well.

@ide-developer

Copy link
Copy Markdown
Collaborator

@coderabbitai please take a look at #2485 (review) as well.

@coderabbitai

coderabbitai Bot commented Aug 20, 2026

Copy link
Copy Markdown

Tip

For best results, initiate chat on the files or code changes.

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

repo="red-hat-data-services/notebooks"
pr="2485"
review_id="4980585447"

echo "== Pull request review =="
gh api "repos/$repo/pulls/$pr/reviews/$review_id" \
  --jq '{id, user: .user.login, state, submitted_at, body, commit_id}'

echo
echo "== Inline comments for this review =="
gh api --paginate "repos/$repo/pulls/$pr/comments?per_page=100" \
  --jq --argjson review_id "$review_id" \
  '.[] | select(.pull_request_review_id == $review_id) |
   {id, path, line, original_line, side, body, diff_hunk, in_reply_to_id, commit_id}'

Length of output: 1130


🏁 Script executed:

#!/bin/bash
set -euo pipefail

repo="red-hat-data-services/notebooks"
pr="2485"
review_id="4980585447"

gh api --paginate "repos/$repo/pulls/$pr/comments?per_page=100" \
  | jq --argjson review_id "$review_id" '
      [.[] | select(.pull_request_review_id == $review_id) |
       {id, path, line, original_line, side, body, in_reply_to_id, commit_id}]
    '

Length of output: 499


@ide-developer I checked review 4980585447.

The review is approved. Its body is LGTM. It has no inline comments.

You are interacting with an AI system.

@coderabbitai

coderabbitai Bot commented Aug 20, 2026

Copy link
Copy Markdown

Tip

For best results, initiate chat on the files or code changes.

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

repo="red-hat-data-services/notebooks"
pr="2485"
review_id="4981116166"

echo "== Review =="
gh api "repos/$repo/pulls/$pr/reviews/$review_id" \
  --jq '{id, user: .user.login, state, submitted_at, commit_id, body}'

echo
echo "== Inline comments for this review =="
gh api --paginate "repos/$repo/pulls/$pr/comments?per_page=100" \
  --jq --argjson review_id "$review_id" \
  '.[] | select(.pull_request_review_id == $review_id) |
   {id, path, line, original_line, side, original_position, commit_id, body, in_reply_to_id}'

Length of output: 6088


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== MongoCLI download commands and heredoc spacing =="
rg -n -C 5 --glob 'Dockerfile.konflux.*' \
  'curl\s+.*mongodb-cli-mongocli|mongodb-cli-mongocli-v\$\{MONGOCLI_VERSION\}\.zip' \
  jupyter

echo
echo "== runtimes/minimal cleanup block =="
nl -ba runtimes/minimal/ubi9-python-3.12/Dockerfile.konflux.cpu | sed -n '34,52p'

echo
echo "== ROCm TensorFlow link-solibs block =="
nl -ba jupyter/rocm/tensorflow/ubi9-python-3.12/Dockerfile.konflux.rocm | sed -n '180,198p'

echo
echo "== TrustyAI mount block =="
nl -ba jupyter/trustyai/ubi9-python-3.12/Dockerfile.konflux.cpu | sed -n '200,218p'

Length of output: 9769


🏁 Script executed:

#!/bin/bash
set -euo pipefail

print_range() {
  file="$1"
  start="$2"
  end="$3"
  printf '\n== %s, Lines %s-%s ==\n' "$file" "$start" "$end"
  sed -n "${start},${end}p" "$file" | awk -v n="$start" '{printf "%d\t%s\n", n++, $0}'
}

print_range runtimes/minimal/ubi9-python-3.12/Dockerfile.konflux.cpu 34 52
print_range jupyter/rocm/tensorflow/ubi9-python-3.12/Dockerfile.konflux.rocm 180 198
print_range jupyter/trustyai/ubi9-python-3.12/Dockerfile.konflux.cpu 200 218

Length of output: 2972


@ide-developer I reviewed 4981116166 and verified the current sources.

I agree with the main finding. The six mongocli-builder stages still use curl -Lo without --fail. A non-2xx GitHub response can therefore fail later at unzip instead of failing at the download. Update these downloads to use curl --fail --location --show-error.

I also confirm the cleanup items:

  • runtimes/minimal/ubi9-python-3.12/Dockerfile.konflux.cpu Line 43 has lost indentation and has an unnecessary trailing semicolon. Line 46 retains the && chain.
  • jupyter/rocm/tensorflow/ubi9-python-3.12/Dockerfile.konflux.rocm Lines 188-191 add a heredoc but retain the same two-command && chain.
  • jupyter/trustyai/ubi9-python-3.12/Dockerfile.konflux.cpu Line 209 is difficult to read. Split the mount options across lines.

These cleanup items are non-blocking. The guardrail against future RUN ... && ... chains needs a separate project-level lint or policy change.

You are interacting with an AI system.

@coderabbitai

coderabbitai Bot commented Aug 20, 2026

Copy link
Copy Markdown

Tip

For best results, initiate chat on the files or code changes.

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

repo="red-hat-data-services/notebooks"
pr="2485"
review_id="4981108041"

echo "== Requested review =="
gh api "repos/$repo/pulls/$pr/reviews/$review_id" \
  --jq '{id, user: .user.login, state, submitted_at, body, commit_id}'

echo
echo "== Inline comments for requested review =="
gh api --paginate "repos/$repo/pulls/$pr/comments?per_page=100" \
  --jq --argjson review_id "$review_id" \
  '.[] | select(.pull_request_review_id == $review_id) |
   {id, path, line, original_line, side, body, diff_hunk, commit_id}'

echo
echo "== Current pull request head =="
gh pr view "$pr" --repo "$repo" --json headRefOid --jq '.headRefOid'

Length of output: 4539


🏁 Script executed:

#!/bin/bash
set -euo pipefail

repo="red-hat-data-services/notebooks"
pr="2485"
review_id="4981108041"

echo "== Inline comments for requested review =="
gh api --paginate "repos/$repo/pulls/$pr/reviews/$review_id/comments?per_page=100" \
  --jq '.[] | {id, path, line, original_line, side, body, diff_hunk, commit_id}'

echo
echo "== MongoCLI downloads in the six named Dockerfiles =="
for file in \
  jupyter/pytorch+llmcompressor/ubi9-python-3.12/Dockerfile.konflux.cuda \
  jupyter/pytorch/ubi9-python-3.12/Dockerfile.konflux.cuda \
  jupyter/tensorflow/ubi9-python-3.12/Dockerfile.konflux.cuda \
  jupyter/rocm/pytorch/ubi9-python-3.12/Dockerfile.konflux.rocm \
  jupyter/rocm/tensorflow/ubi9-python-3.12/Dockerfile.konflux.rocm \
  jupyter/trustyai/ubi9-python-3.12/Dockerfile.konflux.cpu
do
  printf '\n===== %s =====\n' "$file"
  rg -n -C 3 'mongodb-cli-mongocli|curl\s+' "$file"
done

echo
echo "== Remaining findings: current context =="
for item in \
  'runtimes/minimal/ubi9-python-3.12/Dockerfile.konflux.cpu:38:50' \
  'jupyter/rocm/tensorflow/ubi9-python-3.12/Dockerfile.konflux.rocm:182:196' \
  'jupyter/trustyai/ubi9-python-3.12/Dockerfile.konflux.cpu:202:216'
do
  file="${item%%:*}"
  rest="${item#*:}"
  start="${rest%%:*}"
  end="${rest#*:}"
  printf '\n===== %s, Lines %s-%s =====\n' "$file" "$start" "$end"
  nl -ba "$file" | sed -n "${start},${end}p"
done

echo
echo "== Hadolint configuration context =="
nl -ba ci/hadolint-config.yaml | sed -n '1,80p'

Length of output: 7317


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== MongoCLI command changes in this PR =="
git diff --unified=4 origin/rhoai-2.25...HEAD -- \
  jupyter/pytorch+llmcompressor/ubi9-python-3.12/Dockerfile.konflux.cuda \
  jupyter/pytorch/ubi9-python-3.12/Dockerfile.konflux.cuda \
  jupyter/tensorflow/ubi9-python-3.12/Dockerfile.konflux.cuda \
  jupyter/rocm/pytorch/ubi9-python-3.12/Dockerfile.konflux.rocm \
  jupyter/rocm/tensorflow/ubi9-python-3.12/Dockerfile.konflux.rocm \
  jupyter/trustyai/ubi9-python-3.12/Dockerfile.konflux.cpu \
  | rg -n -C 3 'mongodb-cli-mongocli|curl'

print_range() {
  file="$1"
  start="$2"
  end="$3"
  printf '\n===== %s, Lines %s-%s =====\n' "$file" "$start" "$end"
  awk -v start="$start" -v end="$end" \
    'NR >= start && NR <= end { printf "%d: %s\n", NR, $0 }' "$file"
}

echo
echo "== Remaining findings: current context =="
print_range runtimes/minimal/ubi9-python-3.12/Dockerfile.konflux.cpu 38 50
print_range jupyter/rocm/tensorflow/ubi9-python-3.12/Dockerfile.konflux.rocm 182 196
print_range jupyter/trustyai/ubi9-python-3.12/Dockerfile.konflux.cpu 202 216

echo
echo "== Hadolint configuration =="
awk '{ printf "%d: %s\n", NR, $0 }' ci/hadolint-config.yaml | sed -n '1,80p'

Length of output: 1608


🏁 Script executed:

#!/bin/bash
set -euo pipefail

repo="red-hat-data-services/notebooks"
base="d4ba344eb5e7cee97f71068b6c644b9d462c09cb"
head="1ec7bf924ef74f6560b136302a3c47b352cda383"

for file in \
  jupyter/pytorch+llmcompressor/ubi9-python-3.12/Dockerfile.konflux.cuda \
  jupyter/pytorch/ubi9-python-3.12/Dockerfile.konflux.cuda \
  jupyter/tensorflow/ubi9-python-3.12/Dockerfile.konflux.cuda \
  jupyter/rocm/pytorch/ubi9-python-3.12/Dockerfile.konflux.rocm \
  jupyter/rocm/tensorflow/ubi9-python-3.12/Dockerfile.konflux.rocm \
  jupyter/trustyai/ubi9-python-3.12/Dockerfile.konflux.cpu
do
  printf '\n===== %s: base and head MongoCLI commands =====\n' "$file"
  for ref in "$base" "$head"; do
    printf '%s: ' "$ref"
    gh api "repos/$repo/contents/$file?ref=$ref" --jq '.content' \
      | base64 --decode \
      | grep 'mongodb-cli-mongocli' \
      | head -n 1 || true
  done
done

print_range() {
  file="$1"
  start="$2"
  end="$3"
  printf '\n===== %s, Lines %s-%s =====\n' "$file" "$start" "$end"
  awk -v start="$start" -v end="$end" \
    'NR >= start && NR <= end { printf "%d: %s\n", NR, $0 }' "$file"
}

echo
echo "== Remaining findings: current context =="
print_range runtimes/minimal/ubi9-python-3.12/Dockerfile.konflux.cpu 38 50
print_range jupyter/rocm/tensorflow/ubi9-python-3.12/Dockerfile.konflux.rocm 182 196
print_range jupyter/trustyai/ubi9-python-3.12/Dockerfile.konflux.cpu 202 216

echo
echo "== Hadolint configuration =="
awk '{ printf "%d: %s\n", NR, $0 }' ci/hadolint-config.yaml | sed -n '1,80p'

Length of output: 9378


@ide-developer I reviewed pullrequestreview-4981108041.

The MongoCLI curl finding is valid as a reliability improvement. All six commands lack --fail, while their OpenShift client downloads use --fail --location --show-error.

This behavior existed before this PR. The heredoc conversion did not introduce it. Therefore, I classify it as non-blocking. The proposed curl change is still worthwhile for consistent and clear HTTP failure reporting.

The Hadolint finding is also correct. Hadolint does not prevent general RUN ... && ... chains. A project-specific check would be required. That work is outside this PR.

The remaining items are optional formatting improvements:

  • runtimes/minimal/ubi9-python-3.12/Dockerfile.konflux.cpu Line 46 retains an && chain. Line 43 has a trailing semicolon.
  • jupyter/trustyai/ubi9-python-3.12/Dockerfile.konflux.cpu Line 209 is difficult to read.
  • The extra blank lines after EOF are cosmetic.

I do not consider the link-solibs.sh heredoc in jupyter/rocm/tensorflow/ubi9-python-3.12/Dockerfile.konflux.rocm a defect. It converts the remaining && chain as intended by this PR.

You are interacting with an AI system.

Apply the same --fail hardening used for the oc-client curl in this PR
to the mongocli-builder download, so an HTTP error page isn't silently
written to the archive. Also fixes leftover formatting nits from the
heredoc conversion: doubled blank line, lost if-block indentation, an
unsplit dnf clean line, and a cramped multi --mount RUN line.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@openshift-ci openshift-ci Bot removed the lgtm label Aug 20, 2026
@openshift-ci

openshift-ci Bot commented Aug 20, 2026

Copy link
Copy Markdown

New changes are detected. LGTM label has been removed.

@github-actions

github-actions Bot commented Aug 20, 2026

Copy link
Copy Markdown

Superseded by newer run: https://github.com/red-hat-data-services/notebooks/actions/runs/32356129886

CI status [antigravity]

Run: Build Notebooks (push) #323561238032/2 complete · 2 skipped
Last updated: 2026-08-20T09:53:03Z

Workflow completed with skipped jobs.

rm -f /tmp/openshift-client-linux.tar.gz
RUN /bin/bash <<'EOF'
set -Eeuxo pipefail
curl --fail --location --show-error https://mirror.openshift.com/pub/openshift-v4/$(uname -m)/clients/ocp/stable/openshift-client-linux.tar.gz \
@jiridanek

Copy link
Copy Markdown
Member Author

/build-konflux

@github-actions

Copy link
Copy Markdown

CI status [antigravity]

Run: Build Notebooks (pr) #3235612988622/22 passed
Last updated: 2026-08-20T10:31:15Z

All matrix jobs completed successfully.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants