Skip to content

Commit 778eeb6

Browse files
authored
Merge branch 'lightspeed-core:main' into LCORE_2035_koflux_tls_e2e_fix
2 parents 9b18ba4 + f1c6cec commit 778eeb6

104 files changed

Lines changed: 10643 additions & 1711 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.konflux/requirements.hashes.source.txt

Lines changed: 240 additions & 194 deletions
Large diffs are not rendered by default.

.konflux/requirements.hashes.wheel.txt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,11 @@ chevron==0.14.0 \
2727
--hash=sha256:215f5e3e7ac75d150eadfc0f8c651b3815dc36813e122484b1ed68e142e5adfb
2828
click==8.1.8 \
2929
--hash=sha256:11fa3d5230fee43910d853098461cbb0d9d3f59b70c63629bf237101ada5ee0f
30-
cryptography==46.0.5 \
31-
--hash=sha256:2b44c9fd892f763465b2d7782bf310d65c04dab741b1241f5be203ccf022368d \
32-
--hash=sha256:661cf199efa488e0c5fb4987d36214e11c1fe2dfb842a1a330b1854ff069f8d3 \
33-
--hash=sha256:88347ad17f60b60e31e5f2b58e37339d88fa90bfa4f0d35528b3bd18d464427b \
34-
--hash=sha256:bb1b90386c7b5d3d8c9d8d53b207cfbe5c3e639457ff9ebe84f2131918b785a9
30+
cryptography==46.0.7 \
31+
--hash=sha256:0ab2a8e458e087bc69b372b28142bcd6075a00b5a243af5929859dc4bccfaebf \
32+
--hash=sha256:537fe5301361498d49fef0b7d36d1153bcf6abc81ff993a29c85bb55040e96c7 \
33+
--hash=sha256:6c984b35f55539b0c2cbb6e09ac5f20e91dcaead8817f1c842af969a1e5f17c7 \
34+
--hash=sha256:98e8d65c1c97595b0b21ff737b69f3be2cd92f8e437b999c4c38220d376f2e66
3535
dill==0.4.1 \
3636
--hash=sha256:ae5bdc0f88e3a7998df6170245749d3e717f20a42cb982b080f8a98285a5cd8e
3737
distro==1.9.0 \

.konflux/requirements.overrides.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ tokenizers==0.22.2
55
scipy==1.17.0
66
# aiohttp==3.13.3
77
aiosqlite==0.22.1
8-
cryptography==46.0.5
8+
cryptography==46.0.7
99
anyio==4.12.1
1010
# datasets==4.5.0
1111
pandas==2.3.3

.tekton/lightspeed-stack-pull-request.yaml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ spec:
281281
- name: name
282282
value: buildah-remote-oci-ta
283283
- name: bundle
284-
value: quay.io/konflux-ci/tekton-catalog/task-buildah-remote-oci-ta:0.9@sha256:f667d1146533b1d49829c08097e31faf27db24563da576434a707353de62099f
284+
value: quay.io/konflux-ci/tekton-catalog/task-buildah-remote-oci-ta:0.9@sha256:77007259cc87f32d63d2c201226aadaab98313cfd4e02b46abc243c4d2cc27bd
285285
- name: kind
286286
value: task
287287
resolver: bundles
@@ -324,7 +324,7 @@ spec:
324324
- name: name
325325
value: source-build-oci-ta
326326
- name: bundle
327-
value: quay.io/konflux-ci/tekton-catalog/task-source-build-oci-ta:0.3@sha256:0917cfc7772e82cb8e74743c2104f43bcf2596aceafe87eec6fce69a8cac5f06
327+
value: quay.io/konflux-ci/tekton-catalog/task-source-build-oci-ta:0.3@sha256:8567bb7bf8fa9147c96b297533336fa7079ecf972cb86c09ccdd6bddedb25711
328328
- name: kind
329329
value: task
330330
resolver: bundles
@@ -398,7 +398,7 @@ spec:
398398
- name: name
399399
value: ecosystem-cert-preflight-checks
400400
- name: bundle
401-
value: quay.io/konflux-ci/tekton-catalog/task-ecosystem-cert-preflight-checks:0.2@sha256:9c300728a03f41beee9a689422d66513d32ab5f804664fe561b11cebacd07799
401+
value: quay.io/konflux-ci/tekton-catalog/task-ecosystem-cert-preflight-checks:0.2@sha256:88f4fd6d7812a3c46f120f3035974f5fb8cb06b5e3e927badf6e8370f1516a88
402402
- name: kind
403403
value: task
404404
resolver: bundles
@@ -428,7 +428,7 @@ spec:
428428
- name: name
429429
value: sast-snyk-check-oci-ta
430430
- name: bundle
431-
value: quay.io/konflux-ci/tekton-catalog/task-sast-snyk-check-oci-ta:0.4@sha256:8f3ecbeaff579e41b8278f82d7fabac27845db17a8e687ea6c510c0c9aceabbb
431+
value: quay.io/konflux-ci/tekton-catalog/task-sast-snyk-check-oci-ta:0.4@sha256:0ebf28a0abd5a167438d4628938a74ade6f00a44a4b7ed1cfa9cfc57a5b24748
432432
- name: kind
433433
value: task
434434
resolver: bundles
@@ -551,7 +551,7 @@ spec:
551551
- name: name
552552
value: sast-shell-check-oci-ta
553553
- name: bundle
554-
value: quay.io/konflux-ci/tekton-catalog/task-sast-shell-check-oci-ta:0.1@sha256:c4ef47e3b4e0508572d266fb745be7e374c29dc02580328cbe9f4d472a8aca57
554+
value: quay.io/konflux-ci/tekton-catalog/task-sast-shell-check-oci-ta:0.1@sha256:3cbb3535af6e7d4396858179a6427caaffb2e68775594795692fc01f28ae313f
555555
- name: kind
556556
value: task
557557
resolver: bundles
@@ -579,7 +579,7 @@ spec:
579579
- name: name
580580
value: sast-unicode-check-oci-ta
581581
- name: bundle
582-
value: quay.io/konflux-ci/tekton-catalog/task-sast-unicode-check-oci-ta:0.4@sha256:90efa582de7770d55102b74014a765cd16a25a56f2cf644b56a788c70c4dc749
582+
value: quay.io/konflux-ci/tekton-catalog/task-sast-unicode-check-oci-ta:0.4@sha256:223812001607b07f0e07d56bef7b7d619144e660c0c57f21ddd44ce0c8c4785b
583583
- name: kind
584584
value: task
585585
resolver: bundles
@@ -641,7 +641,7 @@ spec:
641641
- name: name
642642
value: rpms-signature-scan
643643
- name: bundle
644-
value: quay.io/konflux-ci/tekton-catalog/task-rpms-signature-scan:0.2@sha256:41720da9dfe26f33b0bdc46bbf8667a27dae4790d8e5c5f4412224658de7b213
644+
value: quay.io/konflux-ci/tekton-catalog/task-rpms-signature-scan:0.2@sha256:237c54b069d16c3785d1302f19be309aa6c0ae2313d446e30cb74671e07ca676
645645
- name: kind
646646
value: task
647647
resolver: bundles

.tekton/lightspeed-stack-push.yaml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ spec:
262262
- name: name
263263
value: buildah-remote-oci-ta
264264
- name: bundle
265-
value: quay.io/konflux-ci/tekton-catalog/task-buildah-remote-oci-ta:0.9@sha256:f667d1146533b1d49829c08097e31faf27db24563da576434a707353de62099f
265+
value: quay.io/konflux-ci/tekton-catalog/task-buildah-remote-oci-ta:0.9@sha256:77007259cc87f32d63d2c201226aadaab98313cfd4e02b46abc243c4d2cc27bd
266266
- name: kind
267267
value: task
268268
resolver: bundles
@@ -305,7 +305,7 @@ spec:
305305
- name: name
306306
value: source-build-oci-ta
307307
- name: bundle
308-
value: quay.io/konflux-ci/tekton-catalog/task-source-build-oci-ta:0.3@sha256:0917cfc7772e82cb8e74743c2104f43bcf2596aceafe87eec6fce69a8cac5f06
308+
value: quay.io/konflux-ci/tekton-catalog/task-source-build-oci-ta:0.3@sha256:8567bb7bf8fa9147c96b297533336fa7079ecf972cb86c09ccdd6bddedb25711
309309
- name: kind
310310
value: task
311311
resolver: bundles
@@ -379,7 +379,7 @@ spec:
379379
- name: name
380380
value: ecosystem-cert-preflight-checks
381381
- name: bundle
382-
value: quay.io/konflux-ci/tekton-catalog/task-ecosystem-cert-preflight-checks:0.2@sha256:9c300728a03f41beee9a689422d66513d32ab5f804664fe561b11cebacd07799
382+
value: quay.io/konflux-ci/tekton-catalog/task-ecosystem-cert-preflight-checks:0.2@sha256:88f4fd6d7812a3c46f120f3035974f5fb8cb06b5e3e927badf6e8370f1516a88
383383
- name: kind
384384
value: task
385385
resolver: bundles
@@ -409,7 +409,7 @@ spec:
409409
- name: name
410410
value: sast-snyk-check-oci-ta
411411
- name: bundle
412-
value: quay.io/konflux-ci/tekton-catalog/task-sast-snyk-check-oci-ta:0.4@sha256:8f3ecbeaff579e41b8278f82d7fabac27845db17a8e687ea6c510c0c9aceabbb
412+
value: quay.io/konflux-ci/tekton-catalog/task-sast-snyk-check-oci-ta:0.4@sha256:0ebf28a0abd5a167438d4628938a74ade6f00a44a4b7ed1cfa9cfc57a5b24748
413413
- name: kind
414414
value: task
415415
resolver: bundles
@@ -532,7 +532,7 @@ spec:
532532
- name: name
533533
value: sast-shell-check-oci-ta
534534
- name: bundle
535-
value: quay.io/konflux-ci/tekton-catalog/task-sast-shell-check-oci-ta:0.1@sha256:c4ef47e3b4e0508572d266fb745be7e374c29dc02580328cbe9f4d472a8aca57
535+
value: quay.io/konflux-ci/tekton-catalog/task-sast-shell-check-oci-ta:0.1@sha256:3cbb3535af6e7d4396858179a6427caaffb2e68775594795692fc01f28ae313f
536536
- name: kind
537537
value: task
538538
resolver: bundles
@@ -560,7 +560,7 @@ spec:
560560
- name: name
561561
value: sast-unicode-check-oci-ta
562562
- name: bundle
563-
value: quay.io/konflux-ci/tekton-catalog/task-sast-unicode-check-oci-ta:0.4@sha256:90efa582de7770d55102b74014a765cd16a25a56f2cf644b56a788c70c4dc749
563+
value: quay.io/konflux-ci/tekton-catalog/task-sast-unicode-check-oci-ta:0.4@sha256:223812001607b07f0e07d56bef7b7d619144e660c0c57f21ddd44ce0c8c4785b
564564
- name: kind
565565
value: task
566566
resolver: bundles
@@ -625,7 +625,7 @@ spec:
625625
- name: name
626626
value: rpms-signature-scan
627627
- name: bundle
628-
value: quay.io/konflux-ci/tekton-catalog/task-rpms-signature-scan:0.2@sha256:41720da9dfe26f33b0bdc46bbf8667a27dae4790d8e5c5f4412224658de7b213
628+
value: quay.io/konflux-ci/tekton-catalog/task-rpms-signature-scan:0.2@sha256:237c54b069d16c3785d1302f19be309aa6c0ae2313d446e30cb74671e07ca676
629629
- name: kind
630630
value: task
631631
resolver: bundles

Makefile

Lines changed: 35 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,16 @@ LLAMA_STACK_IMAGE ?= lightspeed-llama-stack:local
1717
LLAMA_STACK_PORT ?= 8321
1818
CONTAINER_RUNTIME ?= $(shell command -v podman 2>/dev/null || command -v docker 2>/dev/null)
1919

20-
.PHONY: run build-llama-stack-image remove-llama-stack-container start-llama-stack-container wait-for-llama-stack-health clean-llama-stack
20+
.PHONY: run run-stack build-llama-stack-image remove-llama-stack-container stop-llama-stack-container start-llama-stack-container wait-for-llama-stack-health clean-llama-stack
2121

22-
run: start-llama-stack-container ## Run the service locally with llama-stack container
23-
@echo "Starting Lightspeed Core Stack..."
22+
run-stack: ## Run lightspeed-stack directly, without building dependent service/s
2423
uv run src/lightspeed_stack.py -c $(CONFIG)
2524

25+
run: start-llama-stack-container ## Run the service locally with dependent services
26+
@echo "Starting Lightspeed Core Stack..."
27+
@trap 'echo ""; echo "Stopping services..."; $(MAKE) stop-llama-stack-container' EXIT INT TERM; \
28+
$(MAKE) run-stack
29+
2630
build-llama-stack-image: remove-llama-stack-container ## Build llama-stack container image
2731
@echo "Building llama-stack container image..."
2832
@if [ -z "$(CONTAINER_RUNTIME)" ]; then \
@@ -31,10 +35,26 @@ build-llama-stack-image: remove-llama-stack-container ## Build llama-stack conta
3135
fi
3236
$(CONTAINER_RUNTIME) build -f deploy/llama-stack/test.containerfile -t $(LLAMA_STACK_IMAGE) .
3337

34-
remove-llama-stack-container: ## Remove existing llama-stack container
38+
stop-llama-stack-container: ## Gracefully stop llama-stack container
39+
@if [ -n "$(CONTAINER_RUNTIME)" ] && $(CONTAINER_RUNTIME) inspect $(LLAMA_STACK_CONTAINER_NAME) >/dev/null 2>&1; then \
40+
echo "Stopping llama-stack container (timeout: 10s)..."; \
41+
if $(CONTAINER_RUNTIME) stop -t 10 $(LLAMA_STACK_CONTAINER_NAME) 2>/dev/null; then \
42+
echo "✓ Container stopped gracefully"; \
43+
else \
44+
echo "⚠ Container did not stop gracefully, capturing logs..."; \
45+
$(CONTAINER_RUNTIME) logs $(LLAMA_STACK_CONTAINER_NAME) > /tmp/llama-stack-failure.log 2>&1 || true; \
46+
echo "Logs saved to /tmp/llama-stack-failure.log"; \
47+
$(CONTAINER_RUNTIME) kill $(LLAMA_STACK_CONTAINER_NAME) 2>/dev/null || true; \
48+
fi; \
49+
fi
50+
51+
remove-llama-stack-container: ## Remove llama-stack container (saves logs first)
3552
@if [ -n "$(CONTAINER_RUNTIME)" ] && $(CONTAINER_RUNTIME) inspect $(LLAMA_STACK_CONTAINER_NAME) >/dev/null 2>&1; then \
36-
echo "Removing existing llama-stack container..."; \
53+
echo "Saving container logs before removal..."; \
54+
$(CONTAINER_RUNTIME) logs $(LLAMA_STACK_CONTAINER_NAME) > /tmp/llama-stack-last-run.log 2>&1 || true; \
55+
echo "Removing llama-stack container..."; \
3756
$(CONTAINER_RUNTIME) rm -f $(LLAMA_STACK_CONTAINER_NAME); \
57+
echo "✓ Container removed (logs saved to /tmp/llama-stack-last-run.log)"; \
3858
fi
3959

