Skip to content

LCORE-858: image: add labels required by Konflux for releasing#1008

Merged
tisnik merged 1 commit intolightspeed-core:mainfrom
raptorsun:image-label
Jan 16, 2026
Merged

LCORE-858: image: add labels required by Konflux for releasing#1008
tisnik merged 1 commit intolightspeed-core:mainfrom
raptorsun:image-label

Conversation

@raptorsun
Copy link
Contributor

@raptorsun raptorsun commented Jan 16, 2026

Description

add labels required by Konflux for releasing.
to pass label checks like this: https://konflux-ui.apps.kflux-prd-rh02.0fk9.p1.openshiftapps.com/ns/rhtap-releng-tenant/applications/lightspeed-stack/pipelineruns/managed-kjnf7?releaseName=lightspeed-stack-wpgqn-1ee30aa-2k8hr

Type of change

  • Refactor
  • New feature
  • Bug fix
  • CVE fix
  • Optimization
  • Documentation Update
  • Configuration Update
  • Bump-up service version
  • Bump-up dependent library
  • Bump-up library or tool used for development (does not change the final image)
  • CI configuration change
  • Konflux configuration change
  • Unit tests improvement
  • Integration tests improvement
  • End to end tests improvement

Tools used to create PR

Identify any AI code assistants used in this PR (for transparency and review context)

  • Assisted-by: (e.g., Claude, CodeRabbit, Ollama, etc., N/A if not used)
  • Generated by: (e.g., tool name and version; N/A if not used)

Related Tickets & Documents

  • Related Issue #
  • Closes #

Checklist before requesting a review

  • I have performed a self-review of my code.
  • PR has passed all pre-merge test jobs.
  • If it is a core feature, I have added thorough tests.

Testing

  • Please provide detailed steps to perform tests related to this code change.
  • How were the fix/results from this change verified? Please provide relevant screenshots or results.

Summary by CodeRabbit

Release Notes

  • Chores
    • Enriched container image metadata with additional descriptive labels for improved image identification and registry compatibility.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 16, 2026

Walkthrough

The Containerfile's LABEL instruction is extended from a single vendor label to include comprehensive image metadata fields such as name, component, display name, summary, description, and tags, all using backslash continuations in a multi-line format. No runtime behavior changes.

Changes

Cohort / File(s) Summary
Container Image Metadata
Containerfile
Extended LABEL instruction with additional metadata fields (name, com.redhat.component, cpe, io.k8s.display-name, summary, description, io.k8s.description, io.openshift.tags) using multi-line backslash continuations

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Suggested reviewers

  • tisnik
🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and specifically describes the main change: adding Konflux-required labels to the container image for releasing purposes.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

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


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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Signed-off-by: Haoyu Sun <hasun@redhat.com>
Copy link
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

🤖 Fix all issues with AI agents
In `@Containerfile`:
- Around line 95-103: The LABEL entry for cpe currently hardcodes
"cpe:/a:redhat:lightspeed_core:0.4" which must match the product version; update
the cpe value to "cpe:/a:redhat:lightspeed_core:0.3.1" (or parameterize it to
read the canonical version source such as src/version.py) so the LABEL cpe
matches the project's authoritative version; locate the LABEL block containing
the cpe key in the Containerfile and replace the version portion or wire it to a
build-time variable that is kept in sync with src/version.py.
📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 828421b and 7caf63e.

📒 Files selected for processing (1)
  • Containerfile
🧰 Additional context used
🧠 Learnings (1)
📚 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:

  • 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: E2E: library mode / ci
  • GitHub Check: E2E: server mode / ci
  • GitHub Check: Konflux kflux-prd-rh02 / lightspeed-stack-on-pull-request

✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.

Comment on lines +95 to +103
LABEL vendor="Red Hat, Inc." \
name="lightspeed-core/lightspeed-stack-rhel9" \
com.redhat.component="lightspeed-core/lightspeed-stack" \
cpe="cpe:/a:redhat:lightspeed_core:0.4::el9" \
io.k8s.display-name="Lightspeed Stack" \
summary="A service that provides a REST API for the Lightspeed Core Stack." \
description="Lightspeed Core Stack (LCS) is an AI-powered assistant that provides answers to product questions using backend LLM services, agents, and RAG databases." \
io.k8s.description="Lightspeed Core Stack (LCS) is an AI-powered assistant that provides answers to product questions using backend LLM services, agents, and RAG databases." \
io.openshift.tags="lightspeed-core,lightspeed-stack,lightspeed"
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
# Verify the CPE format and check version references

