Skip to content

Commit 4594133

Browse files
authored
Merge pull request #1164 from are-ces/rhaiis-fix
LCORE-1335: Parametrized RHAIIS port and added library mode tests
2 parents dc7fca9 + bbe9395 commit 4594133

4 files changed

Lines changed: 67 additions & 49 deletions

File tree

.github/workflows/e2e_tests_rhaiis.yaml

Lines changed: 60 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,18 @@ 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 }}
2128
FAISS_VECTOR_STORE_ID: ${{ vars.FAISS_VECTOR_STORE_ID }}
@@ -47,37 +54,18 @@ jobs:
4754
echo "=== Recent commits (should show setup-metrics commits) ==="
4855
git log --oneline -5
4956
50-
- uses: 1arp/create-a-file-action@0.4.5
51-
with:
52-
path: '.'
53-
isAbsolutePath: false
54-
file: 'lightspeed-stack.yaml'
55-
content: |
56-
name: Lightspeed Core Service (LCS)
57-
service:
58-
host: 0.0.0.0
59-
port: 8080
60-
auth_enabled: false
61-
workers: 1
62-
color_log: true
63-
access_log: true
64-
llama_stack:
65-
# Uses a remote llama-stack service
66-
# The instance would have already been started with a llama-stack-run.yaml file
67-
use_as_library_client: false
68-
# Alternative for "as library use"
69-
# use_as_library_client: true
70-
# library_client_config_path: <path-to-llama-stack-run.yaml-file>
71-
url: http://llama-stack:8321
72-
api_key: xyzzy
73-
user_data_collection:
74-
feedback_enabled: true
75-
feedback_storage: "/tmp/data/feedback"
76-
transcripts_enabled: true
77-
transcripts_storage: "/tmp/data/transcripts"
78-
79-
authentication:
80-
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
8169
8270
- name: Select and configure run.yaml
8371
env:
@@ -121,20 +109,22 @@ jobs:
121109
122110
- name: Test RHAIIS connectivity
123111
run: |
124-
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}"
125113
126114
- name: Docker Login for quay access
115+
if: matrix.mode == 'server'
127116
env:
128117
QUAY_ROBOT_USERNAME: ${{ secrets.QUAY_DOWNSTREAM_USERNAME }}
129118
QUAY_ROBOT_TOKEN: ${{ secrets.QUAY_DOWNSTREAM_TOKEN }}
130119
run: |
131120
echo $QUAY_ROBOT_TOKEN | docker login quay.io -u=$QUAY_ROBOT_USERNAME --password-stdin
132121
133-
- name: Run service manually
134-
run: |
122+
- name: Run services (Server Mode)
123+
if: matrix.mode == 'server'
124+
run: |
135125
docker compose version
136126
docker compose up -d
137-
127+
138128
# Check for errors and show logs if any services failed
139129
if docker compose ps | grep -E 'Exit|exited|stopped'; then
140130
echo "Some services failed to start - showing logs:"
@@ -144,6 +134,20 @@ jobs:
144134
echo "All services started successfully"
145135
fi
146136
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+
147151
- name: Wait for services
148152
run: |
149153
echo "Waiting for services to be healthy..."
@@ -153,12 +157,20 @@ jobs:
153157
run: |
154158
echo "Testing basic connectivity before full test suite..."
155159
curl -f http://localhost:8080/v1/models || {
156-
echo "❌ Basic connectivity failed - showing logs before running full tests"
157-
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
158166
exit 1
159167
}
160168
161169
- name: Run e2e tests
170+
env:
171+
TERM: xterm-256color
172+
FORCE_COLOR: 1
173+
E2E_DEPLOYMENT_MODE: ${{ matrix.mode }}
162174
run: |
163175
echo "Installing test dependencies..."
164176
pip install uv
@@ -171,9 +183,14 @@ jobs:
171183
if: failure()
172184
run: |
173185
echo "=== Test failure logs ==="
174-
echo "=== llama-stack logs ==="
175-
docker compose logs llama-stack
176-
177-
echo ""
178-
echo "=== lightspeed-stack logs ==="
179-
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

docker-compose-library.yaml

Lines changed: 1 addition & 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

docker-compose.yaml

Lines changed: 1 addition & 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

tests/e2e/configs/run-rhaiis.yaml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,10 @@ providers:
2222
- provider_id: vllm
2323
provider_type: remote::vllm
2424
config:
25-
url: http://${env.RHAIIS_URL}:8000/v1/
25+
base_url: http://${env.RHAIIS_URL}:${env.RHAIIS_PORT}/v1/
2626
api_token: ${env.RHAIIS_API_KEY}
2727
tls_verify: false
2828
max_tokens: 2048
29-
- provider_id: openai
30-
provider_type: remote::openai
31-
config:
32-
api_key: ${env.OPENAI_API_KEY}
3329
- config: {}
3430
provider_id: sentence-transformers
3531
provider_type: inline::sentence-transformers
@@ -54,6 +50,9 @@ providers:
5450
- config: {}
5551
provider_id: rag-runtime
5652
provider_type: inline::rag-runtime
53+
- config: {} # Enable MCP (Model Context Protocol) support
54+
provider_id: model-context-protocol
55+
provider_type: remote::model-context-protocol
5756
vector_io:
5857
- config:
5958
persistence:
@@ -143,7 +142,7 @@ registered_resources:
143142
shields:
144143
- shield_id: llama-guard
145144
provider_id: llama-guard
146-
provider_shield_id: openai/gpt-4o-mini
145+
provider_shield_id: vllm/${env.RHAIIS_MODEL}
147146
vector_stores:
148147
- embedding_dimension: 768
149148
embedding_model: sentence-transformers/all-mpnet-base-v2

0 commit comments

Comments
 (0)