Skip to content

Commit 9d14570

Browse files
authored
Merge branch 'main' into lcore-1246
2 parents bcdcda4 + d5b791c commit 9d14570

115 files changed

Lines changed: 7256 additions & 983 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.

.github/workflows/e2e_tests.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ jobs:
1818
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
1919
E2E_OPENAI_MODEL: ${{ vars.E2E_OPENAI_MODEL }}
2020
E2E_DEPLOYMENT_MODE: ${{ matrix.mode }}
21+
FAISS_VECTOR_STORE_ID: ${{ vars.FAISS_VECTOR_STORE_ID }}
2122

2223
steps:
2324
- uses: actions/checkout@v4

.github/workflows/e2e_tests_providers.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ jobs:
2424
CLIENT_ID: ${{ secrets.CLIENT_ID }}
2525
TENANT_ID: ${{ secrets.TENANT_ID }}
2626
E2E_DEPLOYMENT_MODE: ${{ matrix.mode }}
27+
FAISS_VECTOR_STORE_ID: ${{ vars.FAISS_VECTOR_STORE_ID }}
2728

2829
steps:
2930
- uses: actions/checkout@v4

.github/workflows/e2e_tests_rhaiis.yaml

Lines changed: 61 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,21 @@ jobs:
1111
e2e_tests:
1212
runs-on: ubuntu-latest
1313
strategy:
14+
fail-fast: false
1415
matrix:
16+
mode: ["server", "library"]
1517
environment: [ "rhaiis" ]
18+
19+
name: "RHAIIS E2E: ${{ matrix.mode }} mode / ${{ matrix.environment }}"
20+
1621
env:
22+
E2E_DEPLOYMENT_MODE: ${{ matrix.mode }}
1723
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
1824
RHAIIS_URL: ${{ secrets.RHAIIS_URL }}
25+
RHAIIS_PORT: ${{ secrets.RHAIIS_PORT }}
1926
RHAIIS_API_KEY: ${{ secrets.RHAIIS_API_KEY }}
2027
RHAIIS_MODEL: ${{ vars.RHAIIS_MODEL }}
28+
FAISS_VECTOR_STORE_ID: ${{ vars.FAISS_VECTOR_STORE_ID }}
2129