echo "=== Searching for CPE version references ==="
rg "cpe.*0\.4|0\.4.*cpe" -i || echo "No CPE 0.4 references found"

echo ""
echo "=== Checking for version information in configuration files ==="
rg "version.*=.*0\.|release.*version" -t yaml -t toml -t json || echo "No matching version definitions found"

echo ""
echo "=== Searching for version patterns in the repository ==="
rg "version.*0\." -t dockerfile -t yaml -t toml | head -20 || echo "No Dockerfile version patterns found"

echo ""
echo "=== Check for pyproject.toml or setup.py ==="
fd -t f "pyproject.toml|setup.py|setup.cfg|package.json" || echo "No standard project files found"

Repository: lightspeed-core/lightspeed-stack

Length of output: 50441


🏁 Script executed:

#!/bin/bash
# Check project-level version info and licensing metadata

echo "=== Checking for VERSION file or version constants ==="
fd -t f "VERSION|version" -i | grep -E "(VERSION|version|CHANGELOG)" | head -10

echo ""
echo "=== Check repository root for common metadata files ==="
ls -la / 2>/dev/null | grep -E "pyproject|setup|package|version|README|VERSION" || git ls-files | head -20

Repository: lightspeed-core/lightspeed-stack

Length of output: 1021


🏁 Script executed:

#!/bin/bash
# Get context around the Containerfile labels to understand versioning approach

echo "=== Checking full Containerfile for version-related content ==="
rg -n "version|VERSION|0\." Containerfile | head -30

echo ""
echo "=== Checking if CPE format matches standards elsewhere ==="
rg "cpe:/" -A1 -B1 || echo "No other CPE references found"

Repository: lightspeed-core/lightspeed-stack

Length of output: 527


🏁 Script executed:

#!/bin/bash
# Check project version files
echo "=== Checking src/version.py ===" 
head -30 src/version.py 2>/dev/null || echo "Not found"

echo ""
echo "=== Checking src/utils/llama_stack_version.py ===" 
head -30 src/utils/llama_stack_version.py 2>/dev/null || echo "Not found"

echo ""
echo "=== Checking for version patterns ===" 
rg "__version__|VERSION = " -A 1 src/version.py src/utils/llama_stack_version.py 2>/dev/null || echo "No version patterns found"

Repository: lightspeed-core/lightspeed-stack

Length of output: 1328


🏁 Script executed:

#!/bin/bash
# Check release/build documentation for version management context
echo "=== Checking pyproject.toml for version info ===" 
rg "version|tool.pdm" pyproject.toml | head -20

echo ""
echo "=== Checking if 0.4 appears in any release/build configs ===" 
rg "0\.4" pyproject.toml CHANGELOG.md README.md 2>/dev/null || echo "No 0.4 references in config/docs"

echo ""
echo "=== Checking git tags for version history ===" 
git tag -l | grep -E "0\.[0-9]" | head -10 || echo "No matching tags"

Repository: lightspeed-core/lightspeed-stack

Length of output: 554


Fix CPE version to match product version: 0.3.1 instead of 0.4.

The CPE currently hardcodes version 0.4, but the project's authoritative version is 0.3.1 (defined in src/version.py). The CPE must match the product version for Konflux compliance validation. Consider parameterizing the CPE version from a source that stays in sync with the release version to prevent future mismatches.

🤖 Prompt for AI Agents
In `@Containerfile` around lines 95 - 103, The LABEL entry for cpe currently
hardcodes "cpe:/a:redhat:lightspeed_core:0.4" which must match the product
version; update the cpe value to "cpe:/a:redhat:lightspeed_core:0.3.1" (or
parameterize it to read the canonical version source such as src/version.py) so
the LABEL cpe matches the project's authoritative version; locate the LABEL
block containing the cpe key in the Containerfile and replace the version
portion or wire it to a build-time variable that is kept in sync with
src/version.py.

Copy link
Contributor

@tisnik tisnik left a comment

Choose a reason for hiding this comment

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

LGTM

@tisnik tisnik merged commit 4767efc into lightspeed-core:main Jan 16, 2026
21 of 23 checks passed
@coderabbitai coderabbitai bot mentioned this pull request Feb 4, 2026
18 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants