-
Notifications
You must be signed in to change notification settings - Fork 103
LCORE-3121: [Cleanup] scripts/konflux_requirements.sh vs scripts konflux_resolve.py #2720
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -985,13 +985,8 @@ def load_wheel_only(path: str) -> set[str]: | |
|
|
||
| _UV_COMPILED_RE = re.compile(r"^([a-zA-Z0-9][a-zA-Z0-9._-]*)([=<>!~].*)?$") | ||
|
|
||
|
|
||
| UV_BINARY = os.environ.get( | ||
| "UV_BINARY", | ||
| os.path.join( | ||
| os.path.dirname(__file__), "..", "..", "uv", "target", "release", "uv" | ||
| ), | ||
| ) | ||
| UV_IMAGE = os.environ.get("UV_IMAGE", "quay.io/syedriko/uv:prefer-index") | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🔒 Security & Privacy | 🛡️ Analyzed with Security Review | 🟠 Major | ⚡ Quick win 🧩 Analysis chain🏁 Script executed: sed -n '970,1045p' scripts/konflux_resolve.py
rg -n 'UV_IMAGE|quay\.io/.+@sha256|podman run|docker run|konflux-requirements' Makefile README.md scripts .github .tekton 2>/dev/nullRepository: lightspeed-core/lightspeed-stack Length of output: 10442 🏁 Script executed: #!/bin/bash
set -eu
printf '%s\n' '--- Make target ---'
sed -n '345,375p' Makefile
printf '%s\n' '--- script entry/callers ---'
rg -n -C 3 'uv_resolve\(|konflux-requirements|konflux_resolve\.py|UV_IMAGE|CONTAINER_RUNTIME' scripts Makefile .tekton .github README.md 2>/dev/null
printf '%s\n' '--- image pin patterns ---'
rg -n -g '*.yaml' -g '*.yml' -g 'Dockerfile*' -g '*.toml' -g '*.py' 'quay\.io/|docker\.io/|ghcr\.io/|`@sha256`:' . 2>/dev/null | head -250
printf '%s\n' '--- tracked sensitive-looking files ---'
git ls-files | rg '(^|/)(\.env|.*secret.*|.*credential.*|.*token.*|.*key.*|.*password.*|.*config.*)$' | head -200
printf '%s\n' '--- script tail ---'
tail -80 scripts/konflux_resolve.pyRepository: lightspeed-core/lightspeed-stack Length of output: 21642 🤖 get_repo_knowledge executed:
Length of output: 24979 Security Misconfiguration Reachability: External Pin 🤖 Prompt for AI Agents |
||
| CONTAINER_RUNTIME = os.environ.get("CONTAINER_RUNTIME", "podman") | ||
|
|
||
|
|
||
| def uv_resolve( | ||
|
|
@@ -1012,9 +1007,15 @@ def uv_resolve( | |
| else "requirements.overrides.txt" | ||
| ), | ||
| ) | ||
| uv = UV_BINARY if os.path.isfile(UV_BINARY) else "uv" | ||
| cmd = [ | ||
| uv, | ||
| CONTAINER_RUNTIME, | ||
| "run", | ||
| "--rm", | ||
| "--volume", | ||
| f"{os.getcwd()}:/io:ro", | ||
| "--workdir", | ||
| "/io", | ||
| UV_IMAGE, | ||
| "pip", | ||
| "compile", | ||
| "pyproject.toml", | ||
|
|
@@ -1027,6 +1028,8 @@ def uv_resolve( | |
| rhoai_index_url, | ||
| "--default-index", | ||
| "https://pypi.org/simple/", | ||
| "--index-strategy", | ||
| "prefer-index", | ||
| "--emit-index-annotation", | ||
| "--no-sources", | ||
| "--group", | ||
|
|
||
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.
🎯 Functional Correctness | 🟠 Major | ⚡ Quick win
🔎 Supported by static analysis
🏁 Script executed:
Repository: lightspeed-core/lightspeed-stack
Length of output: 5315
🏁 Script executed:
Repository: lightspeed-core/lightspeed-stack
Length of output: 3349
Forward the selected container runtime.
When
CONTAINER_RUNTIMEis selected byMakefile:19, it is not exported to recipes. The documentedmake konflux-requirementsinvocation therefore leaves the variable unset inscripts/konflux_resolve.py, which defaults topodmaneven when Make selected Docker.Proposed fix
📝 Committable suggestion
🤖 Prompt for AI Agents