4060
start-llama-stack-container: build-llama-stack-image ## Start llama-stack container
@@ -47,7 +67,7 @@ start-llama-stack-container: build-llama-stack-image ## Start llama-stack contai
4767
--health-timeout 5s \
4868
--health-retries 3 \
4969
--health-start-period 15s \
50-
-v $(PWD)/$(LLAMA_STACK_CONFIG):/opt/app-root/run.yaml:ro,z \
70+
-v $(PWD)/$(LLAMA_STACK_CONFIG):/opt/app-root/run.yaml:z \
5171
-v $(PWD)/$(CONFIG):/opt/app-root/lightspeed-stack.yaml:ro,z \
5272
-v $(PWD)/scripts/llama-stack-entrypoint.sh:/opt/app-root/enrich-entrypoint.sh:ro,z \
5373
-v $(PWD)/src/llama_stack_configuration.py:/opt/app-root/llama_stack_configuration.py:ro,z \
@@ -77,6 +97,13 @@ start-llama-stack-container: build-llama-stack-image ## Start llama-stack contai
7797
-e AWS_BEARER_TOKEN_BEDROCK \
7898
-e LLAMA_STACK_LOGGING=$${LLAMA_STACK_LOGGING:-} \
7999
-e FAISS_VECTOR_STORE_ID=$${FAISS_VECTOR_STORE_ID:-} \
100+
-e RH_SERVER_OKP \
101+
-e SOLR_URL \
102+
-e SOLR_COLLECTION \
103+
-e SOLR_VECTOR_FIELD \
104+
-e SOLR_CONTENT_FIELD \
105+
-e SOLR_EMBEDDING_MODEL \
106+
-e SOLR_EMBEDDING_DIM \
80107
$(LLAMA_STACK_IMAGE)
81108
@$(MAKE) wait-for-llama-stack-health
82109

@@ -101,6 +128,7 @@ clean-llama-stack: remove-llama-stack-container ## Remove container and image
101128
echo "Removing llama-stack image..."; \
102129
$(CONTAINER_RUNTIME) rmi $(LLAMA_STACK_IMAGE); \
103130
fi
131+
104132
run-llama-stack: ## Start Llama Stack with enriched config (for local service mode)
105133
uv run src/llama_stack_configuration.py -c $(CONFIG) -i $(LLAMA_STACK_CONFIG) -o $(LLAMA_STACK_CONFIG) && \
106134
uv run llama stack run $(LLAMA_STACK_CONFIG)
@@ -149,7 +177,7 @@ format: ## Format the code into unified format
149177
uv run black --line-length 88 src tests
150178
uv run ruff check src tests --fix
151179

152-
schema: ## Generate OpenAPI schema file
180+
schema: ## Generate OpenAPI schema file stored in docs subdirectory
153181
uv run scripts/generate_openapi_schema.py docs/openapi.json
154182

155183
openapi-doc: docs/openapi.json scripts/fix_openapi_doc.py ## Generate OpenAPI documentation

README.md

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
[![License](https://img.shields.io/badge/license-Apache-blue)](https://github.com/lightspeed-core/lightspeed-stack/blob/main/LICENSE)
77
[![made-with-python](https://img.shields.io/badge/Made%20with-Python-1f425f.svg)](https://www.python.org/)
88
[![Required Python version](https://img.shields.io/python/required-version-toml?tomlFilePath=https%3A%2F%2Fraw.githubusercontent.com%2Flightspeed-core%2Flightspeed-stack%2Frefs%2Fheads%2Fmain%2Fpyproject.toml)](https://www.python.org/)
9-
[![Tag](https://img.shields.io/github/v/tag/lightspeed-core/lightspeed-stack)](https://github.com/lightspeed-core/lightspeed-stack/releases/tag/0.6.0rc1)
9+
[![Tag](https://img.shields.io/github/v/tag/lightspeed-core/lightspeed-stack)](https://github.com/lightspeed-core/lightspeed-stack/releases/tag/0.6.0rc2)
1010

1111
Lightspeed Core Stack (LCS) is an AI-powered assistant that provides answers to product questions using backend LLM services, agents, and RAG databases.
1212

@@ -19,6 +19,7 @@ The service includes comprehensive user data collection capabilities for various
1919
* [Prerequisites](#prerequisites)
2020
* [Installation](#installation)
2121
* [Run LCS locally](#run-lcs-locally)
22+
* [Container Runtime Requirements](#container-runtime-requirements)
2223
* [Configuration](#configuration)
2324
* [Agentic Capabilities](#agentic-capabilities)
2425
* [LLM Compatibility](#llm-compatibility)
@@ -29,6 +30,7 @@ The service includes comprehensive user data collection capabilities for various
2930
* [Supported providers](#supported-providers)
3031
* [Integration with Llama Stack](#integration-with-llama-stack)
3132
* [Llama Stack as separate server](#llama-stack-as-separate-server)
33+
* [Degraded mode](#degraded-mode)
3234
* [MCP Server and Tool Configuration](#mcp-server-and-tool-configuration)
3335
* [Configuring MCP Servers](#configuring-mcp-servers)
3436
* [Configuring MCP Server Authentication](#configuring-mcp-server-authentication)
@@ -51,7 +53,7 @@ The service includes comprehensive user data collection capabilities for various
5153
* [System Prompt Literal](#system-prompt-literal)
5254
* [Custom Profile](#custom-profile)
5355
* [Control model/provider overrides via authorization](#control-modelprovider-overrides-via-authorization)
54-
* [Agent Skills](#agent-skills)
56+
* [Agent Skills (Upcoming)](#agent-skills-upcoming)
5557
* [Safety Shields](#safety-shields)
5658
* [Authentication](#authentication)
5759
* [CORS](#cors)
@@ -343,6 +345,20 @@ user_data_collection:
343345
transcripts_storage: "/tmp/data/transcripts"
344346
```
345347
348+
### Degraded mode
349+
350+
Lightspeed core is able to continue operating in a _degraded but safe_ mode if the LLS service is not started or fails to start. When degraded, the `/health` endpoint report the LLS status and any relevant impacts so operators and automation can detect and respond.
351+
352+
Degraded mode need to be enabled in `lightspeed-stack.yaml` configuration file:
353+
354+
```yaml
355+
allow_degraded_mode = true
356+
```
357+
358+
[NOTE] Ability to run in degraded mode is disabled by default.
359+
360+
361+
346362
### MCP Server and Tool Configuration
347363
348364
**Note**: The `run.yaml` configuration is currently an implementation detail. In the future, all configuration will be available directly from the lightspeed-core config.

deploy/llama-stack/test.containerfile

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
1-
# Upstream llama-stack built from Red Hat UBI
2-
FROM registry.access.redhat.com/ubi9/ubi-minimal
1+
# Upstream llama-stack built from Red Hat UBI Python 3.12 image
2+
FROM registry.access.redhat.com/ubi9/python-312
33

44
USER root
55

6-
# Install Python and build tools
7-
RUN microdnf install -y --nodocs --setopt=keepcache=0 --setopt=tsflags=nodocs \
8-
python3.12 python3.12-devel python3.12-pip git tar gcc gcc-c++ make
6+
# Install additional build tools
7+
RUN dnf install -y --nodocs --setopt=keepcache=0 --setopt=tsflags=nodocs \
8+
git tar gcc gcc-c++ make && \
9+
dnf clean all
910

1011
# Install uv
1112
ENV PATH="/root/.local/bin:${PATH}"

docker-compose.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,14 @@ services:
5757
- LLAMA_STACK_LOGGING=${LLAMA_STACK_LOGGING:-}
5858
# FAISS test
5959
- FAISS_VECTOR_STORE_ID=${FAISS_VECTOR_STORE_ID:-}
60+
# OKP/Solr RAG
61+
- RH_SERVER_OKP=${RH_SERVER_OKP:-}
62+
- SOLR_URL=${SOLR_URL:-}
63+
- SOLR_COLLECTION=${SOLR_COLLECTION:-}
64+
- SOLR_VECTOR_FIELD=${SOLR_VECTOR_FIELD:-}
65+
- SOLR_CONTENT_FIELD=${SOLR_CONTENT_FIELD:-}
66+
- SOLR_EMBEDDING_MODEL=${SOLR_EMBEDDING_MODEL:-}
67+
- SOLR_EMBEDDING_DIM=${SOLR_EMBEDDING_DIM:-}
6068
#required for enrichment
6169
- E2E_LLAMA_HOSTNAME=${E2E_LLAMA_HOSTNAME:-llama-stack}
6270
networks:

0 commit comments

Comments
 (0)