Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions jupyter/datascience/ubi9-python-3.12/pylock.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2449,9 +2449,9 @@ wheels = [{ url = "https://files.pythonhosted.org/packages/be/9c/92789c596b8df83

[[packages]]
name = "odh-elyra"
version = "4.2.4"
sdist = { url = "https://files.pythonhosted.org/packages/39/58/9a76992bcd402f7eaf9a23fb164d56993db6c079d3fad67dc0a4df799d03/odh_elyra-4.2.4.tar.gz", upload-time = 2025-09-11T18:09:43Z, size = 2155769, hashes = { sha256 = "9563849a41e3d5f45f4923a00d9e6480a9d53787e076d6369248f880795d2130" } }
wheels = [{ url = "https://files.pythonhosted.org/packages/f9/48/b852bc3107a6d92c1c6c63b0fa6255897e515df6948778e521f603f59e75/odh_elyra-4.2.4-py3-none-any.whl", upload-time = 2025-09-11T18:09:41Z, size = 4317667, hashes = { sha256 = "227b1a35a3eef8a02409e3aa5081c3322bcd30cd8939b77575dfce397f3fa42b" } }]
version = "4.3.1"
sdist = { url = "https://files.pythonhosted.org/packages/f7/f4/6be53ca16125e7d3ca6cb86aa8f001ebe200977e429bedb4b6467e692328/odh_elyra-4.3.1.tar.gz", upload-time = 2025-10-09T14:53:22Z, size = 2196705, hashes = { sha256 = "522c85c647d97d3a5317389dc106452fdebf48f95ecbdea3db0aef1b43192475" } }
wheels = [{ url = "https://files.pythonhosted.org/packages/b3/7a/009a5eb3e872330c22155928ffd3dcb8f139385b7de2a7540cad714be9bd/odh_elyra-4.3.1-py3-none-any.whl", upload-time = 2025-10-09T14:53:20Z, size = 4352762, hashes = { sha256 = "ae1008e0329e14d45a4c31b5436b00e732dcaa201cae15adb7f502249bf9d7a8" } }]

[[packages]]
name = "odh-jupyter-trash-cleanup"
Expand Down
2 changes: 1 addition & 1 deletion jupyter/datascience/ubi9-python-3.12/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ dependencies = [
"mysql-connector-python~=9.4.0",

# JupyterLab packages
"odh-elyra==4.2.4",
"odh-elyra==4.3.1",
"odh-jupyter-trash-cleanup==0.1.1",

"jupyterlab==4.4.7",
Expand Down
7 changes: 6 additions & 1 deletion jupyter/datascience/ubi9-python-3.12/setup-elyra.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
#!/bin/bash
set -x

# By copying this we must make sure that ELYRA_INSTALL_PACKAGES=false
cp /opt/app-root/lib/python3.12/site-packages/elyra/kfp/bootstrapper.py /opt/app-root/bin/utils/
Comment on lines +4 to +5
Copy link
Contributor

@coderabbitai coderabbitai bot Oct 9, 2025

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

Ensure the bootstrapper copy failure aborts the script.

This cp runs before the bootstrapper exists anywhere else. Because the script isn’t running with set -e, if the path ever changes (e.g., packaging move, missing dependency), cp quietly fails and the remainder of the setup keeps running without a bootstrapper—breaking Elyra at runtime. Please make the step fail fast (for example by adding set -e/set -euo pipefail near the top or by checking cp ... || exit 1).

🤖 Prompt for AI Agents
In jupyter/datascience/ubi9-python-3.12/setup-elyra.sh around lines 4 to 5, the
cp command can fail silently because the script doesn't abort on errors; modify
the script to fail fast by enabling strict error handling (e.g., add set -euo
pipefail near the top) and/or make the cp command explicitly abort on failure
(append a check like cp ... || exit 1) so that a missing bootstrapper stops the
setup immediately.

Copy link
Member

Choose a reason for hiding this comment

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

@jesuino yeah, like that, that is what I had in mind

@coderabbitai do you expect any problems just adding set -Eeuo pipefail?

Copy link
Contributor

Choose a reason for hiding this comment

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

@jiridanek Adding set -Eeuo pipefail should work fine and is the right approach for fail-fast behavior. Here's what each flag does in this script:

  • -e: ✅ Exactly what you want—exits immediately if any command fails (like the cp for bootstrapper)
  • -E: No effect here (inherits ERR traps to functions, but there are no ERR traps defined)
  • -u: ✅ Safe—treats unset variables as errors; all variables in the script are explicitly exported
  • -o pipefail: No effect here (no pipelines in this script)

Minor pre-existing issue (unrelated to adding the flags):
Line 11 has an unquoted command substitution:

if [ ! -d $(jupyter --data-dir)/metadata/runtimes/ ]; then

Should ideally be:

if [ ! -d "$(jupyter --data-dir)/metadata/runtimes/" ]; then

This prevents potential word-splitting issues if the path contains spaces, but it's a pre-existing condition and won't break with the new flags.

Recommendation: Go ahead and add set -Eeuo pipefail right after the shebang—it will make the script more robust without breaking existing functionality. 🚀


🧠 Learnings used
Learnt from: jiridanek
PR: opendatahub-io/notebooks#1269
File: codeserver/ubi9-python-3.12/run-nginx.sh:5-6
Timestamp: 2025-07-03T16:04:30.516Z
Learning: jiridanek requested GitHub issue creation for shell script strict mode improvement in codeserver/ubi9-python-3.12/run-nginx.sh during PR #1269 review. Issue #1308 was created with comprehensive problem description covering limitations of `set -e`, detailed solution with `set -euo pipefail`, benefits explanation for each flag, acceptance criteria, risk assessment, testing approach, and proper context linking, continuing the established pattern of systematic code quality improvements for shell scripts.


# Set the elyra config on the right path
jupyter elyra --generate-config
cp /opt/app-root/bin/utils/jupyter_elyra_config.py /opt/app-root/src/.jupyter/
Expand All @@ -20,6 +23,8 @@ if [ "$(ls -A /opt/app-root/pipeline-runtimes/)" ]; then
fi

# Environment vars set for accessing ssl_sa_certs and sa_token
# export PIPELINES_SSL_SA_CERTS="/var/run/secrets/kubernetes.io/serviceaccount/ca.crt"
export KF_PIPELINES_SSL_SA_CERTS="/var/run/secrets/kubernetes.io/serviceaccount/ca.crt"
export KF_PIPELINES_SA_TOKEN_ENV="/var/run/secrets/kubernetes.io/serviceaccount/token"
export KF_PIPELINES_SA_TOKEN_PATH="/var/run/secrets/kubernetes.io/serviceaccount/token"
export ELYRA_INSTALL_PACKAGES="false"
export ELYRA_GENERIC_NODES_ENABLE_SCRIPT_OUTPUT_TO_S3="false"
6 changes: 3 additions & 3 deletions jupyter/pytorch+llmcompressor/ubi9-python-3.12/pylock.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2703,9 +2703,9 @@ wheels = [{ url = "https://files.pythonhosted.org/packages/be/9c/92789c596b8df83

[[packages]]
name = "odh-elyra"
version = "4.2.4"
sdist = { url = "https://files.pythonhosted.org/packages/39/58/9a76992bcd402f7eaf9a23fb164d56993db6c079d3fad67dc0a4df799d03/odh_elyra-4.2.4.tar.gz", upload-time = 2025-09-11T18:09:43Z, size = 2155769, hashes = { sha256 = "9563849a41e3d5f45f4923a00d9e6480a9d53787e076d6369248f880795d2130" } }
wheels = [{ url = "https://files.pythonhosted.org/packages/f9/48/b852bc3107a6d92c1c6c63b0fa6255897e515df6948778e521f603f59e75/odh_elyra-4.2.4-py3-none-any.whl", upload-time = 2025-09-11T18:09:41Z, size = 4317667, hashes = { sha256 = "227b1a35a3eef8a02409e3aa5081c3322bcd30cd8939b77575dfce397f3fa42b" } }]
version = "4.3.1"
sdist = { url = "https://files.pythonhosted.org/packages/f7/f4/6be53ca16125e7d3ca6cb86aa8f001ebe200977e429bedb4b6467e692328/odh_elyra-4.3.1.tar.gz", upload-time = 2025-10-09T14:53:22Z, size = 2196705, hashes = { sha256 = "522c85c647d97d3a5317389dc106452fdebf48f95ecbdea3db0aef1b43192475" } }
wheels = [{ url = "https://files.pythonhosted.org/packages/b3/7a/009a5eb3e872330c22155928ffd3dcb8f139385b7de2a7540cad714be9bd/odh_elyra-4.3.1-py3-none-any.whl", upload-time = 2025-10-09T14:53:20Z, size = 4352762, hashes = { sha256 = "ae1008e0329e14d45a4c31b5436b00e732dcaa201cae15adb7f502249bf9d7a8" } }]

[[packages]]
name = "odh-jupyter-trash-cleanup"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ dependencies = [
"mysql-connector-python~=9.4.0",

# JupyterLab packages
"odh-elyra==4.2.4",
"odh-elyra==4.3.1",
"odh-jupyter-trash-cleanup==0.1.1",

"jupyterlab==4.4.7",
Expand Down
6 changes: 3 additions & 3 deletions jupyter/pytorch/ubi9-python-3.12/pylock.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2594,9 +2594,9 @@ wheels = [{ url = "https://files.pythonhosted.org/packages/be/9c/92789c596b8df83

[[packages]]
name = "odh-elyra"
version = "4.2.4"
sdist = { url = "https://files.pythonhosted.org/packages/39/58/9a76992bcd402f7eaf9a23fb164d56993db6c079d3fad67dc0a4df799d03/odh_elyra-4.2.4.tar.gz", upload-time = 2025-09-11T18:09:43Z, size = 2155769, hashes = { sha256 = "9563849a41e3d5f45f4923a00d9e6480a9d53787e076d6369248f880795d2130" } }
wheels = [{ url = "https://files.pythonhosted.org/packages/f9/48/b852bc3107a6d92c1c6c63b0fa6255897e515df6948778e521f603f59e75/odh_elyra-4.2.4-py3-none-any.whl", upload-time = 2025-09-11T18:09:41Z, size = 4317667, hashes = { sha256 = "227b1a35a3eef8a02409e3aa5081c3322bcd30cd8939b77575dfce397f3fa42b" } }]
version = "4.3.1"
sdist = { url = "https://files.pythonhosted.org/packages/f7/f4/6be53ca16125e7d3ca6cb86aa8f001ebe200977e429bedb4b6467e692328/odh_elyra-4.3.1.tar.gz", upload-time = 2025-10-09T14:53:22Z, size = 2196705, hashes = { sha256 = "522c85c647d97d3a5317389dc106452fdebf48f95ecbdea3db0aef1b43192475" } }
wheels = [{ url = "https://files.pythonhosted.org/packages/b3/7a/009a5eb3e872330c22155928ffd3dcb8f139385b7de2a7540cad714be9bd/odh_elyra-4.3.1-py3-none-any.whl", upload-time = 2025-10-09T14:53:20Z, size = 4352762, hashes = { sha256 = "ae1008e0329e14d45a4c31b5436b00e732dcaa201cae15adb7f502249bf9d7a8" } }]

[[packages]]
name = "odh-jupyter-trash-cleanup"
Expand Down
2 changes: 1 addition & 1 deletion jupyter/pytorch/ubi9-python-3.12/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ dependencies = [
"mysql-connector-python~=9.4.0",

# JupyterLab packages
"odh-elyra==4.2.4",
"odh-elyra==4.3.1",
"odh-jupyter-trash-cleanup==0.1.1",

"jupyterlab==4.4.7",
Expand Down
6 changes: 3 additions & 3 deletions jupyter/rocm/pytorch/ubi9-python-3.12/pylock.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2456,9 +2456,9 @@ wheels = [{ url = "https://files.pythonhosted.org/packages/be/9c/92789c596b8df83

[[packages]]
name = "odh-elyra"
version = "4.2.4"
sdist = { url = "https://files.pythonhosted.org/packages/39/58/9a76992bcd402f7eaf9a23fb164d56993db6c079d3fad67dc0a4df799d03/odh_elyra-4.2.4.tar.gz", upload-time = 2025-09-11T18:09:43Z, size = 2155769, hashes = { sha256 = "9563849a41e3d5f45f4923a00d9e6480a9d53787e076d6369248f880795d2130" } }
wheels = [{ url = "https://files.pythonhosted.org/packages/f9/48/b852bc3107a6d92c1c6c63b0fa6255897e515df6948778e521f603f59e75/odh_elyra-4.2.4-py3-none-any.whl", upload-time = 2025-09-11T18:09:41Z, size = 4317667, hashes = { sha256 = "227b1a35a3eef8a02409e3aa5081c3322bcd30cd8939b77575dfce397f3fa42b" } }]
version = "4.3.1"
sdist = { url = "https://files.pythonhosted.org/packages/f7/f4/6be53ca16125e7d3ca6cb86aa8f001ebe200977e429bedb4b6467e692328/odh_elyra-4.3.1.tar.gz", upload-time = 2025-10-09T14:53:22Z, size = 2196705, hashes = { sha256 = "522c85c647d97d3a5317389dc106452fdebf48f95ecbdea3db0aef1b43192475" } }
wheels = [{ url = "https://files.pythonhosted.org/packages/b3/7a/009a5eb3e872330c22155928ffd3dcb8f139385b7de2a7540cad714be9bd/odh_elyra-4.3.1-py3-none-any.whl", upload-time = 2025-10-09T14:53:20Z, size = 4352762, hashes = { sha256 = "ae1008e0329e14d45a4c31b5436b00e732dcaa201cae15adb7f502249bf9d7a8" } }]

[[packages]]
name = "odh-jupyter-trash-cleanup"
Expand Down
2 changes: 1 addition & 1 deletion jupyter/rocm/pytorch/ubi9-python-3.12/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ dependencies = [
"mysql-connector-python~=9.4.0",

# JupyterLab packages
"odh-elyra==4.2.4",
"odh-elyra==4.3.1",
"odh-jupyter-trash-cleanup==0.1.1",

"jupyterlab==4.4.7",
Expand Down
6 changes: 3 additions & 3 deletions jupyter/rocm/tensorflow/ubi9-python-3.12/pylock.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2508,9 +2508,9 @@ wheels = [{ url = "https://files.pythonhosted.org/packages/be/9c/92789c596b8df83

[[packages]]
name = "odh-elyra"
version = "4.2.4"
sdist = { url = "https://files.pythonhosted.org/packages/39/58/9a76992bcd402f7eaf9a23fb164d56993db6c079d3fad67dc0a4df799d03/odh_elyra-4.2.4.tar.gz", upload-time = 2025-09-11T18:09:43Z, size = 2155769, hashes = { sha256 = "9563849a41e3d5f45f4923a00d9e6480a9d53787e076d6369248f880795d2130" } }
wheels = [{ url = "https://files.pythonhosted.org/packages/f9/48/b852bc3107a6d92c1c6c63b0fa6255897e515df6948778e521f603f59e75/odh_elyra-4.2.4-py3-none-any.whl", upload-time = 2025-09-11T18:09:41Z, size = 4317667, hashes = { sha256 = "227b1a35a3eef8a02409e3aa5081c3322bcd30cd8939b77575dfce397f3fa42b" } }]
version = "4.3.1"
sdist = { url = "https://files.pythonhosted.org/packages/f7/f4/6be53ca16125e7d3ca6cb86aa8f001ebe200977e429bedb4b6467e692328/odh_elyra-4.3.1.tar.gz", upload-time = 2025-10-09T14:53:22Z, size = 2196705, hashes = { sha256 = "522c85c647d97d3a5317389dc106452fdebf48f95ecbdea3db0aef1b43192475" } }
wheels = [{ url = "https://files.pythonhosted.org/packages/b3/7a/009a5eb3e872330c22155928ffd3dcb8f139385b7de2a7540cad714be9bd/odh_elyra-4.3.1-py3-none-any.whl", upload-time = 2025-10-09T14:53:20Z, size = 4352762, hashes = { sha256 = "ae1008e0329e14d45a4c31b5436b00e732dcaa201cae15adb7f502249bf9d7a8" } }]

[[packages]]
name = "odh-jupyter-trash-cleanup"
Expand Down
2 changes: 1 addition & 1 deletion jupyter/rocm/tensorflow/ubi9-python-3.12/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ dependencies = [
"mysql-connector-python~=9.4.0",

# JupyterLab packages
"odh-elyra==4.2.4",
"odh-elyra==4.3.1",
"odh-jupyter-trash-cleanup==0.1.1",

"jupyterlab==4.4.7",
Expand Down
6 changes: 3 additions & 3 deletions jupyter/tensorflow/ubi9-python-3.12/pylock.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2619,9 +2619,9 @@ wheels = [{ url = "https://files.pythonhosted.org/packages/be/9c/92789c596b8df83

[[packages]]
name = "odh-elyra"
version = "4.2.4"
sdist = { url = "https://files.pythonhosted.org/packages/39/58/9a76992bcd402f7eaf9a23fb164d56993db6c079d3fad67dc0a4df799d03/odh_elyra-4.2.4.tar.gz", upload-time = 2025-09-11T18:09:43Z, size = 2155769, hashes = { sha256 = "9563849a41e3d5f45f4923a00d9e6480a9d53787e076d6369248f880795d2130" } }
wheels = [{ url = "https://files.pythonhosted.org/packages/f9/48/b852bc3107a6d92c1c6c63b0fa6255897e515df6948778e521f603f59e75/odh_elyra-4.2.4-py3-none-any.whl", upload-time = 2025-09-11T18:09:41Z, size = 4317667, hashes = { sha256 = "227b1a35a3eef8a02409e3aa5081c3322bcd30cd8939b77575dfce397f3fa42b" } }]
version = "4.3.1"
sdist = { url = "https://files.pythonhosted.org/packages/f7/f4/6be53ca16125e7d3ca6cb86aa8f001ebe200977e429bedb4b6467e692328/odh_elyra-4.3.1.tar.gz", upload-time = 2025-10-09T14:53:22Z, size = 2196705, hashes = { sha256 = "522c85c647d97d3a5317389dc106452fdebf48f95ecbdea3db0aef1b43192475" } }
wheels = [{ url = "https://files.pythonhosted.org/packages/b3/7a/009a5eb3e872330c22155928ffd3dcb8f139385b7de2a7540cad714be9bd/odh_elyra-4.3.1-py3-none-any.whl", upload-time = 2025-10-09T14:53:20Z, size = 4352762, hashes = { sha256 = "ae1008e0329e14d45a4c31b5436b00e732dcaa201cae15adb7f502249bf9d7a8" } }]

[[packages]]
name = "odh-jupyter-trash-cleanup"
Expand Down
2 changes: 1 addition & 1 deletion jupyter/tensorflow/ubi9-python-3.12/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ dependencies = [
"mysql-connector-python~=9.4.0",

# JupyterLab packages
"odh-elyra==4.2.4",
"odh-elyra==4.3.1",
"odh-jupyter-trash-cleanup==0.1.1",

"jupyterlab==4.4.7",
Expand Down
6 changes: 3 additions & 3 deletions jupyter/trustyai/ubi9-python-3.12/pylock.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2319,9 +2319,9 @@ wheels = [{ url = "https://files.pythonhosted.org/packages/be/9c/92789c596b8df83

[[packages]]
name = "odh-elyra"
version = "4.2.4"
sdist = { url = "https://files.pythonhosted.org/packages/39/58/9a76992bcd402f7eaf9a23fb164d56993db6c079d3fad67dc0a4df799d03/odh_elyra-4.2.4.tar.gz", upload-time = 2025-09-11T18:09:43Z, size = 2155769, hashes = { sha256 = "9563849a41e3d5f45f4923a00d9e6480a9d53787e076d6369248f880795d2130" } }
wheels = [{ url = "https://files.pythonhosted.org/packages/f9/48/b852bc3107a6d92c1c6c63b0fa6255897e515df6948778e521f603f59e75/odh_elyra-4.2.4-py3-none-any.whl", upload-time = 2025-09-11T18:09:41Z, size = 4317667, hashes = { sha256 = "227b1a35a3eef8a02409e3aa5081c3322bcd30cd8939b77575dfce397f3fa42b" } }]
version = "4.3.1"
sdist = { url = "https://files.pythonhosted.org/packages/f7/f4/6be53ca16125e7d3ca6cb86aa8f001ebe200977e429bedb4b6467e692328/odh_elyra-4.3.1.tar.gz", upload-time = 2025-10-09T14:53:22Z, size = 2196705, hashes = { sha256 = "522c85c647d97d3a5317389dc106452fdebf48f95ecbdea3db0aef1b43192475" } }
wheels = [{ url = "https://files.pythonhosted.org/packages/b3/7a/009a5eb3e872330c22155928ffd3dcb8f139385b7de2a7540cad714be9bd/odh_elyra-4.3.1-py3-none-any.whl", upload-time = 2025-10-09T14:53:20Z, size = 4352762, hashes = { sha256 = "ae1008e0329e14d45a4c31b5436b00e732dcaa201cae15adb7f502249bf9d7a8" } }]

[[packages]]
name = "odh-jupyter-trash-cleanup"
Expand Down
2 changes: 1 addition & 1 deletion jupyter/trustyai/ubi9-python-3.12/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ dependencies = [
"mysql-connector-python~=9.4.0",

# JupyterLab packages
"odh-elyra==4.2.4",
"odh-elyra==4.3.1",
"odh-jupyter-trash-cleanup==0.1.1",

"jupyterlab==4.4.7",
Expand Down
Loading
Loading