2230
steps:
2331
- uses: actions/checkout@v4
@@ -46,37 +54,18 @@ jobs:
4654
echo "=== Recent commits (should show setup-metrics commits) ==="
4755
git log --oneline -5
4856
49-
- uses: 1arp/create-a-file-action@0.4.5
50-
with:
51-
path: '.'
52-
isAbsolutePath: false
53-
file: 'lightspeed-stack.yaml'
54-
content: |
55-
name: Lightspeed Core Service (LCS)
56-
service:
57-
host: 0.0.0.0
58-
port: 8080
59-
auth_enabled: false
60-
workers: 1
61-
color_log: true
62-
access_log: true
63-
llama_stack:
64-
# Uses a remote llama-stack service
65-
# The instance would have already been started with a llama-stack-run.yaml file
66-
use_as_library_client: false
67-
# Alternative for "as library use"
68-
# use_as_library_client: true
69-
# library_client_config_path: <path-to-llama-stack-run.yaml-file>
70-
url: http://llama-stack:8321
71-
api_key: xyzzy
72-
user_data_collection:
73-
feedback_enabled: true
74-
feedback_storage: "/tmp/data/feedback"
75-
transcripts_enabled: true
76-
transcripts_storage: "/tmp/data/transcripts"
77-
78-
authentication:
79-
module: "noop"
57+
- name: Load lightspeed-stack.yaml configuration
58+
run: |
59+
MODE="${{ matrix.mode }}"
60+
CONFIG_FILE="tests/e2e/configuration/${MODE}-mode/lightspeed-stack.yaml"
61+
echo "Loading configuration for ${MODE} mode from ${CONFIG_FILE}"
62+
63+
if [ ! -f "${CONFIG_FILE}" ]; then
64+
echo "Configuration file not found: ${CONFIG_FILE}"
65+
exit 1
66+
fi
67+
68+
cp "${CONFIG_FILE}" lightspeed-stack.yaml
8069
8170
- name: Select and configure run.yaml
8271
env:
@@ -120,20 +109,22 @@ jobs:
120109
121110
- name: Test RHAIIS connectivity
122111
run: |
123-
curl -f ${RHAIIS_URL}:8000/v1/models -H "Authorization: Bearer ${RHAIIS_API_KEY}"
112+
curl -f ${RHAIIS_URL}:${RHAIIS_PORT}/v1/models -H "Authorization: Bearer ${RHAIIS_API_KEY}"
124113
125114
- name: Docker Login for quay access
115+
if: matrix.mode == 'server'
126116
env:
127117
QUAY_ROBOT_USERNAME: ${{ secrets.QUAY_DOWNSTREAM_USERNAME }}
128118
QUAY_ROBOT_TOKEN: ${{ secrets.QUAY_DOWNSTREAM_TOKEN }}
129119
run: |
130120
echo $QUAY_ROBOT_TOKEN | docker login quay.io -u=$QUAY_ROBOT_USERNAME --password-stdin
131121
132-
- name: Run service manually
133-
run: |
122+
- name: Run services (Server Mode)
123+
if: matrix.mode == 'server'
124+
run: |
134125
docker compose version
135126
docker compose up -d
136-
127+
137128
# Check for errors and show logs if any services failed
138129
if docker compose ps | grep -E 'Exit|exited|stopped'; then
139130
echo "Some services failed to start - showing logs:"
@@ -143,6 +134,20 @@ jobs:
143134
echo "All services started successfully"
144135
fi
145136
137+
- name: Run services (Library Mode)
138+
if: matrix.mode == 'library'
139+
run: |
140+
echo "Starting service in library mode (1 container)"
141+
docker compose -f docker-compose-library.yaml up -d
142+
143+
if docker compose -f docker-compose-library.yaml ps | grep -E 'Exit|exited|stopped'; then
144+
echo "Service failed to start - showing logs:"
145+
docker compose -f docker-compose-library.yaml logs
146+
exit 1
147+
else
148+
echo "Service started successfully"
149+
fi
150+
146151
- name: Wait for services
147152
run: |
148153
echo "Waiting for services to be healthy..."
@@ -152,12 +157,20 @@ jobs:
152157
run: |
153158
echo "Testing basic connectivity before full test suite..."
154159
curl -f http://localhost:8080/v1/models || {
155-
echo "❌ Basic connectivity failed - showing logs before running full tests"
156-
docker compose logs --tail=30
160+
echo "Basic connectivity failed - showing logs"
161+
if [ "${{ matrix.mode }}" == "server" ]; then
162+
docker compose logs --tail=30
163+
else
164+
docker compose -f docker-compose-library.yaml logs --tail=30
165+
fi
157166
exit 1
158167
}
159168
160169
- name: Run e2e tests
170+
env:
171+
TERM: xterm-256color
172+
FORCE_COLOR: 1
173+
E2E_DEPLOYMENT_MODE: ${{ matrix.mode }}
161174
run: |
162175
echo "Installing test dependencies..."
163176
pip install uv
@@ -170,9 +183,14 @@ jobs:
170183
if: failure()
171184
run: |
172185
echo "=== Test failure logs ==="
173-
echo "=== llama-stack logs ==="
174-
docker compose logs llama-stack
175-
176-
echo ""
177-
echo "=== lightspeed-stack logs ==="
178-
docker compose logs lightspeed-stack
186+
187+
if [ "${{ matrix.mode }}" == "server" ]; then
188+
echo "=== llama-stack logs ==="
189+
docker compose logs llama-stack
190+
echo ""
191+
echo "=== lightspeed-stack logs ==="
192+
docker compose logs lightspeed-stack
193+
else
194+
echo "=== lightspeed-stack (library mode) logs ==="
195+
docker compose -f docker-compose-library.yaml logs lightspeed-stack
196+
fi

