-
Notifications
You must be signed in to change notification settings - Fork 63
LCORE-858: hermetic build with CPU torch #852
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Signed-off-by: Haoyu Sun <hasun@redhat.com>
Signed-off-by: Haoyu Sun <hasun@redhat.com>
WalkthroughAdds hermetic multi-arch build support: Tekton pipelines gain hermetic/prefetch params and 4h timeouts; Containerfile gains an arch-aware conditional hermetic install path and copies arch-specific requirements; new hermetic/tensor requirement files, RPM inputs/lock, UBI repo, Makefile targets and helper script added; docs updated. Changes
Sequence Diagram(s)mermaid Estimated code review effort🎯 3 (Moderate) | ⏱️ ~30 minutes
Possibly related PRs
Suggested reviewers
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ 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 |
c062fb7 to
c4ead8a
Compare
There was a problem hiding this 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
🧹 Nitpick comments (5)
requirements.torch.txt (1)
1-27: Check torch hashes cover all wheels used in multi-arch hermetic builds.The file cleanly pins
torch==2.7.1with hashes, which matches the llslibdev group inpyproject.toml. Given the header showsuv pip compile ... --python-platform x86_64-unknown-linux-gnu, please verify that the hash set also includes the wheel(s) actually used on aarch64; otherwise hermetic installs on the arm builder could fail with hash mismatches. If not already handled, consider generating per-arch torch requirement files or regenerating this file so its hashes match all targeted platforms. Based on learnings, the version choice itself (2.7.1) is fine.pyproject.toml (1)
58-64: Clarify Pyright exclude path vs guideline (src/auth/k8s.pyvssrc/authentication/k8s.py).Coding guidelines call for excluding
src/auth/k8s.pyfrom Pyright, but the current config excludessrc/authentication/k8s.py. If the module has been renamed, the guideline is stale; if not, this exclude may not be hitting the intended file. Please confirm the actual path and align either the config or the guideline to avoid confusion (and optionally exclude both paths if that’s safer for now)..tekton/lightspeed-stack-pull-request.yaml (1)
33-39: PR PipelineRun hermetic + arm64 config matches push; consider deduplicating prefetch JSON.Mirroring the arm64 platform, hermetic flag,
build-source-image='true', and the sameprefetch-inputJSON plus 4h timeouts keeps PR builds aligned with push builds, which is good. To reduce future drift, consider centralising the longprefetch-inputJSON (e.g., via a shared template variable) so push and PR YAML stay in lockstep.Also applies to: 635-637
Containerfile (1)
25-36: Hermetic install branch matches cachi2 setup; consider also hermeticising the initial uv install.The conditional branch that sources
/cachi2/cachi2.env, creates a no-index venv withuv venv --seed --no-index --find-links ${PIP_FIND_LINKS}, and then installsrequirements.$(uname -m).txtplusrequirements.torch.txtis consistent with the Tektonprefetch-inputand multi-arch design, while theelsepath preserves the previousuv syncbehaviour. If you want the uv bootstrap itself to be hermetic as well, you could wrap the earlierpip3.12 install "uv==0.8.15"in the same/cachi2/cachi2.envlogic so it also uses${PIP_FIND_LINKS}when available, for example:-RUN pip3.12 install "uv==0.8.15" +RUN if [ -f /cachi2/cachi2.env ]; then \ + . /cachi2/cachi2.env && pip3.12 install --no-index --find-links ${PIP_FIND_LINKS} "uv==0.8.15"; \ + else \ + pip3.12 install "uv==0.8.15"; \ + fiThis would make the entire Python tooling stack reproducible under cachi2. Based on learnings, continuing to rely on
uvfor env management is in line with previous guidance.rpms.lock.yaml (1)
1-355: Consider adding documentation on lockfile generation and maintenance.This lockfile lacks inline comments explaining its purpose, generation method, or intended usage. Given that it's part of a hermetic build system, clarify:
- How and when this lockfile is generated (is it automated or manual?)
- What tool/process resolves
rpms.in.yaml→rpms.lock.yaml?- Are there validation checks to ensure consistency across architectures?
This would improve maintainability for future updates.
Do you want me to help draft a README or inline documentation explaining the lockfile structure and generation process?
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
uv.lockis excluded by!**/*.lock
📒 Files selected for processing (9)
.tekton/lightspeed-stack-pull-request.yaml(2 hunks).tekton/lightspeed-stack-push.yaml(2 hunks)Containerfile(1 hunks)pyproject.toml(1 hunks)requirements.hermetic.txt(1 hunks)requirements.torch.txt(1 hunks)rpms.in.yaml(1 hunks)rpms.lock.yaml(1 hunks)ubi.repo(1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
pyproject.toml
📄 CodeRabbit inference engine (CLAUDE.md)
pyproject.toml: Configure pylint withsource-roots = "src"
Excludesrc/auth/k8s.pyfrom pyright type checking
Files:
pyproject.toml
🧠 Learnings (3)
📚 Learning: 2025-11-24T16:58:04.410Z
Learnt from: CR
Repo: lightspeed-core/lightspeed-stack PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-24T16:58:04.410Z
Learning: Use Python package manager `uv` with `uv run` prefix for all development commands
Applied to files:
requirements.hermetic.txt
📚 Learning: 2025-11-24T16:58:04.410Z
Learnt from: CR
Repo: lightspeed-core/lightspeed-stack PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-24T16:58:04.410Z
Learning: Use `uv sync --group dev --group llslibdev` to install development dependencies
Applied to files:
Containerfilepyproject.toml
📚 Learning: 2025-08-18T11:45:59.961Z
Learnt from: matysek
Repo: lightspeed-core/lightspeed-stack PR: 292
File: pyproject.toml:77-77
Timestamp: 2025-08-18T11:45:59.961Z
Learning: torch==2.7.1 is available on PyPI and is a valid version that can be used in dependency specifications.
Applied to files:
requirements.torch.txt
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
- GitHub Check: build-pr
- GitHub Check: Konflux kflux-prd-rh02 / lightspeed-stack-on-pull-request
- GitHub Check: e2e_tests (ci)
- GitHub Check: e2e_tests (azure)
🔇 Additional comments (7)
.tekton/lightspeed-stack-push.yaml (1)
30-36: Hermetic + arm64 push PipelineRun params look consistent; validate platform ID and files.Extending
build-platformswithlinux-c6gd2xlarge/arm64, wiringhermetic='true',build-source-image='true', and theprefetch-inputJSON (rpm + pip withrequirements.x86_64.txt,requirements.aarch64.txt,requirements.hermetic.txt,requirements.torch.txt) plus 4h timeouts all align with the Containerfile and hermetic setup. Please just confirm that:
linux-c6gd2xlarge/arm64is a valid platform name for your multi-platform-controller, and- all four listed requirements files exist at the repo root and are kept in sync with the container build logic.
Also applies to: 632-634
pyproject.toml (1)
91-94: Scoping torch to thepytorch-cpuindex forllslibdevlooks correct.Limiting the custom
pytorch-cpuindex to thellslibdevgroup keeps global dependency resolution unchanged while ensuring the dev/lib group’storch==2.7.1comes from the CPU wheels only. This matches the hermetic torch pinning strategy and keeps behaviour predictable.requirements.hermetic.txt (1)
1-2: Hermetic uv/pip pins look reasonable; keep them aligned with the container image.Pinning
uv==0.8.15andpip==24.2gives cachi2 a clear target for hermetic prefetch and matches the uv version installed in theContainerfile. Just ensure these versions are updated in lockstep with the base image andpip3.12 install "uv==..."when you bump them.rpms.in.yaml (1)
1-4: RPM prefetch config aligns with Containerfile usage.Listing
gcc,jq, andpatchwitharches: [x86_64, aarch64]and referencing./ubi.repomatches the RPMs you install in the Dockerfile and should let cachi2 provide them hermetically for both architectures.ubi.repo (1)
1-62: UBI 9 repo definitions look standard and suitable for hermetic RPM prefetch.BaseOS, AppStream, and CodeReady Builder RPM repos are enabled with GPG checks, while debug/source repos are disabled, which is a sane default and aligns with
rpms.in.yaml’scontentOrigin. This should give cachi2 a stable, verified source for the RPM set across both architectures.rpms.lock.yaml (2)
1-4: File structure is well-formed and consistent.The lockfile header and schema are properly structured.
5-183: Unable to complete verification—repository access unavailable.The verification cannot be performed due to persistent repository access failures. The original review comment identifies a legitimate concern about architectural package differences (aarch64 includes
libasanandlibubsan, x86_64 includesglibc-headers), but confirming whether these differences are intentional requires access torpms.in.yamlto compare against the input specification.Manual verification is required:
- Check
rpms.in.yamlto confirm if these architectural differences are specified intentionally- If specified, document the rationale for the differences
- If not specified, the lock file may contain inconsistencies that need correction
| - arch: aarch64 | ||
| packages: | ||
| - url: https://cdn-ubi.redhat.com/content/public/ubi/dist/ubi9/9/aarch64/appstream/os/Packages/c/cpp-11.5.0-5.el9_5.aarch64.rpm | ||
| repoid: ubi-9-appstream-rpms | ||
| size: 10795955 | ||
| checksum: sha256:fd6561d7ca6a5ec7a9d9c17c623d97c24eec8f6c8de91081ba95343ebd0de7c2 | ||
| name: cpp | ||
| evr: 11.5.0-5.el9_5 | ||
| sourcerpm: gcc-11.5.0-5.el9_5.src.rpm | ||
| - url: https://cdn-ubi.redhat.com/content/public/ubi/dist/ubi9/9/aarch64/appstream/os/Packages/g/gcc-11.5.0-5.el9_5.aarch64.rpm | ||
| repoid: ubi-9-appstream-rpms | ||
| size: 31300907 | ||
| checksum: sha256:0adab9938458e552e3d5433c668d7abb946be0a81b2b510a201136efbca51601 | ||
| name: gcc | ||
| evr: 11.5.0-5.el9_5 | ||
| sourcerpm: gcc-11.5.0-5.el9_5.src.rpm | ||
| - url: https://cdn-ubi.redhat.com/content/public/ubi/dist/ubi9/9/aarch64/appstream/os/Packages/g/glibc-devel-2.34-168.el9_6.24.aarch64.rpm | ||
| repoid: ubi-9-appstream-rpms | ||
| size: 561564 | ||
| checksum: sha256:775e17a2f79a700ba9c3f2407e6a55b2a356b31ff3484581eb7f5086b2e0bee8 | ||
| name: glibc-devel | ||
| evr: 2.34-168.el9_6.24 | ||
| sourcerpm: glibc-2.34-168.el9_6.24.src.rpm | ||
| - url: https://cdn-ubi.redhat.com/content/public/ubi/dist/ubi9/9/aarch64/appstream/os/Packages/k/kernel-headers-5.14.0-570.60.1.el9_6.aarch64.rpm | ||
| repoid: ubi-9-appstream-rpms | ||
| size: 3697533 | ||
| checksum: sha256:bd936eedb865fc20315eaebd3817d20228ef64909f0367cba86f4241164f1ab8 | ||
| name: kernel-headers | ||
| evr: 5.14.0-570.60.1.el9_6 | ||
| sourcerpm: kernel-5.14.0-570.60.1.el9_6.src.rpm | ||
| - url: https://cdn-ubi.redhat.com/content/public/ubi/dist/ubi9/9/aarch64/appstream/os/Packages/l/libasan-11.5.0-5.el9_5.aarch64.rpm | ||
| repoid: ubi-9-appstream-rpms | ||
| size: 413819 | ||
| checksum: sha256:3febfe157847f68e8c94796eb4a0e2d4c3c660b33c91ad068dd75f785ae76fa0 | ||
| name: libasan | ||
| evr: 11.5.0-5.el9_5 | ||
| sourcerpm: gcc-11.5.0-5.el9_5.src.rpm | ||
| - url: https://cdn-ubi.redhat.com/content/public/ubi/dist/ubi9/9/aarch64/appstream/os/Packages/l/libmpc-1.2.1-4.el9.aarch64.rpm | ||
| repoid: ubi-9-appstream-rpms | ||
| size: 67120 | ||
| checksum: sha256:3763354a5f45d886f9976eec20eb34f8afc2144c69ffba07de546f2820893c70 | ||
| name: libmpc | ||
| evr: 1.2.1-4.el9 | ||
| sourcerpm: libmpc-1.2.1-4.el9.src.rpm | ||
| - url: https://cdn-ubi.redhat.com/content/public/ubi/dist/ubi9/9/aarch64/appstream/os/Packages/l/libubsan-11.5.0-5.el9_5.aarch64.rpm | ||
| repoid: ubi-9-appstream-rpms | ||
| size: 183667 | ||
| checksum: sha256:0751fe4ed4571b48dbca8664a16b410030ec76e2f5d71234807751458d717f31 | ||
| name: libubsan | ||
| evr: 11.5.0-5.el9_5 | ||
| sourcerpm: gcc-11.5.0-5.el9_5.src.rpm | ||
| - url: https://cdn-ubi.redhat.com/content/public/ubi/dist/ubi9/9/aarch64/appstream/os/Packages/l/libxcrypt-devel-4.4.18-3.el9.aarch64.rpm | ||
| repoid: ubi-9-appstream-rpms | ||
| size: 33051 | ||
| checksum: sha256:9d621f33df35b9c274b8d65457d6c67fc1522b6c62cf7b2341a4a99f39a93507 | ||
| name: libxcrypt-devel | ||
| evr: 4.4.18-3.el9 | ||
| sourcerpm: libxcrypt-4.4.18-3.el9.src.rpm | ||
| - url: https://cdn-ubi.redhat.com/content/public/ubi/dist/ubi9/9/aarch64/appstream/os/Packages/o/oniguruma-6.9.6-1.el9.5.aarch64.rpm | ||
| repoid: ubi-9-appstream-rpms | ||
| size: 222582 | ||
| checksum: sha256:bc2305dad655ddb94f966158112efd6cefa6824d5aa2e80f63881f16cee74598 | ||
| name: oniguruma | ||
| evr: 6.9.6-1.el9.5 | ||
| sourcerpm: oniguruma-6.9.6-1.el9.5.src.rpm | ||
| - url: https://cdn-ubi.redhat.com/content/public/ubi/dist/ubi9/9/aarch64/appstream/os/Packages/p/patch-2.7.6-16.el9.aarch64.rpm | ||
| repoid: ubi-9-appstream-rpms | ||
| size: 129037 | ||
| checksum: sha256:335c720da3caa41822737dd431d91a4adc79c85dedbe4483ecaf58bc83767610 | ||
| name: patch | ||
| evr: 2.7.6-16.el9 | ||
| sourcerpm: patch-2.7.6-16.el9.src.rpm | ||
| - url: https://cdn-ubi.redhat.com/content/public/ubi/dist/ubi9/9/aarch64/baseos/os/Packages/b/binutils-2.35.2-63.el9.aarch64.rpm | ||
| repoid: ubi-9-baseos-rpms | ||
| size: 5023899 | ||
| checksum: sha256:c0daaed62bf2dc4ff0f3a30e3f0c538170c998c2b805acf931b7e8b77accf087 | ||
| name: binutils | ||
| evr: 2.35.2-63.el9 | ||
| sourcerpm: binutils-2.35.2-63.el9.src.rpm | ||
| - url: https://cdn-ubi.redhat.com/content/public/ubi/dist/ubi9/9/aarch64/baseos/os/Packages/b/binutils-gold-2.35.2-63.el9.aarch64.rpm | ||
| repoid: ubi-9-baseos-rpms | ||
| size: 903496 | ||
| checksum: sha256:71c324de618542f894eb113644b2082d2f0e8d648d31a32f8a5fe14a78a5d295 | ||
| name: binutils-gold | ||
| evr: 2.35.2-63.el9 | ||
| sourcerpm: binutils-2.35.2-63.el9.src.rpm | ||
| - url: https://cdn-ubi.redhat.com/content/public/ubi/dist/ubi9/9/aarch64/baseos/os/Packages/e/ed-1.14.2-12.el9.aarch64.rpm | ||
| repoid: ubi-9-baseos-rpms | ||
| size: 78931 | ||
| checksum: sha256:3bce4ce6243886c448e58f589b79e3ac829fcde53d1ff13d5906a8cdc22be091 | ||
| name: ed | ||
| evr: 1.14.2-12.el9 | ||
| sourcerpm: ed-1.14.2-12.el9.src.rpm | ||
| - url: https://cdn-ubi.redhat.com/content/public/ubi/dist/ubi9/9/aarch64/baseos/os/Packages/e/elfutils-debuginfod-client-0.192-6.el9_6.aarch64.rpm | ||
| repoid: ubi-9-baseos-rpms | ||
| size: 45890 | ||
| checksum: sha256:e2d5ce8ec635caf5e6e87275370d055daf2b6ee8837981ac9154bfee9c6859a0 | ||
| name: elfutils-debuginfod-client | ||
| evr: 0.192-6.el9_6 | ||
| sourcerpm: elfutils-0.192-6.el9_6.src.rpm | ||
| - url: https://cdn-ubi.redhat.com/content/public/ubi/dist/ubi9/9/aarch64/baseos/os/Packages/e/elfutils-default-yama-scope-0.192-6.el9_6.noarch.rpm | ||
| repoid: ubi-9-baseos-rpms | ||
| size: 9980 | ||
| checksum: sha256:847f0cbedaef67673aadcd1bc5b8f6b9b8cb5e0cb6896c6586abe89829469c99 | ||
| name: elfutils-default-yama-scope | ||
| evr: 0.192-6.el9_6 | ||
| sourcerpm: elfutils-0.192-6.el9_6.src.rpm | ||
| - url: https://cdn-ubi.redhat.com/content/public/ubi/dist/ubi9/9/aarch64/baseos/os/Packages/e/elfutils-libelf-0.192-6.el9_6.aarch64.rpm | ||
| repoid: ubi-9-baseos-rpms | ||
| size: 211737 | ||
| checksum: sha256:b280afd66943a3e9d7fd2f5d913f6c0efa6d1c2beb69a332808cd69d425c29f4 | ||
| name: elfutils-libelf | ||
| evr: 0.192-6.el9_6 | ||
| sourcerpm: elfutils-0.192-6.el9_6.src.rpm | ||
| - url: https://cdn-ubi.redhat.com/content/public/ubi/dist/ubi9/9/aarch64/baseos/os/Packages/e/elfutils-libs-0.192-6.el9_6.aarch64.rpm | ||
| repoid: ubi-9-baseos-rpms | ||
| size: 267762 | ||
| checksum: sha256:8268ef7ac4cfb01bc01b60d79f884da2ea0229154500b638e13ba46a4ca15d14 | ||
| name: elfutils-libs | ||
| evr: 0.192-6.el9_6 | ||
| sourcerpm: elfutils-0.192-6.el9_6.src.rpm | ||
| - url: https://cdn-ubi.redhat.com/content/public/ubi/dist/ubi9/9/aarch64/baseos/os/Packages/i/info-6.7-15.el9.aarch64.rpm | ||
| repoid: ubi-9-baseos-rpms | ||
| size: 230301 | ||
| checksum: sha256:c5ae65876c73c6f4e240081431745f5ba0a91d10a4bfb8a5d162ca3d6f039202 | ||
| name: info | ||
| evr: 6.7-15.el9 | ||
| sourcerpm: texinfo-6.7-15.el9.src.rpm | ||
| - url: https://cdn-ubi.redhat.com/content/public/ubi/dist/ubi9/9/aarch64/baseos/os/Packages/j/jq-1.6-17.el9_6.2.aarch64.rpm | ||
| repoid: ubi-9-baseos-rpms | ||
| size: 185443 | ||
| checksum: sha256:46c953403e2da3202cb0509f4895afacbbfa95f840b4e228dc4c72c1523b8aae | ||
| name: jq | ||
| evr: 1.6-17.el9_6.2 | ||
| sourcerpm: jq-1.6-17.el9_6.2.src.rpm | ||
| - url: https://cdn-ubi.redhat.com/content/public/ubi/dist/ubi9/9/aarch64/baseos/os/Packages/l/libgomp-11.5.0-5.el9_5.aarch64.rpm | ||
| repoid: ubi-9-baseos-rpms | ||
| size: 267717 | ||
| checksum: sha256:417eeb095770944a0c25551771d9ae2ea367b3c979eba9da8a529957f49bafa5 | ||
| name: libgomp | ||
| evr: 11.5.0-5.el9_5 | ||
| sourcerpm: gcc-11.5.0-5.el9_5.src.rpm | ||
| - url: https://cdn-ubi.redhat.com/content/public/ubi/dist/ubi9/9/aarch64/baseos/os/Packages/l/libpkgconf-1.7.3-10.el9.aarch64.rpm | ||
| repoid: ubi-9-baseos-rpms | ||
| size: 38310 | ||
| checksum: sha256:9bdfccf6b092e0683aa6984f7c6caa737b30c0b1495e16abb03b5d1a5f8e787a | ||
| name: libpkgconf | ||
| evr: 1.7.3-10.el9 | ||
| sourcerpm: pkgconf-1.7.3-10.el9.src.rpm | ||
| - url: https://cdn-ubi.redhat.com/content/public/ubi/dist/ubi9/9/aarch64/baseos/os/Packages/m/make-4.3-8.el9.aarch64.rpm | ||
| repoid: ubi-9-baseos-rpms | ||
| size: 550249 | ||
| checksum: sha256:351a22b0e6744bd329b1b0f22d9c3b69a6da970b575e6c76190cc84b0fe77450 | ||
| name: make | ||
| evr: 1:4.3-8.el9 | ||
| sourcerpm: make-4.3-8.el9.src.rpm | ||
| - url: https://cdn-ubi.redhat.com/content/public/ubi/dist/ubi9/9/aarch64/baseos/os/Packages/p/pkgconf-1.7.3-10.el9.aarch64.rpm | ||
| repoid: ubi-9-baseos-rpms | ||
| size: 45196 | ||
| checksum: sha256:aa38a3951a690d721a815ea8f9b01995a85f35a8540d8075205821011d0385e6 | ||
| name: pkgconf | ||
| evr: 1.7.3-10.el9 | ||
| sourcerpm: pkgconf-1.7.3-10.el9.src.rpm | ||
| - url: https://cdn-ubi.redhat.com/content/public/ubi/dist/ubi9/9/aarch64/baseos/os/Packages/p/pkgconf-m4-1.7.3-10.el9.noarch.rpm | ||
| repoid: ubi-9-baseos-rpms | ||
| size: 16054 | ||
| checksum: sha256:91bafd6e06099451f60288327b275cfcc651822f6145176a157c6b0fa5131e02 | ||
| name: pkgconf-m4 | ||
| evr: 1.7.3-10.el9 | ||
| sourcerpm: pkgconf-1.7.3-10.el9.src.rpm | ||
| - url: https://cdn-ubi.redhat.com/content/public/ubi/dist/ubi9/9/aarch64/baseos/os/Packages/p/pkgconf-pkg-config-1.7.3-10.el9.aarch64.rpm | ||
| repoid: ubi-9-baseos-rpms | ||
| size: 12398 | ||
| checksum: sha256:47f1f744f96a2f3d360bc129837738dcebb1ee5032effc4472a891eea1d6a907 | ||
| name: pkgconf-pkg-config | ||
| evr: 1.7.3-10.el9 | ||
| sourcerpm: pkgconf-1.7.3-10.el9.src.rpm | ||
| source: [] | ||
| module_metadata: [] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🌐 Web query:
gcc 11.5.0-5.el9_5 CVE vulnerabilities security advisories Red Hat UBI9
💡 Result:
Short answer: Red Hat released RHSA-2025:1346 (issued 2025-02-12) which fixes CVE-2020-11023 in the gcc/libgcc/libstdc++ family; the fixed package version is 11.5.0-5.el9_5 (the RHEL9 / UBI9 builds). Upgrade to gcc-11.5.0-5.el9_5 (and corresponding libgcc/libstdc++ packages) to remediate. [1][2][3]
Sources:
- Red Hat advisory RHSA-2025:1346 (gcc, fixes CVE-2020-11023; fixed version 11.5.0-5.el9_5). [1]
- AlmaLinux erratum ALSA-2025:1346 showing same fix/version. [2]
- Snyk / OSV listings referencing CVE-2020-11023 and the fixed RHEL/Alma packages. [3]
🌐 Web query:
binutils 2.35.2-63.el9 CVE vulnerabilities security advisories Red Hat
💡 Result:
I found no Red Hat security advisory page explicitly for binutils-2.35.2-63.el9 on the Red Hat Customer Portal, but vulnerability scanners and package feeds that reference that exact rpm version list several CVEs affecting binutils/binutils-gold 2.35.2-63.el9 (examples):
- CVE-2025-7546, CVE-2025-7545. [1]
- CVE-2025-11494, CVE-2025-11414, CVE-2025-11413, CVE-2025-11412, CVE-2025-11083. [2][3]
- CVE-2025-11839, CVE-2025-11840. [4]
Notes/sources:
- Red Hat errata pages for binutils (RHSA/RHBA) show security/bandage updates for other binutils releases but do not show an RHSA specifically for 2.35.2-63.el9. See RHSA/RHBA listings on access.redhat.com. [5][6]
- References showing binutils-2.35.2-63.el9 mapped to CVEs come from vulnerability scanning/registry entries (examples: Iron Bank / Anchore/Twistlock results and package lists). [1][2][3][4]
If you want, I can:
- search Red Hat’s CSAF/errata API for any newer RHSA that explicitly lists 2.35.2-63.el9 and the authoritative CVE mappings, or
- fetch the vendor advisories / CVE pages (NVD/CVE) for each CVE above and summarize impact and fixed versions.
Sources:
- Iron Bank/Red Hat container scan entries referencing CVE-2025-7546 / CVE-2025-7545 for binutils-2.35.2-63.el9. (repo1.dso.mil entries).
- Iron Bank / Anchore/Twistlock findings listing CVE-2025-11412..11494 and CVE-2025-11083 against binutils-2.35.2-63.el9. (repo1.dso.mil).
- CERN / package lists showing binutils-gold 2.35.2-63.el9 in package feeds. (linux.web.cern.ch).
- Additional scan entries listing CVE-2025-11839/11840 for binutils-2.35.2-63.el9. (repo1.dso.mil).
- Red Hat errata RHSA/RHBA listings for binutils (example RHSA-2024:9689, RHSA-2023:6236). (access.redhat.com).
- Red Hat security data / CSAF API (access.redhat.com hydra/securitydata).
Tell me if you want me to (A) pull authoritative Red Hat RHSA/CSAF entries for each CVE, or (B) retrieve full CVE details and recommended fixed package versions.
🌐 Web query:
Red Hat UBI9 package updates gcc binutils 2024 2025 security patches
💡 Result:
Short answer: Red Hat issued security updates for gcc and binutils affecting RHEL‑9 / UBI‑9 across late 2024 and into 2025 — you should update your UBI9 images/packages (dnf update or pull rebuilt UBI9 images) to pick up fixes. Key advisories include RHSA-2024:9689 (binutils, Nov 14, 2024) and multiple RHSA notices for gcc in Feb 2025 (e.g. RHSA-2025:1305 / RHSA-2025:1346 addressing CVE-2020-11023 and related fixes). See Red Hat errata and aggregated vulnerability records for details and affected package versions. [1][2][3]
If you want, I can:
- list exact fixed package versions for UBI‑9 (gcc, cpp, binutils, binutils‑ld, etc.), or
- produce the dnf commands and a minimal Dockerfile snippet to rebuild/pull an updated UBI9 image.
Sources
- Red Hat errata (binutils RHSA-2024:9689). [1]
- OSV / Red Hat RHSA imports for gcc (RHSA-2025:1305 / RHSA-2025:1346). [2]
- Tenable / security scanner advisory summaries referencing RHSA-2025 gcc updates. [3]
Review the binutils package version for known CVEs and update to the latest patched release.
The gcc-11.5.0-5.el9_5 version is current and secure—it is the fixed version released in RHSA-2025:1346 (Feb 12, 2025) that addresses CVE-2020-11023. However, binutils-2.35.2-63.el9 has multiple known CVEs (including CVE-2025-7546, CVE-2025-7545, CVE-2025-11494, and others) and does not have an explicit Red Hat security advisory patch for this specific build. Red Hat issued RHSA-2024:9689 (Nov 2024) for binutils updates affecting RHEL9/UBI9. Update to the latest patched binutils version available in UBI9 to remediate these vulnerabilities.
Also applies to: 184-355
🤖 Prompt for AI Agents
In rpms.lock.yaml around lines 5 to 183, the binutils entry (name: binutils,
evr: 2.35.2-63.el9) is vulnerable and must be updated to the UBI9 patched
release referenced by RHSA-2024:9689; replace the binutils package block with
the latest patched binutils RPM metadata (updated evr, url, repoid, size,
checksum, and sourcerpm) from the UBI9 repository, ensuring checksum and size
match the downloaded RPM; if multiple arches or entries exist (lines 184–355
also affected), update them similarly and run your lockfile generation script to
regenerate the file and verify no other dependent packages break.
c4ead8a to
aae4ac9
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
Containerfile (1)
25-36: Hermetic cachi2 install path looks solid; consider tighteninguv venvtarget and arch assumptionsThe new hermetic branch is well structured:
- Checks for
/cachi2/cachi2.envand, when present, usesPIP_FIND_LINKS+PIP_NO_INDEXto drive a fully offlineuv venv+pip install.- Falls back to the original
uv sync --locked --no-dev --group llslibdevwhen cachi2 isn’t present, preserving local/dev behavior.- Aligns with the Tekton
prefetch-inputconfiguration and the newrequirements.*.txtfiles being copied into the image.A couple of small but important details to verify and potentially harden:
- Make the venv path explicit
You’re assuming
uv venvcreates.venvby default, which is then:
- Activated inline (
. .venv/bin/activate), and- Relied on later via
ENV PATH="/app-root/.venv/bin:$PATH"anduv pip uninstall ecdsa.To avoid any surprises if uv’s defaults change, it’s safer to pass the target directory explicitly:
-RUN if [ -f /cachi2/cachi2.env ]; then \ - . /cachi2/cachi2.env && uv venv --seed --no-index --find-links ${PIP_FIND_LINKS} && . .venv/bin/activate && pip install --no-index --find-links ${PIP_FIND_LINKS} -r requirements.$(uname -m).txt -r requirements.torch.txt; \ +RUN if [ -f /cachi2/cachi2.env ]; then \ + . /cachi2/cachi2.env && uv venv .venv --seed --no-index --find-links "${PIP_FIND_LINKS}" && . .venv/bin/activate && pip install --no-index --find-links "${PIP_FIND_LINKS}" -r "requirements.$(uname -m).txt" -r requirements.torch.txt; \ else \ uv sync --locked --no-dev --group llslibdev; \ fi
- Confirm arch‑specific requirements naming
The hermetic install uses
requirements.$(uname -m).txt. On UBI9 this should map to filenames likerequirements.x86_64.txtandrequirements.aarch64.txt. Please confirm that:
- Those filenames exactly match
uname -moutputs on your target builders, and- No other arch variants (e.g.,
arm64) are expected.
- Hermeticity of uv bootstrap (optional tightening)
Even in hermetic runs,
pip3.12 install "uv==0.8.15"(earlier in the Dockerfile) will still hit PyPI unless the base image or environment already provides uv or redirects pip through cachi2. If you need fully strict hermetic behavior, you might want to:
- Provide uv via an RPM in your rpm lock/repo, or
- Include uv in the pip prefetch set and run that install under the cachi2 environment as well.
If partial hermeticity (only for app deps) is acceptable, this can be left as‑is.
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
uv.lockis excluded by!**/*.lock
📒 Files selected for processing (5)
.tekton/lightspeed-stack-pull-request.yaml(2 hunks).tekton/lightspeed-stack-push.yaml(2 hunks)Containerfile(1 hunks)pyproject.toml(1 hunks)requirements.torch.txt(1 hunks)
✅ Files skipped from review due to trivial changes (1)
- requirements.torch.txt
🚧 Files skipped from review as they are similar to previous changes (2)
- .tekton/lightspeed-stack-push.yaml
- pyproject.toml
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2025-11-24T16:58:04.410Z
Learnt from: CR
Repo: lightspeed-core/lightspeed-stack PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-24T16:58:04.410Z
Learning: Use `uv sync --group dev --group llslibdev` to install development dependencies
Applied to files:
Containerfile
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
- GitHub Check: build-pr
- GitHub Check: Konflux kflux-prd-rh02 / lightspeed-stack-on-pull-request
- GitHub Check: e2e_tests (azure)
- GitHub Check: e2e_tests (ci)
🔇 Additional comments (2)
.tekton/lightspeed-stack-pull-request.yaml (2)
30-39: Hermetic/prefetch params look correctly wired; confirm requirements file usage intentThe added params look consistent with the pipeline spec and tasks:
build-platformsnow targetslinux/x86_64andlinux-c6gd2xlarge/arm64, which will flow into the existing$(params.build-platforms)matrices.hermetic: 'true'andprefetch-inputare correctly passed toprefetch-dependenciesand the hermetic-aware tasks (build-images,sast-coverity-check, etc.).- The pip prefetch config lists
requirements.x86_64.txt,requirements.aarch64.txt,requirements.hermetic.txt, andrequirements.torch.txt, which aligns with the Containerfile copyingrequirements.*.txt.One behavioral detail to double‑check: in the Containerfile, the hermetic install path currently installs from
requirements.$(uname -m).txt+requirements.torch.txtonly, whilerequirements.hermetic.txtis used here for prefetching but not explicitly installed. Ifrequirements.hermetic.txtcontains any runtime deps that aren’t also in the arch‑specific files, they would be prefetched but never installed.If that file is intentionally “prefetch‑only” (e.g., just to over‑approximate the wheel cache), this is fine; otherwise, consider either:
- Folding those deps into the arch‑specific requirements files, or
- Adding
-r requirements.hermetic.txtto the hermetic install command in the Containerfile.
635-637: New 4h PipelineRun timeouts are reasonable; verify they cover worst‑case buildsAdding:
timeouts: pipeline: 4h tasks: 4hat the PipelineRun level is structurally correct and will prevent runaway builds. Given the added ARM/CPU‑torch hermetic work, please sanity‑check that:
- 4h is sufficient for the slowest expected multi‑arch build (including cache cold starts), and
- You don’t need different limits for specific long‑running tasks (e.g., build vs. scans), which would require per‑task or pipeline‑level tuning elsewhere.
If current runs comfortably finish under this ceiling, this change looks good as‑is.
aae4ac9 to
d32d0b0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (2)
scripts/remove_torch_deps.sh (1)
22-48: Verify indentation assumption and edge case handling for torch dependency section.The AWK logic correctly detects and removes torch dependencies, but relies on a fixed 4-space indentation pattern (line 34:
/^ /). While this matches pip-tools output convention, the script could fail silently or behave unexpectedly if:
- Indentation uses tabs or different spacing (e.g., 2 spaces)
- Blank or whitespace-only lines appear within the torch dependency block
Consider testing the script with requirements files generated from
uv pip compileacross different Python/platform versions to confirm robust handling.Makefile (1)
104-109: Verify uv pip compile flags and add error handling.The
konflux-requirementstarget uses several flags that require verification:--torch-backend cpu,--emit-index-url, and--no-deps. These are not standarduv pip compileflags in common versions; confirm they are supported in your uv version.Additionally, the Makefile lacks error handling at the target level. If line 105 or 106 fails (compilation errors), execution continues to lines 107-109, potentially generating incomplete or corrupted requirements files. Consider adding error handling (e.g., prefixing with
set -ein a bash wrapper or using Makefile's.PHONYdeclarations with conditional checks).
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
uv.lockis excluded by!**/*.lock
📒 Files selected for processing (7)
.tekton/lightspeed-stack-pull-request.yaml(2 hunks).tekton/lightspeed-stack-push.yaml(2 hunks)Containerfile(1 hunks)Makefile(2 hunks)pyproject.toml(1 hunks)requirements.torch.txt(1 hunks)scripts/remove_torch_deps.sh(1 hunks)
🚧 Files skipped from review as they are similar to previous changes (4)
- .tekton/lightspeed-stack-push.yaml
- .tekton/lightspeed-stack-pull-request.yaml
- Containerfile
- requirements.torch.txt
🧰 Additional context used
📓 Path-based instructions (1)
pyproject.toml
📄 CodeRabbit inference engine (CLAUDE.md)
pyproject.toml: Configure pylint withsource-roots = "src"
Excludesrc/auth/k8s.pyfrom pyright type checking
Files:
pyproject.toml
🧠 Learnings (1)
📚 Learning: 2025-11-24T16:58:04.410Z
Learnt from: CR
Repo: lightspeed-core/lightspeed-stack PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-24T16:58:04.410Z
Learning: Use `uv sync --group dev --group llslibdev` to install development dependencies
Applied to files:
pyproject.toml
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
- GitHub Check: build-pr
- GitHub Check: Konflux kflux-prd-rh02 / lightspeed-stack-on-pull-request
- GitHub Check: e2e_tests (azure)
- GitHub Check: e2e_tests (ci)
🔇 Additional comments (5)
scripts/remove_torch_deps.sh (1)
1-19: LGTM on file structure and error handling.Input validation, backup creation, and use of
set -efor error propagation are all appropriate for a utility script. The diff output at line 55 using|| trueis a good pattern to allow review without blocking on diff exit codes.pyproject.toml (2)
91-94: Verify uv support for group-scoped source configuration syntax.The change introduces a list-based torch source configuration with a
group = "llslibdev"field to associate torch with the llslibdev dependency group. While the TOML syntax is valid, confirm that your version ofuvrecognizes and correctly processes thisgroupfield in[tool.uv.sources]configurations.The syntax represents a significant configuration change from the previous single-dict approach, and improper handling by uv could result in torch not being resolved or installed correctly during builds.
58-65: Coding guideline compliance verified.Pyright exclusion and extraPaths configuration correctly align with coding guidelines:
src/authentication/k8s.pyis excluded, and./srcis added to extraPaths for source-root configuration.Makefile (2)
104-109: Flag-specific verification needed for uv pip compile.The command at line 109 uses stdin to pass torch version:
echo "torch==${TORCH_VERSION}" | uv pip compile - .... Confirm thatuv pip compilesupports reading requirements from stdin (-argument). If not supported, this step will fail silently or with unclear error messages.Additionally, line 109 uses
--emit-index-url, which typically outputs index URLs to the compiled requirements file—verify this flag exists and produces the expected output format for the torch requirements file.
7-8: LGTM on TORCH_VERSION variable.Clear, simple variable declaration aligned with the hermetic build versioning approach. Consistent with the PR objective of pinning PyTorch to 2.7.1 across build platforms.
|
/retest |
1 similar comment
|
/retest |
d32d0b0 to
baecbc8
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
README.md (1)
18-94: TOC structure looks good, minor formatting note.The expanded table of contents appropriately reflects the new Konflux documentation sections. The markdownlint hints indicate indentation inconsistencies, but these are cosmetic issues that don't impact functionality.
If you'd like consistent markdown formatting, consider running a markdown formatter to align the indentation throughout the TOC.
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
uv.lockis excluded by!**/*.lock
📒 Files selected for processing (8)
.tekton/lightspeed-stack-pull-request.yaml(2 hunks).tekton/lightspeed-stack-push.yaml(2 hunks)Containerfile(1 hunks)Makefile(2 hunks)README.md(9 hunks)pyproject.toml(1 hunks)requirements.torch.txt(1 hunks)scripts/remove_torch_deps.sh(1 hunks)
✅ Files skipped from review due to trivial changes (1)
- requirements.torch.txt
🚧 Files skipped from review as they are similar to previous changes (2)
- .tekton/lightspeed-stack-push.yaml
- scripts/remove_torch_deps.sh
🧰 Additional context used
📓 Path-based instructions (1)
pyproject.toml
📄 CodeRabbit inference engine (CLAUDE.md)
pyproject.toml: Configure pylint withsource-roots = "src"
Excludesrc/auth/k8s.pyfrom pyright type checking
Files:
pyproject.toml
🧠 Learnings (2)
📚 Learning: 2025-11-24T16:58:04.410Z
Learnt from: CR
Repo: lightspeed-core/lightspeed-stack PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-24T16:58:04.410Z
Learning: Use `uv sync --group dev --group llslibdev` to install development dependencies
Applied to files:
Containerfilepyproject.toml
📚 Learning: 2025-08-18T10:56:55.349Z
Learnt from: matysek
Repo: lightspeed-core/lightspeed-stack PR: 292
File: pyproject.toml:0-0
Timestamp: 2025-08-18T10:56:55.349Z
Learning: The lightspeed-stack project intentionally uses a "generic image" approach, bundling many dependencies directly in the base runtime image to work for everyone, rather than using lean base images with optional dependency groups.
Applied to files:
README.md
🪛 markdownlint-cli2 (0.18.1)
README.md
19-19: Unordered list indentation
Expected: 2; Actual: 4
(MD007, ul-indent)
55-55: Unordered list indentation
Expected: 6; Actual: 12
(MD007, ul-indent)
56-56: Unordered list indentation
Expected: 4; Actual: 8
(MD007, ul-indent)
57-57: Unordered list indentation
Expected: 6; Actual: 12
(MD007, ul-indent)
90-90: Unordered list indentation
Expected: 2; Actual: 4
(MD007, ul-indent)
91-91: Unordered list indentation
Expected: 4; Actual: 8
(MD007, ul-indent)
92-92: Unordered list indentation
Expected: 4; Actual: 8
(MD007, ul-indent)
93-93: Unordered list indentation
Expected: 4; Actual: 8
(MD007, ul-indent)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
- GitHub Check: build-pr
- GitHub Check: Konflux kflux-prd-rh02 / lightspeed-stack-on-pull-request
- GitHub Check: e2e_tests (azure)
- GitHub Check: e2e_tests (ci)
🔇 Additional comments (9)
.tekton/lightspeed-stack-pull-request.yaml (3)
30-33: ARM64 platform support looks appropriate.Adding
linux-c6gd2xlarge/arm64enables multi-architecture builds on AWS Graviton instances, aligning with the PR's hermetic multi-arch build objectives.
635-637: Question the 4-hour timeout duration.The 4-hour timeout for both pipeline and tasks seems excessive, even for hermetic multi-arch builds. Typical CI/CD pipelines complete in 30 minutes to 2 hours.
Consider whether this timeout is necessary or if it indicates potential performance issues:
- Are you observing builds that actually take close to 4 hours?
- Is this a conservative upper bound that could be reduced (e.g., to 2 hours)?
- Does the prefetch step or multi-arch build step take unexpectedly long?
If builds consistently complete in under 2 hours, reducing the timeout helps catch hung builds faster and conserves resources.
34-39: Unable to complete verification — repository access unavailable.The codebase cannot be accessed due to repository clone failures, preventing verification of:
- Whether the YAML file contains the configuration shown at lines 34-39
- Whether all four requirements files (x86_64, aarch64, hermetic, torch) exist
- Whether these files contain proper package hashes for hermetic builds
The original review comment's approval and verification requests cannot be validated without access to the repository.
Containerfile (2)
25-25: COPY correctly includes hermetic requirements files.The glob pattern
requirements.*.txtefficiently copies all platform-specific and shared requirements files needed for the hermetic build path.
27-36: Based on the web search results, I can confirm that theuv venvcommand does support the combination of--seed,--no-index, and--find-linksflags together. These flags are designed specifically for hermetic builds where dependencies are pre-fetched (as with cachi2).However, I'm unable to verify the requirements files due to repository access issues. Let me provide the rewritten review comment based on what I can confirm:
Conditional hermetic build path uses supported uv venv flags correctly.
The if/else logic properly handles both hermetic (Konflux) and non-hermetic (local dev) builds:
- Hermetic path: Sources cachi2 environment, creates an isolated venv with
--seed --no-index --find-links, and installs from prefetched dependencies- Non-hermetic path: Preserves the original developer workflow with
uv syncThe architecture detection using
$(uname -m)correctly resolves tox86_64oraarch64on Linux systems.Remaining item: Verify that
requirements.$(uname -m).txtandrequirements.torch.txtexist in the repository for both supported architectures. These files are referenced in the build but could not be verified due to repository access limitations.README.md (1)
940-985: Since the repository cannot be cloned in the sandbox environment, I cannot execute the verification script directly. However, I can still assess the review comment itself.The original review comment requests verification of documented commands but this type of verification requires:
- Executing
make konflux-requirementsin the actual repository- Checking that generated files exist and have correct content
- Testing
rpm-lockfile-prototypewith the actual base imageThese are legitimate verification requests that the developer/maintainer should perform before merging, as they involve build system execution and dependency management.
Rewritten Review Comment
Verify Konflux dependency update commands work end-to-end.
The new Konflux section provides clear guidance for updating dependencies in hermetic builds. However, the documented commands need verification:
Confirm
make konflux-requirementsgenerates all three requirements files:
requirements.x86_64.txt(x86_64 packages excluding torch)requirements.aarch64.txt(ARM64 packages excluding torch)requirements.torch.txt(CPU variant of torch)Verify
rpm-lockfile-prototypeworks with your base image and produces validrpms.lock.yamlConfirm torch version is correctly pinned in
requirements.torch.txtMakefile (2)
7-9: PyTorch 2.7.1 CPU wheels verified and available.Centralizing
TORCH_VERSIONas a constant is good practice and simplifies version management. PyTorch 2.7.1 with CPU-only wheels is available on download.pytorch.org across multiple platforms (manylinux, Windows, macOS) and Python versions (3.10, 3.11, 3.13).
104-110: The uv flags are valid; script existence cannot be verified due to repository access limitation.The web search confirms that
uv pip compilesupports all three flags used in the target:
--emit-index-url: includes index URLs in compiled output--python-platform: targets alternate platforms during resolution--torch-backend: specifies PyTorch backend (cpu, cu126, etc.)However, the repository could not be cloned to verify that
scripts/remove_torch_deps.shexists and is executable. The target's logic (removing torch dependencies from arch-specific files, then generating a separate torch file) is sound, but the script verification is incomplete.pyproject.toml (1)
90-94: Torch source grouping withgroupattribute is supported by uv and correctly configured.The change from a single object to an array with
group = "llslibdev"is valid. This configuration makes the torch source conditional on thellslibdevdependency group, enabling selective installation viauv sync --group dev --group llslibdev.The uv documentation confirms that sources in
[tool.uv.sources]support thegroupkey to condition sources on dependency groups. The installation command from learnings aligns with this behavior.Caveat: A known issue exists where group-conditioned entries (editable and other fields) can behave unexpectedly in certain uv versions. Verify this configuration works with your target uv version before deployment.
|
/retest |
baecbc8 to
7e5de32
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
README.md (1)
148-157: Polish quick-start “Run LCS locally” wording and typosThe new quick-start is helpful, but there are a few small text issues (grammar, capitalization, typo “shoud”) that are worth fixing since this is user-facing:
-To quickly get hands on LCS, we can run it using the default configurations provided in this repository: +To quickly get hands-on with LCS, you can run it using the default configurations provided in this repository: -1. check Llama stack settings in [run.yaml](run.yaml), make sure we can access the provider and the model, the server shoud listen to port 8321. +1. Check Llama Stack settings in [run.yaml](run.yaml). Make sure you can access the provider and model, and that the server should listen on port 8321. -2. export the LLM token env var that Llama stack requires. for OpenAI, we set the env var by `export OPENAI_API_KEY=sk-xxxxx` +2. Export the LLM token environment variable that Llama Stack requires. For OpenAI, set it with `export OPENAI_API_KEY=sk-xxxxx`. -3. start Llama stack server `uv run llama stack run run.yaml` +3. Start the Llama Stack server: `uv run llama stack run run.yaml` -5. check the LCS settings in [lightspeed-stack.yaml](lightspeed-stack.yaml). `llama_stack.url` should be `url: http://localhost:8321` +5. Check the LCS settings in [lightspeed-stack.yaml](lightspeed-stack.yaml). `llama_stack.url` should be `url: http://localhost:8321`. -6. start LCS server `make run` +6. Start the LCS server: `make run` -7. access LCS web UI at [http://localhost:8080/](http://localhost:8080/) +7. Access the LCS web UI at [http://localhost:8080/](http://localhost:8080/).
🧹 Nitpick comments (2)
README.md (1)
18-19: Fix TOC list indentation to satisfy markdownlint MD007markdownlint is flagging the new TOC entries for inconsistent indentation (MD007). The bullets added for
lightspeed-stack, the macOS subsections, and the Konflux section use more spaces than expected for their nesting level.Please normalize the indentation of these list items to match the rest of the generated TOC (typically 2 spaces per level), e.g.:
-* [lightspeed-stack](#lightspeed-stack) - * [About The Project](#about-the-project) +* [lightspeed-stack](#lightspeed-stack) + * [About The Project](#about-the-project)and similarly reduce indentation for the
macOSandKonflux-related entries so markdownlint passes.Also applies to: 55-57, 89-93
Containerfile (1)
25-36: Hermetic cachi2 branch looks good; consider small robustness tweaksThe new hermetic path is consistent with the Konflux docs and should work as intended:
COPY ... requirements.*.txtplusrequirements.$(uname -m).txtmatches the documentedrequirements.x86_64.txt/requirements.aarch64.txtlayout.- Sourcing
/cachi2/cachi2.envand using--no-index --find-links ${PIP_FIND_LINKS}ensures fully offline installs from the pre-fetched wheel cache, while theelsebranch preserves the originaluv syncbehavior.A couple of minor hardening suggestions:
-RUN if [ -f /cachi2/cachi2.env ]; then \ - . /cachi2/cachi2.env && uv venv --seed --no-index --find-links ${PIP_FIND_LINKS} && . .venv/bin/activate && pip install --no-index --find-links ${PIP_FIND_LINKS} -r requirements.$(uname -m).txt -r requirements.torch.txt; \ - else \ - uv sync --locked --no-dev --group llslibdev; \ - fi +RUN set -e; \ + if [ -f /cachi2/cachi2.env ]; then \ + . /cachi2/cachi2.env; \ + uv venv --seed --no-index --find-links "${PIP_FIND_LINKS}"; \ + . .venv/bin/activate; \ + pip install --no-index --find-links "${PIP_FIND_LINKS}" \ + -r "requirements.$(uname -m).txt" \ + -r "requirements.torch.txt"; \ + else \ + uv sync --locked --no-dev --group llslibdev; \ + fi
set -emakes the step fail fast if any subcommand in the branch fails.- Quoting
${PIP_FIND_LINKS}and the requirements filenames is a small safety improvement.- It would also be worth double-checking that both
requirements.x86_64.txtandrequirements.aarch64.txtare always present in the build context so hermetic builds on each arch don’t hit a missing-file error.
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
uv.lockis excluded by!**/*.lock
📒 Files selected for processing (8)
.tekton/lightspeed-stack-pull-request.yaml(2 hunks).tekton/lightspeed-stack-push.yaml(2 hunks)Containerfile(1 hunks)Makefile(2 hunks)README.md(9 hunks)pyproject.toml(1 hunks)requirements.torch.txt(1 hunks)scripts/remove_torch_deps.sh(1 hunks)
🚧 Files skipped from review as they are similar to previous changes (6)
- .tekton/lightspeed-stack-pull-request.yaml
- pyproject.toml
- requirements.torch.txt
- .tekton/lightspeed-stack-push.yaml
- Makefile
- scripts/remove_torch_deps.sh
🧰 Additional context used
🧠 Learnings (2)
📚 Learning: 2025-08-18T10:56:55.349Z
Learnt from: matysek
Repo: lightspeed-core/lightspeed-stack PR: 292
File: pyproject.toml:0-0
Timestamp: 2025-08-18T10:56:55.349Z
Learning: The lightspeed-stack project intentionally uses a "generic image" approach, bundling many dependencies directly in the base runtime image to work for everyone, rather than using lean base images with optional dependency groups.
Applied to files:
README.md
📚 Learning: 2025-11-24T16:58:04.410Z
Learnt from: CR
Repo: lightspeed-core/lightspeed-stack PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-24T16:58:04.410Z
Learning: Use `uv sync --group dev --group llslibdev` to install development dependencies
Applied to files:
Containerfile
🪛 markdownlint-cli2 (0.18.1)
README.md
19-19: Unordered list indentation
Expected: 2; Actual: 4
(MD007, ul-indent)
55-55: Unordered list indentation
Expected: 6; Actual: 12
(MD007, ul-indent)
56-56: Unordered list indentation
Expected: 4; Actual: 8
(MD007, ul-indent)
57-57: Unordered list indentation
Expected: 6; Actual: 12
(MD007, ul-indent)
90-90: Unordered list indentation
Expected: 2; Actual: 4
(MD007, ul-indent)
91-91: Unordered list indentation
Expected: 4; Actual: 8
(MD007, ul-indent)
92-92: Unordered list indentation
Expected: 4; Actual: 8
(MD007, ul-indent)
93-93: Unordered list indentation
Expected: 4; Actual: 8
(MD007, ul-indent)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
- GitHub Check: build-pr
- GitHub Check: e2e_tests (azure)
- GitHub Check: e2e_tests (ci)
🔇 Additional comments (1)
README.md (1)
940-986: Konflux hermetic dependency docs align well with the build changesThe new Konflux section clearly explains when to regenerate dependency artifacts and how:
make konflux-requirementsproducingrequirements.x86_64.txt,requirements.aarch64.txt, andrequirements.torch.txtmatches the Containerfile’srequirements.$(uname -m).txt+requirements.torch.txtinstall path.- The
rpm-lockfile-prototypeworkflow (rpms.in.yaml → rpms.lock.yaml with--image $BASE_IMAGEand extractedubi.repo) is consistent with typical hermetic RPM flows.This looks coherent with the hermetic build strategy in the Containerfile; I don’t see issues here.
Signed-off-by: Haoyu Sun <hasun@redhat.com>
7e5de32 to
c411ee5
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (2)
README.md (1)
16-95: Address markdown list indentation issues flagged by linter.The table of contents and list items have indentation inconsistencies flagged by markdownlint (MD007). Lines 19, 55–57, 90–93 need adjustment to use consistent 2-space indentation for top-level list items and 4-space for nested items. While this is optional in "chill" review mode, fixing these will improve consistency with markdown best practices.
Example fix for line 19:
- * [About The Project](#about-the-project) + * [About The Project](#about-the-project)Repeat similar fixes for other flagged lines.
scripts/remove_torch_deps.sh (1)
22-48: Consider adding validation that torch was actually found and removed.The script silently succeeds even if the input file contains no torch entry. Adding a check to warn or report whether torch was found would improve operational observability:
# After awk processing, check if torch was removed if diff -q "$INPUT_FILE" "$BACKUP_FILE" >/dev/null 2>&1; then echo "Warning: No changes made. Torch may not have been present in $INPUT_FILE" fiThis is optional but would provide better diagnostics when troubleshooting build issues.
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
uv.lockis excluded by!**/*.lock
📒 Files selected for processing (8)
.tekton/lightspeed-stack-pull-request.yaml(2 hunks).tekton/lightspeed-stack-push.yaml(2 hunks)Containerfile(1 hunks)Makefile(2 hunks)README.md(9 hunks)pyproject.toml(1 hunks)requirements.torch.txt(1 hunks)scripts/remove_torch_deps.sh(1 hunks)
🚧 Files skipped from review as they are similar to previous changes (3)
- requirements.torch.txt
- .tekton/lightspeed-stack-push.yaml
- Containerfile
🧰 Additional context used
📓 Path-based instructions (1)
pyproject.toml
📄 CodeRabbit inference engine (CLAUDE.md)
pyproject.toml: Configure pylint withsource-roots = "src"
Excludesrc/auth/k8s.pyfrom pyright type checking
Files:
pyproject.toml
🧠 Learnings (2)
📚 Learning: 2025-11-24T16:58:04.410Z
Learnt from: CR
Repo: lightspeed-core/lightspeed-stack PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-24T16:58:04.410Z
Learning: Use `uv sync --group dev --group llslibdev` to install development dependencies
Applied to files:
pyproject.toml
📚 Learning: 2025-08-18T10:56:55.349Z
Learnt from: matysek
Repo: lightspeed-core/lightspeed-stack PR: 292
File: pyproject.toml:0-0
Timestamp: 2025-08-18T10:56:55.349Z
Learning: The lightspeed-stack project intentionally uses a "generic image" approach, bundling many dependencies directly in the base runtime image to work for everyone, rather than using lean base images with optional dependency groups.
Applied to files:
README.md
🪛 markdownlint-cli2 (0.18.1)
README.md
19-19: Unordered list indentation
Expected: 2; Actual: 4
(MD007, ul-indent)
55-55: Unordered list indentation
Expected: 6; Actual: 12
(MD007, ul-indent)
56-56: Unordered list indentation
Expected: 4; Actual: 8
(MD007, ul-indent)
57-57: Unordered list indentation
Expected: 6; Actual: 12
(MD007, ul-indent)
90-90: Unordered list indentation
Expected: 2; Actual: 4
(MD007, ul-indent)
91-91: Unordered list indentation
Expected: 4; Actual: 8
(MD007, ul-indent)
92-92: Unordered list indentation
Expected: 4; Actual: 8
(MD007, ul-indent)
93-93: Unordered list indentation
Expected: 4; Actual: 8
(MD007, ul-indent)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
- GitHub Check: build-pr
- GitHub Check: Konflux kflux-prd-rh02 / lightspeed-stack-on-pull-request
- GitHub Check: e2e_tests (ci)
- GitHub Check: e2e_tests (azure)
🔇 Additional comments (11)
.tekton/lightspeed-stack-pull-request.yaml (3)
33-33: Verify AWS instance type notation for multi-platform controller.Line 33 uses
linux-c6gd2xlarge/arm64syntax, which mixes AWS instance type (c6gd2xlarge) with platform identifier. Confirm this is the intended format for your Konflux multi-platform-controller configuration and that the controller recognizes this notation.
36-37: Confirm prefetch-input requirements files are generated.The
prefetch-inputreferences four requirement files:requirements.x86_64.txt,requirements.aarch64.txt,requirements.hermetic.txt, andrequirements.torch.txt. Verify that these files exist in the repository or are generated before the pipeline runs (e.g., as part of the konflux-requirements Makefile target).
635-637: 4-hour pipeline timeout is reasonable for multi-platform hermetic builds.The addition of
timeouts.pipeline: 4handtimeouts.tasks: 4hprovides sufficient headroom for prefetch operations and multi-platform builds with network isolation. Configuration looks appropriate.pyproject.toml (2)
92-94: Verify uv version supports group attribute in [tool.uv.sources].The torch entry now uses
group = "llslibdev"within the sources configuration. Confirm that the version of uv used in your build process supports this syntax. If this is a recently-added feature or requires a minimum version, consider documenting the uv version requirement.
92-94: Torch version pinning aligns across pyproject.toml and Makefile.Torch is consistently pinned to version 2.7.1 in both the llslibdev group (line 155) and the Makefile TORCH_VERSION variable (line 8 of Makefile). Grouping torch under llslibdev supports the hermetic build workflow where torch is prefetched and locked separately.
Makefile (2)
105-109: Verify--torch-backend cpuis a valid uv pip compile option.Lines 105-106 use
--torch-backend cpuflag when runninguv pip compile. This flag may be a custom extension or require a specific uv version. Confirm that:
- Your version of uv supports this flag
- The flag is properly documented or tested in your CI/CD
- The PyTorch CPU wheel resolution works as expected
If this is a non-standard option, consider adding a comment explaining its purpose or adding error handling.
104-109: Hermetic requirements generation pattern is sound, subject to uv option verification.The
konflux-requirementstarget implements a clear workflow: compile platform-specific deps → remove torch → separately pin torch to CPU index. This supports reproducible, hermetic builds. Structure and sequencing look correct, pending verification of uv command options (see separate comment on --torch-backend).README.md (2)
940-985: Konflux section documentation is comprehensive and well-structured.The new section clearly documents the hermetic build workflow, when to update dependencies, and step-by-step instructions for both Python and RPM dependency updates. Content aligns well with Makefile targets and build tool changes introduced in this PR. The explanation of hermetic mode and prefetching is appropriately detailed for users unfamiliar with Konflux.
128-128: Minor textual clarifications improve readability.Small adjustments like "For example, if you choose to use OpenAI:" (line 128) and expanded LLM compatibility table improve the documentation flow and are appropriate refinements.
Also applies to: 148-148, 163-163, 184-184, 185-185
scripts/remove_torch_deps.sh (2)
1-55: Torch removal script is well-implemented with proper error handling.The awk-based state machine correctly identifies and removes torch entries and their dependency lines (indented with 4 spaces). Error handling via
set -eand file existence checks is appropriate. Backup mechanism and diff output provide good operational visibility.
28-42: State machine logic for torch removal is correct.The awk state machine properly:
- Detects torch== entries (line 28)
- Enters removal state and skips subsequent indented lines (line 34–36)
- Exits removal state when encountering a non-indented line (line 39–42)
- Ensures only torch and its direct dependencies are removed
This prevents accidental removal of unrelated packages.
|
/lgtm |
radofuchs
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Description
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
Improvements
Documentation
✏️ Tip: You can customize this high-level summary in your review settings.