LCORE-2125: Upgrade rag-content to the RHOAI 3.4 index of Python packages#176
LCORE-2125: Upgrade rag-content to the RHOAI 3.4 index of Python packages#176syedriko wants to merge 8 commits into
Conversation
|
Caution Review failedFailed to post review comments WalkthroughAdds a profile-driven Konflux build flow (cpu/cuda), a new RHOAI-first dependency resolver, regenerated hashed/source/wheel lockfiles for RHOAI 3.4, updated Containerfiles for separate builder/runtime stages, and refreshed Tekton prefetch package allowlists and build-args paths. ChangesBuild Infrastructure Modernization
Sequence Diagram sequenceDiagram
participant User as Developer
participant KonfluxScript as scripts/konflux_requirements.sh
participant Resolver as scripts/konflux_resolve.py
participant RHOAI as RHOAI index (rhoai/3.4)
participant PyPI as PyPI
participant Tekton as .tekton/*.yaml
User->>KonfluxScript: run (profile=cpu|cuda)
KonfluxScript->>Resolver: invoke uv_resolve / patch files
Resolver->>RHOAI: prefer RHOAI wheels (find_best)
Resolver->>PyPI: fallback to PyPI sdist/wheel when needed
Resolver->>Tekton: patch "packages" allowlist in PipelineRun YAMLs
Estimated code review effort 🎯 5 (Critical) | ⏱️ ~120 minutes Possibly related PRs
Suggested reviewers
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 3
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
scripts/konflux_requirements.sh (1)
118-128:⚠️ Potential issue | 🟠 MajorKeep per-arch hash files generated or stop consuming them.
The script still leaves
requirements.hashes.wheel.cpu.x86_64.txtandrequirements.hashes.wheel.cpu.aarch64.txtreferenced by both Tekton configs, but this flow no longer writes them. Regenerating requirements can therefore leave stale arch-specific pins in files that hermetic prefetch still consumes. Either regenerate harmless placeholders or remove those files from bothrequirements_fileslists.🛠️ Minimal placeholder-generation fix
if grep -qE '^(torch|torchvision|triton)==' "$WHEEL_HASH_FILE"; then awk ' /^torch==|^torchvision==|^triton==/ { skip=1; next } skip && /^[ \t]/ { next } skip && /^[a-zA-Z0-9]/ { skip=0 } { print } ' "$WHEEL_HASH_FILE" > "${WHEEL_HASH_FILE}.strip" && mv "${WHEEL_HASH_FILE}.strip" "$WHEEL_HASH_FILE" fi +for _arch_hash_file in "$WHEEL_HASH_CPU_X86" "$WHEEL_HASH_CPU_AARCH"; do + printf '%s\n' "# No architecture-specific wheel pins; generated by konflux_requirements.sh." > "$_arch_hash_file" +done🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@scripts/konflux_requirements.sh` around lines 118 - 128, The script modifies WHEEL_HASH_FILE but no longer generates per-arch files (requirements.hashes.wheel.cpu.x86_64.txt and requirements.hashes.wheel.cpu.aarch64.txt) that Tekton recipes still reference; either ensure placeholder per-arch files are regenerated after the strip step (create harmless empty or header-only files named requirements.hashes.wheel.cpu.x86_64.txt and requirements.hashes.wheel.cpu.aarch64.txt when WHEEL_HASH_FILE is mutated), or remove those filenames from the Tekton requirements_files lists so they are not consumed; update scripts/konflux_requirements.sh to write the placeholders (using the WHEEL_HASH_FILE basename logic) or update the Tekton configs' requirements_files entries to stop referencing the arch-specific files, and make sure references to WHEEL_HASH_FILE and the two arch-specific filenames are consistent across both Tekton configs.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In @.tekton/rag-tool-push.yaml:
- Line 64: The binary.packages allowlist is missing "llama-stack-api" while
"llama-stack" and "llama-stack-client" are present and requirements include
llama-stack-api==0.5.0; update the "packages" comma-separated string in the
binary.packages entry (the same list shown in the diff) to include
"llama-stack-api" and apply the same change in the peer pipeline config that has
an identical allowlist (the other .tekton rag-tool file), ensuring the package
name is added exactly as "llama-stack-api".
In `@requirements-build.txt`:
- Around line 23-33: The build requirements file contains conflicting duplicate
pins (e.g., hatchling and setuptools) produced by pip-compile; fix this by
resolving the source dependency conflicts in your
requirements.source.txt.build—identify where hatchling and setuptools are
required with different versions (direct or transitive), choose a single
compatible version (or add an explicit constraint/compatibility marker) in
requirements.source.txt.build, then re-run pip-compile to regenerate
requirements-build.txt so it contains a single pinned entry per package.
In `@requirements.overrides.txt`:
- Around line 21-22: The requirements override pins for torch and torchvision
violate pyproject.toml constraints: change the pinned versions in
requirements.overrides (currently "torch==2.10.0" and "torchvision==0.25.0") to
versions that respect the upper bounds specified in pyproject.toml (e.g.,
upgrade to allowed ranges such as "torch>=2.9.0,<2.10.0" and
"torchvision>=0.24.0,<0.25.0") or alternatively update pyproject.toml to
explicitly allow the newer exact versions; ensure consistency between the
override entries for "torch" and "torchvision" and the version ranges declared
in pyproject.toml.
---
Outside diff comments:
In `@scripts/konflux_requirements.sh`:
- Around line 118-128: The script modifies WHEEL_HASH_FILE but no longer
generates per-arch files (requirements.hashes.wheel.cpu.x86_64.txt and
requirements.hashes.wheel.cpu.aarch64.txt) that Tekton recipes still reference;
either ensure placeholder per-arch files are regenerated after the strip step
(create harmless empty or header-only files named
requirements.hashes.wheel.cpu.x86_64.txt and
requirements.hashes.wheel.cpu.aarch64.txt when WHEEL_HASH_FILE is mutated), or
remove those filenames from the Tekton requirements_files lists so they are not
consumed; update scripts/konflux_requirements.sh to write the placeholders
(using the WHEEL_HASH_FILE basename logic) or update the Tekton configs'
requirements_files entries to stop referencing the arch-specific files, and make
sure references to WHEEL_HASH_FILE and the two arch-specific filenames are
consistent across both Tekton configs.
🪄 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: Pro
Run ID: ac2f76b9-682d-4dfd-a7cf-6bd2aa5eca09
⛔ Files ignored due to path filters (1)
uv.lockis excluded by!**/*.lock
📒 Files selected for processing (11)
.tekton/rag-tool-pull-request.yaml.tekton/rag-tool-push.yamlREADME.mdbuild-args-konflux.confpyproject.tomlrequirements-build.txtrequirements.hashes.source.txtrequirements.hashes.wheel.pypi.txtrequirements.hashes.wheel.txtrequirements.overrides.txtscripts/konflux_requirements.sh
| hatch-vcs==0.5.0 | ||
| # via | ||
| # attrs | ||
| # chardet | ||
| # filelock | ||
| # fsspec | ||
| # platformdirs | ||
| # via filelock | ||
| hatchling==1.26.3 | ||
| # via | ||
| # hatch-fancy-pypi-readme | ||
| # llama-stack-client | ||
| # openai | ||
| hatchling==1.29.0 | ||
| # via | ||
| # attrs | ||
| # banks | ||
| # chardet | ||
| # expandvars | ||
| # filelock | ||
| # fsspec | ||
| # griffe | ||
| # griffecli | ||
| # griffelib | ||
| # hatch-fancy-pypi-readme | ||
| # hatch-vcs |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Detect duplicate pinned package names in requirements-build.txt.
set -euo pipefail
python - <<'PY'
import re
from collections import defaultdict
fname = "requirements-build.txt"
pat = re.compile(r'^([A-Za-z0-9_.-]+)==([^\s]+)')
seen = defaultdict(list)
with open(fname, encoding="utf-8") as f:
for i, line in enumerate(f, 1):
m = pat.match(line.strip())
if m:
seen[m.group(1).lower()].append((i, m.group(2)))
dups = {k:v for k,v in seen.items() if len(v) > 1}
if not dups:
print("No duplicate pinned package names found.")
else:
print("Duplicate pinned package names:")
for pkg, rows in sorted(dups.items()):
print(f"- {pkg}: " + ", ".join([f'line {ln} -> {ver}' for ln, ver in rows]))
PYRepository: lightspeed-core/rag-content
Length of output: 203
🏁 Script executed:
cat -n requirements-build.txt | head -90Repository: lightspeed-core/rag-content
Length of output: 2561
Fix conflicting duplicate package pins in auto-generated build requirements.
This auto-generated file contains multiple unpinned versions of the same packages (hatchling at lines 25 and 29, setuptools at lines 79 and 81). pip-compile should not produce this output. The duplicates indicate unresolved dependency conflicts in your source specification. When pip installs this file, it uses only the last occurrence of each package, silently dropping the others, making the resolution non-deterministic and hiding the underlying constraint conflict.
Fix by resolving the conflicting requirements in your source dependency file (requirements.source.txt.build).
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@requirements-build.txt` around lines 23 - 33, The build requirements file
contains conflicting duplicate pins (e.g., hatchling and setuptools) produced by
pip-compile; fix this by resolving the source dependency conflicts in your
requirements.source.txt.build—identify where hatchling and setuptools are
required with different versions (direct or transitive), choose a single
compatible version (or add an explicit constraint/compatibility marker) in
requirements.source.txt.build, then re-run pip-compile to regenerate
requirements-build.txt so it contains a single pinned entry per package.
55d6924 to
262793b
Compare
5cd200f to
b35451a
Compare
lxml (transitive dep via docling 2.73.x) needs these libraries to build from source in the hermetic Konflux build. Picked up from PR lightspeed-core#176. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
ec390ea to
a8c7cf9
Compare
|
Caution There are some errors in your PipelineRun template.
|
a8c7cf9 to
e2dfb21
Compare
7b133dc to
8660365
Compare
2f18f43 to
a983d45
Compare
lxml (transitive dep via docling 2.73.x) needs these libraries to build from source in the hermetic Konflux build. Picked up from PR lightspeed-core#176. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
e840103 to
7efb628
Compare
4c73ae7 to
0bfa35d
Compare
6671389 to
7af37da
Compare
7af37da to
bf697a7
Compare
Description
Upgrade rag-content to the RHOAI 3.4 index of Python packages
Type of change
Tools used to create PR
Identify any AI code assistants used in this PR (for transparency and review context)
Related Tickets & Documents
Checklist before requesting a review
Testing
Summary by CodeRabbit
New Features
Updates
Chores