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

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 29 additions & 1 deletion .tekton/lightspeed-stack-pull-request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,35 @@ spec:
- name: build-source-image
value: 'true'
- name: prefetch-input
value: '[{"type": "rpm", "path": "."}, {"type": "pip", "path": ".", "allow_binary": "true", "requirements_files": ["requirements.x86_64.txt", "requirements.aarch64.txt", "requirements.hermetic.txt", "requirements.torch.txt"]}]'
# no source available: torch, faiss-cpu
# hermeto prefetch problems: uv, pip, jiter, tiktoken,
# to accelerate build:numpy, scipy, pandas, pillow, scikit_learn
# those need cmake to build: pyarrow
# those need cargo to build: jiter, tiktoken, cryptography, fastuuid, hf_xet, maturin, pydantic_core, rpds_py, safetensors, tokenizers
value: |
[
{
"type": "rpm",
"path": "."
},
{
"type": "pip",
"path": ".",
"requirements_files": [
"requirements.x86_64.txt",
"requirements.aarch64.txt",
"requirements.hermetic.txt",
"requirements.torch.txt"
],
"requirements_build_files": ["requirements-build.txt"],
"binary": {
"packages": "torch,faiss-cpu,uv,pip,jiter,tiktoken,numpy,scipy,pandas,pillow,scikit_learn,pyarrow,cryptography,fastuuid,hf_xet,maturin,pydantic_core,rpds_py,safetensors,tokenizers",
"os": "linux",
"arch": "x86_64,aarch64",
"py_version": "312"
}
}
]
- name: hermetic
value: 'true'
- name: dockerfile
Expand Down
25 changes: 24 additions & 1 deletion .tekton/lightspeed-stack-push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,30 @@ spec:
- name: build-source-image
value: 'true'
- name: prefetch-input
value: '[{"type": "rpm", "path": "."}, {"type": "pip", "path": ".", "allow_binary": "true", "requirements_files": ["requirements.x86_64.txt", "requirements.aarch64.txt", "requirements.hermetic.txt", "requirements.torch.txt"]}]'
value: |
[
{
"type": "rpm",
"path": "."
},
{
"type": "pip",
"path": ".",
"requirements_files": [
"requirements.x86_64.txt",
"requirements.aarch64.txt",
"requirements.hermetic.txt",
"requirements.torch.txt"
],
"requirements_build_files": ["requirements-build.txt"],
"binary": {
"packages": "torch,faiss-cpu,uv,pip,jiter,tiktoken,numpy,scipy,pandas,pillow,scikit_learn,pyarrow,cryptography,fastuuid,hf_xet,maturin,pydantic_core,rpds_py,safetensors,tokenizers",
"os": "linux",
"arch": "x86_64,aarch64",
"py_version": "312"
}
}
]
- name: hermetic
value: 'true'
- name: dockerfile
Expand Down
5 changes: 4 additions & 1 deletion Containerfile
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,10 @@ COPY ${LSC_SOURCE_DIR}/pyproject.toml ${LSC_SOURCE_DIR}/LICENSE ${LSC_SOURCE_DIR
# PIP_FIND_LINKS=/cachi2/output/deps/pip
# PIP_NO_INDEX=true
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; \
. /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
Expand Down
5 changes: 5 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
SHELL := /bin/bash

ARTIFACT_DIR := $(if $(ARTIFACT_DIR),$(ARTIFACT_DIR),tests/test_results)
PATH_TO_PLANTUML := ~/bin

Expand Down Expand Up @@ -114,6 +116,9 @@ konflux-requirements: ## generate hermetic requirements.*.txt file for konflux b
./scripts/remove_torch_deps.sh requirements.x86_64.txt
./scripts/remove_torch_deps.sh requirements.aarch64.txt
echo "torch==${TORCH_VERSION}" | uv pip compile - -o requirements.torch.txt --generate-hashes --python-version 3.12 --torch-backend cpu --emit-index-url --no-deps --index-url https://download.pytorch.org/whl/cpu --refresh
uv run pybuild-deps compile --output-file=requirements-build.txt \
<(grep -v "^faiss-cpu" requirements.hermetic.txt) \
<(grep -v "^faiss-cpu" requirements.x86_64.txt)
Comment on lines +119 to +121
Copy link
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
# Check if requirements.hermetic.txt is generated by a Makefile target or exists in the repository

echo "=== Checking Makefile for requirements.hermetic.txt generation ==="
rg -n "requirements\.hermetic\.txt" Makefile

echo -e "\n=== Checking if requirements.hermetic.txt exists in repository ==="
fd -t f "requirements.hermetic.txt"

echo -e "\n=== Analyzing konflux-requirements target ==="
rg -A 10 "^konflux-requirements:" Makefile

echo -e "\n=== Checking broader Makefile for all references to .hermetic ==="
rg -n "hermetic" Makefile

Repository: lightspeed-core/lightspeed-stack

Length of output: 1556


Verify that input file exists and is generated by the appropriate target.

The konflux-requirements target uses requirements.hermetic.txt as input (line 120), but does not generate it. The target only generates requirements.x86_64.txt, requirements.aarch64.txt, and requirements.torch.txt. While the file exists in the repository, it is not managed by this Makefile target, risking desynchronization with the newly generated .x86_64.txt and .aarch64.txt files. Either add a command to generate requirements.hermetic.txt within this target, or update the target to use one of the files it actually generates.

🤖 Prompt for AI Agents
In @Makefile around lines 119 - 121, The konflux-requirements Makefile target
references requirements.hermetic.txt as an input but never generates it; update
the konflux-requirements target so its inputs are consistent by either adding a
step that produces requirements.hermetic.txt (e.g., assemble it from the
generated requirements.x86_64.txt, requirements.aarch64.txt, and
requirements.torch.txt before calling uv run pybuild-deps) or change the
pybuild-deps invocation to use one of the files the target actually creates
(such as requirements.x86_64.txt or requirements.torch.txt); modify the target
that currently invokes uv run pybuild-deps in konflux-requirements to include
the new generation step or swap the input file accordingly so the invoked files
are guaranteed to exist.


help: ## Show this help screen
@echo 'Usage: make <OPTIONS> ... <TARGETS>'
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ dev = [
"openapi-to-md>=0.1.0b2",
"pytest-subtests>=0.14.2",
"bandit>=1.8.6",
"pybuild-deps>=0.5.0",
]
llslibdev = [
# To check llama-stack API provider dependecies:
Expand Down
Loading
Loading