.github/workflows/e2e_tests_rhelai.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ jobs:
1818
RHEL_AI_API_KEY: ${{ secrets.RHEL_AI_API_KEY }}
1919
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
2020
RHEL_AI_MODEL: ${{ vars.RHEL_AI_MODEL }}
21+
FAISS_VECTOR_STORE_ID: ${{ vars.FAISS_VECTOR_STORE_ID }}
2122

2223
steps:
2324
- uses: actions/checkout@v4

CLAUDE.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ src/
5353

5454
#### Module Standards
5555
- All modules start with descriptive docstrings explaining purpose
56-
- Use `logger = logging.getLogger(__name__)` pattern for module logging
56+
- Use `logger = get_logger(__name__)` from `log.py` for module logging
5757
- Package `__init__.py` files contain brief package descriptions
5858
- Central `constants.py` for shared constants with descriptive comments
5959
- Type aliases defined at module level for clarity
@@ -89,7 +89,7 @@ src/
8989
- Handle `APIConnectionError` from Llama Stack
9090

9191
#### Logging Standards
92-
- Use `import logging` and module logger pattern: `logger = logging.getLogger(__name__)`
92+
- Use `from log import get_logger` and module logger pattern: `logger = get_logger(__name__)`
9393
- Standard log levels with clear purposes:
9494
- `logger.debug()` - Detailed diagnostic information
9595
- `logger.info()` - General information about program execution

docker-compose-library.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ services:
4949
- CLIENT_SECRET=${CLIENT_SECRET:-}
5050
# RHAIIS
5151
- RHAIIS_URL=${RHAIIS_URL:-}
52+
- RHAIIS_PORT=${RHAIIS_PORT:-}
5253
- RHAIIS_API_KEY=${RHAIIS_API_KEY:-}
5354
- RHAIIS_MODEL=${RHAIIS_MODEL:-}
5455
# RHEL AI
@@ -66,6 +67,8 @@ services:
6667
- WATSONX_API_KEY=${WATSONX_API_KEY:-}
6768
# Enable debug logging if needed
6869
- LLAMA_STACK_LOGGING=${LLAMA_STACK_LOGGING:-}
70+
# FAISS test
71+
- FAISS_VECTOR_STORE_ID=${FAISS_VECTOR_STORE_ID:-}
6972
healthcheck:
7073
test: ["CMD", "curl", "-f", "http://localhost:8080/liveness"]
7174
interval: 10s # how often to run the check

docker-compose.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ services:
4343
- CLIENT_SECRET=${CLIENT_SECRET:-}
4444
# RHAIIS
4545
- RHAIIS_URL=${RHAIIS_URL}
46+
- RHAIIS_PORT=${RHAIIS_PORT}
4647
- RHAIIS_API_KEY=${RHAIIS_API_KEY}
4748
- RHAIIS_MODEL=${RHAIIS_MODEL}
4849
# RHEL AI
@@ -60,6 +61,8 @@ services:
6061
- WATSONX_API_KEY=${WATSONX_API_KEY:-}
6162
# Enable debug logging if needed
6263
- LLAMA_STACK_LOGGING=${LLAMA_STACK_LOGGING:-}
64+
# FAISS test
65+
- FAISS_VECTOR_STORE_ID=${FAISS_VECTOR_STORE_ID:-}
6366
networks:
6467
- lightspeednet
6568
healthcheck:

docs/a2a_protocol.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -771,7 +771,7 @@ service:
771771
color_log: true
772772
```
773773

774-
Check logs for entries from `app.endpoints.handlers` logger.
774+
Check logs for entries from `app.endpoints.a2a` logger.
775775

776776
## Protocol Version
777777

0 commit comments

Comments
 (0)