Skip to content

RHAIENG-2509: chore(pyproject.toml): create Python metaprojects in odh-io/notebooks to group deps#2796

Merged
jiridanek merged 1 commit intoopendatahub-io:mainfrom
jiridanek:jd_subproject_deps_update_trusty
Mar 31, 2026
Merged

RHAIENG-2509: chore(pyproject.toml): create Python metaprojects in odh-io/notebooks to group deps#2796
jiridanek merged 1 commit intoopendatahub-io:mainfrom
jiridanek:jd_subproject_deps_update_trusty

Conversation

@jiridanek
Copy link
Copy Markdown
Member

@jiridanek jiridanek commented Dec 22, 2025

https://redhat.atlassian.net/browse/RHAIENG-2509

Follows-up on

Description

Should we move kfp and codeflare-sdk out of odh-notebooks-meta-workbench-datascience-deps into the new jupyterlab-datascience subproject, or keep existing subprojects completely untouched and only add new
ones?

❯ 1. Additive only (Recommended)
Only create 3 new subprojects (db-connectors, jupyterlab, jupyterlab-datascience) without modifying existing meta-packages. Simpler, lower risk.
2. Refactor existing too
Also reorganize existing subprojects (move kfp/codeflare-sdk, merge workbench+runtime datascience). Cleaner end state but larger change.
3. Type something.

 Here is Claude's plan:                                                                                                                                                                                          
╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌
 Dependency Subproject Refactoring (salvaging PR #2795/#2796)                                                                                                                                                    
                                                                                                                                                                                                                 
 Context                                                                                                                                                                                                         

 Duplicated dependency blocks are repeated across 13-16 pyproject.toml files:
 - DB connectors (pymongo, psycopg, pyodbc, mysql-connector-python) — repeated in 13 files
 - JupyterLab core (jupyterlab, jupyter-server, 5 extensions) — repeated in 7 jupyter/ files
 - JupyterLab datascience extensions (odh-elyra, jupyter-bokeh, etc.) — repeated in 6 jupyter/ files

 Approach: additive only — keep existing 4 subprojects untouched, create 3 new ones.

 New Subprojects (all unpinned, package = false)

 1. dependencies/odh-notebooks-meta-db-connectors-deps/pyproject.toml

 - pymongo
 - psycopg
 - pyodbc
 - mysql-connector-python

 2. dependencies/odh-notebooks-meta-jupyterlab-deps/pyproject.toml

 - jupyterlab
 - jupyter-server
 - jupyter-server-proxy
 - jupyter-server-terminals
 - jupyterlab-git
 - nbdime
 - nbgitpuller
 - odh-jupyter-trash-cleanup

 3. dependencies/odh-notebooks-meta-jupyterlab-datascience-deps/pyproject.toml

 - odh-elyra
 - jupyter-bokeh
 - jupyterlab-lsp
 - jupyterlab-widgets
 - jupyter-resource-usage

 Files to Modify

 Jupyter images — add subproject refs, remove inlined deps:

 ┌───────────────────────────────────────────────────────────────┬──────────────────────────────────────────────────────────────────┬────────────────────────────────────────────────┐
 │                             File                              │                         Add subprojects                          │               Remove inline deps               │
 ├───────────────────────────────────────────────────────────────┼──────────────────────────────────────────────────────────────────┼────────────────────────────────────────────────┤
 │ jupyter/minimal/ubi9-python-3.12/pyproject.toml               │ jupyterlab-deps                                                  │ 7 JupyterLab lines + odh-jupyter-trash-cleanup │
 ├───────────────────────────────────────────────────────────────┼──────────────────────────────────────────────────────────────────┼────────────────────────────────────────────────┤
 │ jupyter/datascience/ubi9-python-3.12/pyproject.toml           │ jupyterlab-deps, jupyterlab-datascience-deps, db-connectors-deps │ 13 JupyterLab lines + 4 DB lines               │
 ├───────────────────────────────────────────────────────────────┼──────────────────────────────────────────────────────────────────┼────────────────────────────────────────────────┤
 │ jupyter/pytorch/ubi9-python-3.12/pyproject.toml               │ same                                                             │ same                                           │
 ├───────────────────────────────────────────────────────────────┼──────────────────────────────────────────────────────────────────┼────────────────────────────────────────────────┤
 │ jupyter/pytorch+llmcompressor/ubi9-python-3.12/pyproject.toml │ same                                                             │ same                                           │
 ├───────────────────────────────────────────────────────────────┼──────────────────────────────────────────────────────────────────┼────────────────────────────────────────────────┤
 │ jupyter/rocm/pytorch/ubi9-python-3.12/pyproject.toml          │ same                                                             │ same                                           │
 ├───────────────────────────────────────────────────────────────┼──────────────────────────────────────────────────────────────────┼────────────────────────────────────────────────┤
 │ jupyter/rocm/tensorflow/ubi9-python-3.12/pyproject.toml       │ same                                                             │ same                                           │
 ├───────────────────────────────────────────────────────────────┼──────────────────────────────────────────────────────────────────┼────────────────────────────────────────────────┤
 │ jupyter/tensorflow/ubi9-python-3.12/pyproject.toml            │ same                                                             │ same                                           │
 ├───────────────────────────────────────────────────────────────┼──────────────────────────────────────────────────────────────────┼────────────────────────────────────────────────┤
 │ jupyter/trustyai/ubi9-python-3.12/pyproject.toml              │ same                                                             │ same                                           │
 └───────────────────────────────────────────────────────────────┴──────────────────────────────────────────────────────────────────┴────────────────────────────────────────────────┘

 Runtime images — add db-connectors-deps, remove inlined DB deps:

 ┌────────────────────────────────────────────────────────────────┬────────────────────┬────────────────────┐
 │                              File                              │  Add subprojects   │ Remove inline deps │
 ├────────────────────────────────────────────────────────────────┼────────────────────┼────────────────────┤
 │ runtimes/datascience/ubi9-python-3.12/pyproject.toml           │ db-connectors-deps │ 4 DB lines         │
 ├────────────────────────────────────────────────────────────────┼────────────────────┼────────────────────┤
 │ runtimes/pytorch/ubi9-python-3.12/pyproject.toml               │ db-connectors-deps │ 4 DB lines         │
 ├────────────────────────────────────────────────────────────────┼────────────────────┼────────────────────┤
 │ runtimes/pytorch+llmcompressor/ubi9-python-3.12/pyproject.toml │ db-connectors-deps │ 4 DB lines         │
 ├────────────────────────────────────────────────────────────────┼────────────────────┼────────────────────┤
 │ runtimes/rocm-pytorch/ubi9-python-3.12/pyproject.toml          │ db-connectors-deps │ 4 DB lines         │
 ├────────────────────────────────────────────────────────────────┼────────────────────┼────────────────────┤
 │ runtimes/rocm-tensorflow/ubi9-python-3.12/pyproject.toml       │ db-connectors-deps │ 4 DB lines         │
 ├────────────────────────────────────────────────────────────────┼────────────────────┼────────────────────┤
 │ runtimes/tensorflow/ubi9-python-3.12/pyproject.toml            │ db-connectors-deps │ 4 DB lines         │
 └────────────────────────────────────────────────────────────────┴────────────────────┴────────────────────┘

 No change:

 - runtimes/minimal — no DB connectors, no JupyterLab
 - codeserver/ — no DB connectors, no JupyterLab
 - rstudio/* — only wheel+setuptools

 Infrastructure:

 - scripts/pylocks_generator.py — add 3 names to NO_EMIT_PACKAGES tuple (line 92)
 - tests/test_main.py — no change needed (is_subproject_metapackage already matches odh-notebooks-meta-*-deps)

 Verification

 1. gmake refresh-lock-files — regenerate all lock files
 2. gmake test — run tests

How Has This Been Tested?

⏺ Net reduction of ~100 lines. All gmake test tests pass, all lock files regenerate cleanly without unexpected diffs. The refactoring is complete:

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

  • New Features

    • Introduced three meta-dependency packages to centralize DB connectors and JupyterLab (core + datascience) dependencies.
  • Chores

    • Replaced many direct package pins across notebooks and runtimes with the new meta-dependencies and added local source mappings.
    • Updated lockfile generation metadata so the new meta-deps are excluded from emitted lock outputs.

@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci bot commented Dec 22, 2025

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Dec 22, 2025

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Central YAML (inherited), Repository UI (inherited)

Review profile: CHILL

Plan: Pro

Run ID: 260de350-4ccf-4eb1-b6f0-77071604c1ee

📥 Commits

Reviewing files that changed from the base of the PR and between 4c76a36 and c713f9a.

📒 Files selected for processing (40)
  • codeserver/ubi9-python-3.12/uv.lock.d/pylock.cpu.toml
  • dependencies/odh-notebooks-meta-db-connectors-deps/pyproject.toml
  • dependencies/odh-notebooks-meta-jupyterlab-datascience-deps/pyproject.toml
  • dependencies/odh-notebooks-meta-jupyterlab-deps/pyproject.toml
  • jupyter/datascience/ubi9-python-3.12/pyproject.toml
  • jupyter/datascience/ubi9-python-3.12/uv.lock.d/pylock.cpu.toml
  • jupyter/minimal/ubi9-python-3.12/pyproject.toml
  • jupyter/minimal/ubi9-python-3.12/uv.lock.d/pylock.cpu.toml
  • jupyter/minimal/ubi9-python-3.12/uv.lock.d/pylock.cuda.toml
  • jupyter/minimal/ubi9-python-3.12/uv.lock.d/pylock.rocm.toml
  • jupyter/pytorch+llmcompressor/ubi9-python-3.12/pyproject.toml
  • jupyter/pytorch+llmcompressor/ubi9-python-3.12/uv.lock.d/pylock.cuda.toml
  • jupyter/pytorch/ubi9-python-3.12/pyproject.toml
  • jupyter/pytorch/ubi9-python-3.12/uv.lock.d/pylock.cuda.toml
  • jupyter/rocm/pytorch/ubi9-python-3.12/pyproject.toml
  • jupyter/rocm/pytorch/ubi9-python-3.12/uv.lock.d/pylock.rocm.toml
  • jupyter/rocm/tensorflow/ubi9-python-3.12/pylock.toml
  • jupyter/rocm/tensorflow/ubi9-python-3.12/pyproject.toml
  • jupyter/tensorflow/ubi9-python-3.12/pyproject.toml
  • jupyter/tensorflow/ubi9-python-3.12/uv.lock.d/pylock.cuda.toml
  • jupyter/trustyai/ubi9-python-3.12/pyproject.toml
  • jupyter/trustyai/ubi9-python-3.12/uv.lock.d/pylock.cpu.toml
  • rstudio/c9s-python-3.12/uv.lock.d/pylock.cpu.toml
  • rstudio/c9s-python-3.12/uv.lock.d/pylock.cuda.toml
  • rstudio/rhel9-python-3.12/uv.lock.d/pylock.cpu.toml
  • rstudio/rhel9-python-3.12/uv.lock.d/pylock.cuda.toml
  • runtimes/datascience/ubi9-python-3.12/pyproject.toml
  • runtimes/datascience/ubi9-python-3.12/uv.lock.d/pylock.cpu.toml
  • runtimes/minimal/ubi9-python-3.12/uv.lock.d/pylock.cpu.toml
  • runtimes/pytorch+llmcompressor/ubi9-python-3.12/pyproject.toml
  • runtimes/pytorch+llmcompressor/ubi9-python-3.12/uv.lock.d/pylock.cuda.toml
  • runtimes/pytorch/ubi9-python-3.12/pyproject.toml
  • runtimes/pytorch/ubi9-python-3.12/uv.lock.d/pylock.cuda.toml
  • runtimes/rocm-pytorch/ubi9-python-3.12/pyproject.toml
  • runtimes/rocm-pytorch/ubi9-python-3.12/uv.lock.d/pylock.rocm.toml
  • runtimes/rocm-tensorflow/ubi9-python-3.12/pylock.toml
  • runtimes/rocm-tensorflow/ubi9-python-3.12/pyproject.toml
  • runtimes/tensorflow/ubi9-python-3.12/pyproject.toml
  • runtimes/tensorflow/ubi9-python-3.12/uv.lock.d/pylock.cuda.toml
  • scripts/pylocks_generator.py

Cache: Disabled due to data retention organization setting

Knowledge base: Disabled due to data retention organization setting

🔥 Files not summarized due to errors (2)
  • runtimes/rocm-tensorflow/ubi9-python-3.12/pylock.toml: Server error: no LLM provider could handle the message
  • jupyter/rocm/tensorflow/ubi9-python-3.12/pylock.toml: Server error: no LLM provider could handle the message

📝 Walkthrough

Walkthrough

Adds three new meta-dependency projects under dependencies/: odh-notebooks-meta-db-connectors-deps, odh-notebooks-meta-jupyterlab-deps, and odh-notebooks-meta-jupyterlab-datascience-deps (each with pyproject.toml). Multiple notebook, runtime, and rstudio pyproject.toml files replace direct DB-connector and Jupyter-related package entries with those three meta-dependencies and add corresponding local [tool.uv.sources] path mappings. Numerous autogenerated uv lockfile header comments were updated (changed --no-emit-package lists and advanced --exclude-newer timestamps). scripts/pylocks_generator.py was updated to include the three new packages in NO_EMIT_PACKAGES.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The PR title uses imperative mood with a JIRA ticket reference and follows conventional commit format.
Description check ✅ Passed The PR description includes a detailed plan with files to modify, new subprojects defined, and testing confirmation. However, the testing instructions section under merge criteria is unchecked, and the PR appears to be stale/obsolete based on author's own comments.
Branch Prefix Policy ✅ Passed PR title begins with JIRA reference 'RHAIENG-2509:' which is explicitly permitted and exempted from branch prefix validation on main branch.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


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 Dec 22, 2025
@jiridanek jiridanek force-pushed the jd_subproject_deps_update_trusty branch from 2c9caeb to 92fbeb9 Compare February 14, 2026 19:35
@openshift-ci openshift-ci bot added size/xxl and removed size/xxl labels Feb 14, 2026
@jiridanek
Copy link
Copy Markdown
Member Author

⏺ Here's my analysis of PR #2796:

What PR #2796 intended to do

It's a follow-up to PR #2795 (both by you, both draft). Together they aimed to:

  1. Refactor dependency management into modular subprojects — replace the existing monolithic odh-notebooks-meta-*-deps packages with finer-grained subprojects under dependencies/:
    - base (wheel, setuptools)
    - jupyterlab (jupyterlab, jupyter-server, extensions)
    - jupyterlab-datascience (odh-elyra, kfp, codeflare-sdk)
    - datascience (boto3, numpy, pandas, scikit-learn, etc.)
    - db-connectors (pymongo, psycopg, pyodbc, mysql)
    - elyra-runtime (papermill, minio, nbclient, etc.)
  2. PR RHAIENG-2509: chore(pyproject.toml): create Python metaprojects in odh-io/notebooks to group deps #2796 specifically added the TrustyAI-related changes on top of RHAIENG-2509: chore(uv): implement the dependency groups from the original POC #2795:
    - Updated trustyai~=0.6.3 (from 0.6.2), which resolved numpy/pandas version conflicts that previously required overrides
    - Updated manifest imagestreams for trustyai and tensorflow (numpy 1.26→2.3, pandas 1.5→2.3)
    - Updated tests to handle the new subproject naming (notebooks--deps instead of odh-notebooks-meta--deps)

Should it be salvaged?

No, it's obsolete. Here's why:

@jiridanek jiridanek changed the title update trusty RHAIENG-2509: chore(pyproject.toml): create Python metaprojects in odh-io/notebooks to group deps Mar 31, 2026
@openshift-ci openshift-ci bot added size/xxl and removed size/xxl labels Mar 31, 2026
@jiridanek jiridanek force-pushed the jd_subproject_deps_update_trusty branch from 92fbeb9 to 9dd7571 Compare March 31, 2026 09:10
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Mar 31, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 3.32%. Comparing base (0ff26fa) to head (c713f9a).
✅ All tests successful. No failed tests found.

Additional details and impacted files

Impacted file tree graph

@@          Coverage Diff          @@
##            main   #2796   +/-   ##
=====================================
  Coverage   3.32%   3.32%           
=====================================
  Files         31      31           
  Lines       3550    3550           
  Branches     569     569           
=====================================
  Hits         118     118           
  Misses      3430    3430           
  Partials       2       2           
Flag Coverage Δ
python 3.32% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
scripts/pylocks_generator.py 26.83% <ø> (ø)

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0ff26fa...c713f9a. Read the comment docs.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@openshift-ci openshift-ci bot added size/l and removed size/l labels Mar 31, 2026
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

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 (6)
dependencies/odh-notebooks-meta-db-connectors-deps/pyproject.toml (1)

6-11: Unpinned dependencies increase supply chain risk.

All four database connectors lack version constraints. While lockfiles resolve actual versions, consider adding minimum version bounds (e.g., pymongo>=4.0) to prevent accidental resolution to incompatible or known-vulnerable releases during lock regeneration.

This is consistent with other meta-packages in this PR, so flagging as optional if this is intentional project policy.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@dependencies/odh-notebooks-meta-db-connectors-deps/pyproject.toml` around
lines 6 - 11, The dependency list in pyproject.toml currently declares database
connectors without version bounds ("pymongo", "psycopg", "pyodbc",
"mysql-connector-python"), which raises supply-chain risk; update each
dependency to include an appropriate minimum version constraint (for example
"pymongo>=4.0") or another project-consistent bound to prevent accidental
resolution to incompatible or vulnerable releases, ensuring the change is
applied where the dependencies array is defined and keeping the package names
("pymongo", "psycopg", "pyodbc", "mysql-connector-python") as the identifiers to
modify.
jupyter/rocm/pytorch/ubi9-python-3.12/uv.lock.d/pylock.rocm.toml (2)

2-2: Future --exclude-newer timestamp degrades reproducibility.

The --exclude-newer=2026-03-31T09:08:33Z flag is set to a future date. If this lock file is regenerated before March 31, 2026, different team members could resolve different dependency versions depending on when they regenerate, breaking deterministic builds.

Consider using the current date/time when generating lock files to ensure reproducible builds:

-#    uv pip compile pyproject.toml --output-file uv.lock.d/pylock.rocm.toml --format pylock.toml --generate-hashes --emit-index-url --python-version=3.12 --universal --no-annotate --no-emit-package odh-notebooks-meta-db-connectors-deps --no-emit-package odh-notebooks-meta-jupyterlab-datascience-deps --no-emit-package odh-notebooks-meta-jupyterlab-deps --no-emit-package odh-notebooks-meta-llmcompressor-deps --no-emit-package odh-notebooks-meta-runtime-elyra-deps --no-emit-package odh-notebooks-meta-runtime-datascience-deps --no-emit-package odh-notebooks-meta-workbench-datascience-deps --constraints ../../../../dependencies/cve-constraints.txt --exclude-newer=2026-03-31T09:08:33Z --default-index=https://console.redhat.com/api/pypi/public-rhai/rhoai/3.4/rocm6.4-ubi9/simple/?format=json --index=https://console.redhat.com/api/pypi/public-rhai/rhoai/3.4/rocm6.4-ubi9/simple/?format=json --index=https://console.redhat.com/api/pypi/public-rhai/rhoai/3.4/cpu-ubi9/simple/?format=json --index-strategy=unsafe-best-match
+#    uv pip compile pyproject.toml --output-file uv.lock.d/pylock.rocm.toml --format pylock.toml --generate-hashes --emit-index-url --python-version=3.12 --universal --no-annotate --no-emit-package odh-notebooks-meta-db-connectors-deps --no-emit-package odh-notebooks-meta-jupyterlab-datascience-deps --no-emit-package odh-notebooks-meta-jupyterlab-deps --no-emit-package odh-notebooks-meta-llmcompressor-deps --no-emit-package odh-notebooks-meta-runtime-elyra-deps --no-emit-package odh-notebooks-meta-runtime-datascience-deps --no-emit-package odh-notebooks-meta-workbench-datascience-deps --constraints ../../../../dependencies/cve-constraints.txt --exclude-newer=$(date -u +%Y-%m-%dT%H:%M:%SZ) --default-index=https://console.redhat.com/api/pypi/public-rhai/rhoai/3.4/rocm6.4-ubi9/simple/?format=json --index=https://console.redhat.com/api/pypi/public-rhai/rhoai/3.4/rocm6.4-ubi9/simple/?format=json --index=https://console.redhat.com/api/pypi/public-rhai/rhoai/3.4/cpu-ubi9/simple/?format=json --index-strategy=unsafe-best-match
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@jupyter/rocm/pytorch/ubi9-python-3.12/uv.lock.d/pylock.rocm.toml` at line 2,
The lock-generation command contains a future
--exclude-newer=2026-03-31T09:08:33Z which undermines reproducibility; update
the invocation that produces pylock.rocm.toml (the commented uv pip compile
command) to remove the hardcoded future timestamp or set --exclude-newer to the
current generation datetime (or omit the flag entirely) so regenerated lock
files resolve deterministically for all developers.

1716-1718: Clarify excluded packages comment.

The command specifies 7 --no-emit-package flags, but the comment lists only 4 packages. This discrepancy (likely because only 4 were actual dependencies) could confuse developers reviewing the lock file.

Consider revising the comment to clarify which packages were requested for exclusion vs. actually excluded:

 # The following packages were excluded from the output:
+# (from dependencies of this project)
 # odh-notebooks-meta-db-connectors-deps
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@jupyter/rocm/pytorch/ubi9-python-3.12/uv.lock.d/pylock.rocm.toml` around
lines 1716 - 1718, Update the comment block that currently lists "#
odh-notebooks-meta-db-connectors-deps", "#
odh-notebooks-meta-jupyterlab-datascience-deps", and "#
odh-notebooks-meta-jupyterlab-deps" to clarify the discrepancy between the seven
--no-emit-package flags used and the four packages shown: state which packages
were requested for exclusion (the seven --no-emit-package entries) and which
packages were actually excluded (the four listed), e.g., by appending a short
note like "requested exclusions: <list> — actually excluded: <list>" next to the
existing comment lines so reviewers can see both sets without changing
functionality.
runtimes/pytorch+llmcompressor/ubi9-python-3.12/uv.lock.d/pylock.cuda.toml (2)

1361-1361: Clarify excluded packages comment.

The command specifies 7 --no-emit-package flags, but the comment lists only 4 packages. This discrepancy (likely because only 4 were actual dependencies) could confuse developers reviewing the lock file.

Consider revising the comment to clarify which packages were requested for exclusion vs. actually excluded.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@runtimes/pytorch`+llmcompressor/ubi9-python-3.12/uv.lock.d/pylock.cuda.toml
at line 1361, The comment "# odh-notebooks-meta-db-connectors-deps" is ambiguous
given the command uses seven "--no-emit-package" flags but the comment only
names four packages; update the comment near that marker to explicitly state
"requested exclusions" versus "actually excluded" (or list both), and enumerate
the seven package names requested with "--no-emit-package" as well as the four
that were actually present/omitted, so reviewers can see the discrepancy; refer
to the occurrence of "--no-emit-package" flags in the same block to find where
to edit.

2-2: Future --exclude-newer timestamp degrades reproducibility.

The --exclude-newer=2026-03-31T09:08:33Z flag is set to a future date. If this lock file is regenerated before March 31, 2026, different team members could resolve different dependency versions depending on when they regenerate, breaking deterministic builds.

Consider using the current date/time when generating lock files to ensure reproducible builds.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@runtimes/pytorch`+llmcompressor/ubi9-python-3.12/uv.lock.d/pylock.cuda.toml
at line 2, Replace the hard-coded future timestamp in the pip-compile invocation
so lockfile generation uses the current date/time or a deterministic value;
specifically update the command line that includes the
--exclude-newer=2026-03-31T09:08:33Z flag in the pylock.cuda.toml entry (the
string "--exclude-newer=2026-03-31T09:08:33Z") to either remove the flag,
compute/insert the current ISO8601 timestamp at generation time, or replace it
with a reproducible policy (e.g., a fixed past cutoff), and regenerate the
lockfile so all contributors produce consistent dependency resolutions.
runtimes/tensorflow/ubi9-python-3.12/uv.lock.d/pylock.cuda.toml (1)

2-2: Lockfile generation includes unnecessary package exclusions.

The --no-emit-package flags for odh-notebooks-meta-db-connectors-deps, odh-notebooks-meta-jupyterlab-deps, and odh-notebooks-meta-jupyterlab-datascience-deps are redundant if this tensorflow runtime doesn't declare these packages as dependencies. Excluding packages that aren't dependencies adds cognitive overhead and suggests the lockfile generator applies a blanket policy rather than being context-aware.

Verify the corresponding pyproject.toml only excludes packages it actually depends on. If these meta-packages aren't dependencies here, remove the unnecessary exclusion flags from the generation command for this lockfile.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@runtimes/tensorflow/ubi9-python-3.12/uv.lock.d/pylock.cuda.toml` at line 2,
The lockfile generation command in pylock.cuda.toml includes redundant
--no-emit-package flags for odh-notebooks-meta-db-connectors-deps,
odh-notebooks-meta-jupyterlab-deps, and
odh-notebooks-meta-jupyterlab-datascience-deps; verify the runtime's
pyproject.toml dependencies and if those meta-packages are not listed, remove
those three --no-emit-package entries from the uv pip compile command in
pylock.cuda.toml so the generation only excludes packages that are actual
dependencies.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@jupyter/datascience/ubi9-python-3.12/pyproject.toml`:
- Around line 12-14: The pyproject entry is pulling three meta-dependency
projects ("odh-notebooks-meta-db-connectors-deps",
"odh-notebooks-meta-jupyterlab-deps",
"odh-notebooks-meta-jupyterlab-datascience-deps") that currently allow unbounded
transitive dependency ranges; update those meta projects to pin or add
conservative version bounds (==, ~=, <=/>= ranges as appropriate) for critical
runtime packages (e.g., pymongo, psycopg, jupyterlab) and then update this
pyproject to reference the resulting locked/meta versions, and re-run dependency
lock generation to ensure no unbounded specs remain (verify by checking each
meta project's project.dependencies for presence of comparison operators).

In `@jupyter/minimal/ubi9-python-3.12/uv.lock.d/pylock.cpu.toml`:
- Line 2: The lockfile generator is applying a global --no-emit-package list
instead of checking each project's declared dependencies; update
scripts/pylocks_generator.py so the routine that builds lock command arguments
(e.g., the function that currently assembles --no-emit-package flags, such as
generate_lock_args or build_lock_command) reads the target project's
pyproject.toml to get its declared dependencies and only adds --no-emit-package
for packages not present in that dependency set (implement a helper like
should_exclude_package(project_deps, package_name) that returns true only when
the package is not listed), and ensure for this lockfile the exclusion list
contains only odh-notebooks-meta-jupyterlab-deps.

---

Nitpick comments:
In `@dependencies/odh-notebooks-meta-db-connectors-deps/pyproject.toml`:
- Around line 6-11: The dependency list in pyproject.toml currently declares
database connectors without version bounds ("pymongo", "psycopg", "pyodbc",
"mysql-connector-python"), which raises supply-chain risk; update each
dependency to include an appropriate minimum version constraint (for example
"pymongo>=4.0") or another project-consistent bound to prevent accidental
resolution to incompatible or vulnerable releases, ensuring the change is
applied where the dependencies array is defined and keeping the package names
("pymongo", "psycopg", "pyodbc", "mysql-connector-python") as the identifiers to
modify.

In `@jupyter/rocm/pytorch/ubi9-python-3.12/uv.lock.d/pylock.rocm.toml`:
- Line 2: The lock-generation command contains a future
--exclude-newer=2026-03-31T09:08:33Z which undermines reproducibility; update
the invocation that produces pylock.rocm.toml (the commented uv pip compile
command) to remove the hardcoded future timestamp or set --exclude-newer to the
current generation datetime (or omit the flag entirely) so regenerated lock
files resolve deterministically for all developers.
- Around line 1716-1718: Update the comment block that currently lists "#
odh-notebooks-meta-db-connectors-deps", "#
odh-notebooks-meta-jupyterlab-datascience-deps", and "#
odh-notebooks-meta-jupyterlab-deps" to clarify the discrepancy between the seven
--no-emit-package flags used and the four packages shown: state which packages
were requested for exclusion (the seven --no-emit-package entries) and which
packages were actually excluded (the four listed), e.g., by appending a short
note like "requested exclusions: <list> — actually excluded: <list>" next to the
existing comment lines so reviewers can see both sets without changing
functionality.

In `@runtimes/pytorch`+llmcompressor/ubi9-python-3.12/uv.lock.d/pylock.cuda.toml:
- Line 1361: The comment "# odh-notebooks-meta-db-connectors-deps" is ambiguous
given the command uses seven "--no-emit-package" flags but the comment only
names four packages; update the comment near that marker to explicitly state
"requested exclusions" versus "actually excluded" (or list both), and enumerate
the seven package names requested with "--no-emit-package" as well as the four
that were actually present/omitted, so reviewers can see the discrepancy; refer
to the occurrence of "--no-emit-package" flags in the same block to find where
to edit.
- Line 2: Replace the hard-coded future timestamp in the pip-compile invocation
so lockfile generation uses the current date/time or a deterministic value;
specifically update the command line that includes the
--exclude-newer=2026-03-31T09:08:33Z flag in the pylock.cuda.toml entry (the
string "--exclude-newer=2026-03-31T09:08:33Z") to either remove the flag,
compute/insert the current ISO8601 timestamp at generation time, or replace it
with a reproducible policy (e.g., a fixed past cutoff), and regenerate the
lockfile so all contributors produce consistent dependency resolutions.

In `@runtimes/tensorflow/ubi9-python-3.12/uv.lock.d/pylock.cuda.toml`:
- Line 2: The lockfile generation command in pylock.cuda.toml includes redundant
--no-emit-package flags for odh-notebooks-meta-db-connectors-deps,
odh-notebooks-meta-jupyterlab-deps, and
odh-notebooks-meta-jupyterlab-datascience-deps; verify the runtime's
pyproject.toml dependencies and if those meta-packages are not listed, remove
those three --no-emit-package entries from the uv pip compile command in
pylock.cuda.toml so the generation only excludes packages that are actual
dependencies.
🪄 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: Repository YAML (base), Central YAML (inherited), Repository UI (inherited)

Review profile: CHILL

Plan: Pro

Run ID: a21036e7-9f95-4501-a5f3-9e99309e398a

📥 Commits

Reviewing files that changed from the base of the PR and between 9e6c710 and 9dd7571.

📒 Files selected for processing (40)
  • codeserver/ubi9-python-3.12/uv.lock.d/pylock.cpu.toml
  • dependencies/odh-notebooks-meta-db-connectors-deps/pyproject.toml
  • dependencies/odh-notebooks-meta-jupyterlab-datascience-deps/pyproject.toml
  • dependencies/odh-notebooks-meta-jupyterlab-deps/pyproject.toml
  • jupyter/datascience/ubi9-python-3.12/pyproject.toml
  • jupyter/datascience/ubi9-python-3.12/uv.lock.d/pylock.cpu.toml
  • jupyter/minimal/ubi9-python-3.12/pyproject.toml
  • jupyter/minimal/ubi9-python-3.12/uv.lock.d/pylock.cpu.toml
  • jupyter/minimal/ubi9-python-3.12/uv.lock.d/pylock.cuda.toml
  • jupyter/minimal/ubi9-python-3.12/uv.lock.d/pylock.rocm.toml
  • jupyter/pytorch+llmcompressor/ubi9-python-3.12/pyproject.toml
  • jupyter/pytorch+llmcompressor/ubi9-python-3.12/uv.lock.d/pylock.cuda.toml
  • jupyter/pytorch/ubi9-python-3.12/pyproject.toml
  • jupyter/pytorch/ubi9-python-3.12/uv.lock.d/pylock.cuda.toml
  • jupyter/rocm/pytorch/ubi9-python-3.12/pyproject.toml
  • jupyter/rocm/pytorch/ubi9-python-3.12/uv.lock.d/pylock.rocm.toml
  • jupyter/rocm/tensorflow/ubi9-python-3.12/pylock.toml
  • jupyter/rocm/tensorflow/ubi9-python-3.12/pyproject.toml
  • jupyter/tensorflow/ubi9-python-3.12/pyproject.toml
  • jupyter/tensorflow/ubi9-python-3.12/uv.lock.d/pylock.cuda.toml
  • jupyter/trustyai/ubi9-python-3.12/pyproject.toml
  • jupyter/trustyai/ubi9-python-3.12/uv.lock.d/pylock.cpu.toml
  • rstudio/c9s-python-3.12/uv.lock.d/pylock.cpu.toml
  • rstudio/c9s-python-3.12/uv.lock.d/pylock.cuda.toml
  • rstudio/rhel9-python-3.12/uv.lock.d/pylock.cpu.toml
  • rstudio/rhel9-python-3.12/uv.lock.d/pylock.cuda.toml
  • runtimes/datascience/ubi9-python-3.12/pyproject.toml
  • runtimes/datascience/ubi9-python-3.12/uv.lock.d/pylock.cpu.toml
  • runtimes/minimal/ubi9-python-3.12/uv.lock.d/pylock.cpu.toml
  • runtimes/pytorch+llmcompressor/ubi9-python-3.12/pyproject.toml
  • runtimes/pytorch+llmcompressor/ubi9-python-3.12/uv.lock.d/pylock.cuda.toml
  • runtimes/pytorch/ubi9-python-3.12/pyproject.toml
  • runtimes/pytorch/ubi9-python-3.12/uv.lock.d/pylock.cuda.toml
  • runtimes/rocm-pytorch/ubi9-python-3.12/pyproject.toml
  • runtimes/rocm-pytorch/ubi9-python-3.12/uv.lock.d/pylock.rocm.toml
  • runtimes/rocm-tensorflow/ubi9-python-3.12/pylock.toml
  • runtimes/rocm-tensorflow/ubi9-python-3.12/pyproject.toml
  • runtimes/tensorflow/ubi9-python-3.12/pyproject.toml
  • runtimes/tensorflow/ubi9-python-3.12/uv.lock.d/pylock.cuda.toml
  • scripts/pylocks_generator.py
👮 Files not reviewed due to content moderation or server errors (2)
  • jupyter/rocm/tensorflow/ubi9-python-3.12/pylock.toml
  • runtimes/rocm-tensorflow/ubi9-python-3.12/pylock.toml

@@ -1,5 +1,5 @@
# This file was autogenerated by uv via the following command:
# uv pip compile pyproject.toml --output-file uv.lock.d/pylock.cpu.toml --format pylock.toml --generate-hashes --emit-index-url --python-version=3.12 --universal --no-annotate --no-emit-package odh-notebooks-meta-llmcompressor-deps --no-emit-package odh-notebooks-meta-runtime-elyra-deps --no-emit-package odh-notebooks-meta-runtime-datascience-deps --no-emit-package odh-notebooks-meta-workbench-datascience-deps --constraints ../../../dependencies/cve-constraints.txt --exclude-newer=2026-03-31T07:52:14Z --default-index=https://console.redhat.com/api/pypi/public-rhai/rhoai/3.4/cpu-ubi9/simple/?format=json --index=https://console.redhat.com/api/pypi/public-rhai/rhoai/3.4/cpu-ubi9/simple/?format=json
# uv pip compile pyproject.toml --output-file uv.lock.d/pylock.cpu.toml --format pylock.toml --generate-hashes --emit-index-url --python-version=3.12 --universal --no-annotate --no-emit-package odh-notebooks-meta-db-connectors-deps --no-emit-package odh-notebooks-meta-jupyterlab-datascience-deps --no-emit-package odh-notebooks-meta-jupyterlab-deps --no-emit-package odh-notebooks-meta-llmcompressor-deps --no-emit-package odh-notebooks-meta-runtime-elyra-deps --no-emit-package odh-notebooks-meta-runtime-datascience-deps --no-emit-package odh-notebooks-meta-workbench-datascience-deps --constraints ../../../dependencies/cve-constraints.txt --exclude-newer=2026-03-31T09:08:33Z --default-index=https://console.redhat.com/api/pypi/public-rhai/rhoai/3.4/cpu-ubi9/simple/?format=json --index=https://console.redhat.com/api/pypi/public-rhai/rhoai/3.4/cpu-ubi9/simple/?format=json
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion | 🟠 Major

Lockfile excludes packages that are not declared dependencies.

The --no-emit-package flags include odh-notebooks-meta-db-connectors-deps and odh-notebooks-meta-jupyterlab-datascience-deps, but the corresponding pyproject.toml (see relevant code snippet) declares ONLY odh-notebooks-meta-jupyterlab-deps as a dependency. Excluding packages that aren't dependencies is unnecessary and indicates the lockfile generator applies a global exclusion list without verifying each project's actual dependencies.

Update the lockfile generation script (scripts/pylocks_generator.py) to apply --no-emit-package flags selectively based on each project's declared dependencies, rather than applying a blanket global exclusion list. For this specific lockfile, only odh-notebooks-meta-jupyterlab-deps should be excluded. As per coding guidelines, "Review priorities: ... Architectural issues and anti-patterns" — this blanket policy is an architectural issue in the build system.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@jupyter/minimal/ubi9-python-3.12/uv.lock.d/pylock.cpu.toml` at line 2, The
lockfile generator is applying a global --no-emit-package list instead of
checking each project's declared dependencies; update
scripts/pylocks_generator.py so the routine that builds lock command arguments
(e.g., the function that currently assembles --no-emit-package flags, such as
generate_lock_args or build_lock_command) reads the target project's
pyproject.toml to get its declared dependencies and only adds --no-emit-package
for packages not present in that dependency set (implement a helper like
should_exclude_package(project_deps, package_name) that returns true only when
the package is not listed), and ensure for this lockfile the exclusion list
contains only odh-notebooks-meta-jupyterlab-deps.

@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci bot commented Mar 31, 2026

[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 ysok 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

@jiridanek jiridanek force-pushed the jd_subproject_deps_update_trusty branch from 9dd7571 to 4c76a36 Compare March 31, 2026 11:03
@openshift-ci openshift-ci bot removed the lgtm label Mar 31, 2026
@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci bot commented Mar 31, 2026

New changes are detected. LGTM label has been removed.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@jupyter/tensorflow/ubi9-python-3.12/pyproject.toml`:
- Around line 18-20: The listed meta-package dependencies in pyproject.toml are
unpinned and allow transitive supply-chain drift; update the dependencies
declared in the three meta-package pyproject.toml files
(odh-notebooks-meta-db-connectors-deps, odh-notebooks-meta-jupyterlab-deps,
odh-notebooks-meta-jupyterlab-datascience-deps) to add explicit version bounds
(e.g., caret or ~= ranges or both lower and safe upper bounds) for each
transitive package (pymongo, psycopg, pyodbc, mysql-connector-python,
jupyterlab, jupyter-server, jupyter-server-proxy, jupyter-server-terminals,
jupyterlab-git, nbdime, nbgitpuller, odh-jupyter-trash-cleanup, odh-elyra,
jupyter-bokeh, jupyterlab-lsp, jupyterlab-widgets, jupyter-resource-usage); edit
the corresponding dependencies/odh-notebooks-meta-*/pyproject.toml files to
replace unversioned entries with the chosen bounded version specifiers and run
dependency lock regeneration to verify no unintended upgrades.
🪄 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: Repository YAML (base), Central YAML (inherited), Repository UI (inherited)

Review profile: CHILL

Plan: Pro

Run ID: 7b963470-708a-437f-bac0-ac82859002f0

📥 Commits

Reviewing files that changed from the base of the PR and between 9dd7571 and 4c76a36.

📒 Files selected for processing (40)
  • codeserver/ubi9-python-3.12/uv.lock.d/pylock.cpu.toml
  • dependencies/odh-notebooks-meta-db-connectors-deps/pyproject.toml
  • dependencies/odh-notebooks-meta-jupyterlab-datascience-deps/pyproject.toml
  • dependencies/odh-notebooks-meta-jupyterlab-deps/pyproject.toml
  • jupyter/datascience/ubi9-python-3.12/pyproject.toml
  • jupyter/datascience/ubi9-python-3.12/uv.lock.d/pylock.cpu.toml
  • jupyter/minimal/ubi9-python-3.12/pyproject.toml
  • jupyter/minimal/ubi9-python-3.12/uv.lock.d/pylock.cpu.toml
  • jupyter/minimal/ubi9-python-3.12/uv.lock.d/pylock.cuda.toml
  • jupyter/minimal/ubi9-python-3.12/uv.lock.d/pylock.rocm.toml
  • jupyter/pytorch+llmcompressor/ubi9-python-3.12/pyproject.toml
  • jupyter/pytorch+llmcompressor/ubi9-python-3.12/uv.lock.d/pylock.cuda.toml
  • jupyter/pytorch/ubi9-python-3.12/pyproject.toml
  • jupyter/pytorch/ubi9-python-3.12/uv.lock.d/pylock.cuda.toml
  • jupyter/rocm/pytorch/ubi9-python-3.12/pyproject.toml
  • jupyter/rocm/pytorch/ubi9-python-3.12/uv.lock.d/pylock.rocm.toml
  • jupyter/rocm/tensorflow/ubi9-python-3.12/pylock.toml
  • jupyter/rocm/tensorflow/ubi9-python-3.12/pyproject.toml
  • jupyter/tensorflow/ubi9-python-3.12/pyproject.toml
  • jupyter/tensorflow/ubi9-python-3.12/uv.lock.d/pylock.cuda.toml
  • jupyter/trustyai/ubi9-python-3.12/pyproject.toml
  • jupyter/trustyai/ubi9-python-3.12/uv.lock.d/pylock.cpu.toml
  • rstudio/c9s-python-3.12/uv.lock.d/pylock.cpu.toml
  • rstudio/c9s-python-3.12/uv.lock.d/pylock.cuda.toml
  • rstudio/rhel9-python-3.12/uv.lock.d/pylock.cpu.toml
  • rstudio/rhel9-python-3.12/uv.lock.d/pylock.cuda.toml
  • runtimes/datascience/ubi9-python-3.12/pyproject.toml
  • runtimes/datascience/ubi9-python-3.12/uv.lock.d/pylock.cpu.toml
  • runtimes/minimal/ubi9-python-3.12/uv.lock.d/pylock.cpu.toml
  • runtimes/pytorch+llmcompressor/ubi9-python-3.12/pyproject.toml
  • runtimes/pytorch+llmcompressor/ubi9-python-3.12/uv.lock.d/pylock.cuda.toml
  • runtimes/pytorch/ubi9-python-3.12/pyproject.toml
  • runtimes/pytorch/ubi9-python-3.12/uv.lock.d/pylock.cuda.toml
  • runtimes/rocm-pytorch/ubi9-python-3.12/pyproject.toml
  • runtimes/rocm-pytorch/ubi9-python-3.12/uv.lock.d/pylock.rocm.toml
  • runtimes/rocm-tensorflow/ubi9-python-3.12/pylock.toml
  • runtimes/rocm-tensorflow/ubi9-python-3.12/pyproject.toml
  • runtimes/tensorflow/ubi9-python-3.12/pyproject.toml
  • runtimes/tensorflow/ubi9-python-3.12/uv.lock.d/pylock.cuda.toml
  • scripts/pylocks_generator.py
✅ Files skipped from review due to trivial changes (16)
  • dependencies/odh-notebooks-meta-db-connectors-deps/pyproject.toml
  • jupyter/minimal/ubi9-python-3.12/pyproject.toml
  • rstudio/rhel9-python-3.12/uv.lock.d/pylock.cuda.toml
  • rstudio/rhel9-python-3.12/uv.lock.d/pylock.cpu.toml
  • runtimes/minimal/ubi9-python-3.12/uv.lock.d/pylock.cpu.toml
  • rstudio/c9s-python-3.12/uv.lock.d/pylock.cuda.toml
  • runtimes/pytorch/ubi9-python-3.12/pyproject.toml
  • runtimes/tensorflow/ubi9-python-3.12/pyproject.toml
  • jupyter/pytorch/ubi9-python-3.12/uv.lock.d/pylock.cuda.toml
  • dependencies/odh-notebooks-meta-jupyterlab-datascience-deps/pyproject.toml
  • dependencies/odh-notebooks-meta-jupyterlab-deps/pyproject.toml
  • rstudio/c9s-python-3.12/uv.lock.d/pylock.cpu.toml
  • jupyter/trustyai/ubi9-python-3.12/uv.lock.d/pylock.cpu.toml
  • runtimes/tensorflow/ubi9-python-3.12/uv.lock.d/pylock.cuda.toml
  • runtimes/datascience/ubi9-python-3.12/uv.lock.d/pylock.cpu.toml
  • jupyter/pytorch+llmcompressor/ubi9-python-3.12/uv.lock.d/pylock.cuda.toml
🚧 Files skipped from review as they are similar to previous changes (16)
  • runtimes/datascience/ubi9-python-3.12/pyproject.toml
  • jupyter/minimal/ubi9-python-3.12/uv.lock.d/pylock.rocm.toml
  • jupyter/rocm/tensorflow/ubi9-python-3.12/pyproject.toml
  • jupyter/trustyai/ubi9-python-3.12/pyproject.toml
  • jupyter/tensorflow/ubi9-python-3.12/uv.lock.d/pylock.cuda.toml
  • runtimes/rocm-tensorflow/ubi9-python-3.12/pyproject.toml
  • runtimes/pytorch/ubi9-python-3.12/uv.lock.d/pylock.cuda.toml
  • jupyter/minimal/ubi9-python-3.12/uv.lock.d/pylock.cuda.toml
  • runtimes/pytorch+llmcompressor/ubi9-python-3.12/pyproject.toml
  • runtimes/rocm-pytorch/ubi9-python-3.12/pyproject.toml
  • codeserver/ubi9-python-3.12/uv.lock.d/pylock.cpu.toml
  • jupyter/rocm/pytorch/ubi9-python-3.12/pyproject.toml
  • jupyter/pytorch/ubi9-python-3.12/pyproject.toml
  • jupyter/pytorch+llmcompressor/ubi9-python-3.12/pyproject.toml
  • runtimes/rocm-pytorch/ubi9-python-3.12/uv.lock.d/pylock.rocm.toml
  • runtimes/pytorch+llmcompressor/ubi9-python-3.12/uv.lock.d/pylock.cuda.toml
👮 Files not reviewed due to content moderation or server errors (2)
  • jupyter/rocm/tensorflow/ubi9-python-3.12/pylock.toml
  • runtimes/rocm-tensorflow/ubi9-python-3.12/pylock.toml

Comment on lines +18 to +20
"odh-notebooks-meta-db-connectors-deps",
"odh-notebooks-meta-jupyterlab-deps",
"odh-notebooks-meta-jupyterlab-datascience-deps",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Verify meta-project dependencies have version bounds
python3 - <<'PY'
import re, pathlib
targets = [
  "dependencies/odh-notebooks-meta-db-connectors-deps/pyproject.toml",
  "dependencies/odh-notebooks-meta-jupyterlab-deps/pyproject.toml",
  "dependencies/odh-notebooks-meta-jupyterlab-datascience-deps/pyproject.toml",
]
spec = re.compile(r'(===|==|~=|!=|<=|>=|<|>)')
for t in targets:
    p = pathlib.Path(t)
    if not p.exists():
        print(f"{t}: FILE NOT FOUND")
        continue
    content = p.read_text()
    # Simple extraction of dependencies section
    in_deps = False
    unbounded = []
    for line in content.splitlines():
        if line.strip().startswith("dependencies"):
            in_deps = True
            continue
        if in_deps:
            if line.strip().startswith("]"):
                break
            dep = line.strip().strip('",')
            if dep and not dep.startswith("#") and not spec.search(dep.split(';', 1)[0]):
                unbounded.append(dep)
    print(f"{t}")
    print(f"  {'UNBOUNDED: ' + ', '.join(unbounded) if unbounded else 'OK - all bounded'}")
PY

Repository: opendatahub-io/notebooks

Length of output: 583


Add version bounds to meta-package dependencies to mitigate supply-chain drift (CWE-1104).

Lines 18-20 reference meta-packages that declare unversioned transitive dependencies. Verification confirms all three have unbounded packages:

  • odh-notebooks-meta-db-connectors-deps: pymongo, psycopg, pyodbc, mysql-connector-python
  • odh-notebooks-meta-jupyterlab-deps: jupyterlab, jupyter-server, jupyter-server-proxy, jupyter-server-terminals, jupyterlab-git, nbdime, nbgitpuller, odh-jupyter-trash-cleanup
  • odh-notebooks-meta-jupyterlab-datascience-deps: odh-elyra, jupyter-bokeh, jupyterlab-lsp, jupyterlab-widgets, jupyter-resource-usage

A compromised or breaking upstream release propagates during lock regeneration. Add version constraints to dependencies/odh-notebooks-meta-*/pyproject.toml:

Example fix for db-connectors-deps
 dependencies = [
-    "pymongo",
-    "psycopg",
-    "pyodbc",
-    "mysql-connector-python",
+    "pymongo>=4.10,<5",
+    "psycopg>=3.2,<4",
+    "pyodbc>=5.0,<6",
+    "mysql-connector-python>=8.2,<9",
     ...
 ]
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@jupyter/tensorflow/ubi9-python-3.12/pyproject.toml` around lines 18 - 20, The
listed meta-package dependencies in pyproject.toml are unpinned and allow
transitive supply-chain drift; update the dependencies declared in the three
meta-package pyproject.toml files (odh-notebooks-meta-db-connectors-deps,
odh-notebooks-meta-jupyterlab-deps,
odh-notebooks-meta-jupyterlab-datascience-deps) to add explicit version bounds
(e.g., caret or ~= ranges or both lower and safe upper bounds) for each
transitive package (pymongo, psycopg, pyodbc, mysql-connector-python,
jupyterlab, jupyter-server, jupyter-server-proxy, jupyter-server-terminals,
jupyterlab-git, nbdime, nbgitpuller, odh-jupyter-trash-cleanup, odh-elyra,
jupyter-bokeh, jupyterlab-lsp, jupyterlab-widgets, jupyter-resource-usage); edit
the corresponding dependencies/odh-notebooks-meta-*/pyproject.toml files to
replace unversioned entries with the chosen bounded version specifiers and run
dependency lock regeneration to verify no unintended upgrades.

Copy link
Copy Markdown
Member

@atheo89 atheo89 left a comment

Choose a reason for hiding this comment

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

Thanks for re-initialize this work Jiri.
Let's move codeflare-sdk and feast as well under meta-jupyterlab-datascience-dep as well as under meta-runtime-datascience-dep

…cience deps into subprojects

Add 3 new dependency subprojects to reduce duplication across pyproject.toml files:
- odh-notebooks-meta-db-connectors-deps (pymongo, psycopg, pyodbc, mysql-connector-python)
- odh-notebooks-meta-jupyterlab-deps (jupyterlab, jupyter-server, extensions)
- odh-notebooks-meta-jupyterlab-datascience-deps (odh-elyra, jupyter-bokeh, jupyterlab-lsp, etc.)

Existing subprojects are unchanged. Updated 14 pyproject.toml files and regenerated lock files.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@jiridanek jiridanek force-pushed the jd_subproject_deps_update_trusty branch from 4c76a36 to c713f9a Compare March 31, 2026 11:29
@openshift-ci openshift-ci bot added size/l and removed size/l labels Mar 31, 2026
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Thanks for re-initialize this work Jiri.
Let's move codeflare-sdk and feast as well under meta-jupyterlab-datascience-dep as well as under meta-> runtime-datascience-dep

@coderabbitai yes, will make note about this in jira

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@jiridanek Acknowledged — thanks for tracking that. When the Jira item is picked up, codeflare-sdk and feast should be added to the dependencies list of both odh-notebooks-meta-jupyterlab-datascience-deps/pyproject.toml and whatever meta-package covers runtime-datascience-deps, with corresponding --no-emit-package entries added in scripts/pylocks_generator.py and the consuming pyproject.toml files updated to drop the direct pins.


📝 Learnings were identified and not saved (knowledge base disabled). Enable

@jiridanek jiridanek merged commit a372c6a into opendatahub-io:main Mar 31, 2026
44 of 97 checks passed
@openshift-ci openshift-ci bot added size/l and removed size/l labels Mar 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants