Skip to content

Commit 956dab0

Browse files
authored
Merge pull request #2604 from radofuchs/sync-main-to-release-0.7
LCORE-2935: Sync main to release 0.7
2 parents 76b2e98 + d3b8cda commit 956dab0

577 files changed

Lines changed: 33927 additions & 13428 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/PULL_REQUEST_TEMPLATE.md‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@
1212
- [ ] Documentation Update
1313
- [ ] Configuration Update
1414
- [ ] Bump-up service version
15-
- [ ] Bump-up dependent library
15+
- [ ] Bump-up dependent library [`pyproject.toml` + `uv.lock`]
16+
- [ ] Bump-up dependent library [`requirements.*.txt` for Konflux]
1617
- [ ] Bump-up library or tool used for development (does not change the final image)
1718
- [ ] CI configuration change
1819
- [ ] Konflux configuration change
Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
# Gate before e2e jobs that use repository secrets (separate job so secrets are not sent if skipped).
2+
#
3+
# Uses the same collaborator permission API GitHub uses for push/merge access on
4+
# this repository (org base permissions, teams, and direct grants).
5+
name: Authorize E2E secrets access
6+
7+
on:
8+
workflow_call:
9+
outputs:
10+
authorized:
11+
value: ${{ jobs.authorize.outputs.authorized }}
12+
13+
jobs:
14+
authorize:
15+
name: Check repository owner or member
16+
runs-on: ubuntu-latest
17+
timeout-minutes: 1
18+
if: github.event.action != 'labeled' || github.event.label.name == 'ok-to-test'
19+
# Do not set permissions: contents: read — it blocks reading collaborator permissions.
20+
outputs:
21+
authorized: ${{ steps.check.outputs.authorized }}
22+
steps:
23+
- name: Allow repo owners and members, or ok-to-test from an owner
24+
id: check
25+
env:
26+
GH_TOKEN: ${{ github.token }}
27+
EVENT_NAME: ${{ github.event_name }}
28+
EVENT_ACTION: ${{ github.event.action }}
29+
IS_FORK: ${{ github.event.repository.fork }}
30+
# PR author for merge-rights check (not github.actor — see dependabot hardening).
31+
USER: ${{ github.event.pull_request.user.login || github.actor }}
32+
ACTOR: ${{ github.actor }}
33+
REPO_OWNER: ${{ github.repository_owner }}
34+
REPOSITORY: ${{ github.repository }}
35+
run: |
36+
set -euo pipefail
37+
allow() { echo "$1"; echo "authorized=true" >> "$GITHUB_OUTPUT"; exit 0; }
38+
deny() { echo "::warning::$1"; echo "authorized=false" >> "$GITHUB_OUTPUT"; exit 0; }
39+
40+
permission_of() {
41+
local url="repos/${REPOSITORY}/collaborators/$(jq -nr --arg u "$1" '$u|@uri')/permission"
42+
local perm
43+
for attempt in 1 2 3; do
44+
perm=$(gh api "$url" --jq .permission 2>/dev/null) && [ -n "$perm" ] && { echo "$perm"; return; }
45+
echo "::debug::API attempt $attempt failed for $1, retrying in ${attempt}s…"
46+
sleep "$attempt"
47+
done
48+
echo none
49+
}
50+
51+
[ "$EVENT_NAME" = "schedule" ] && allow "Scheduled run."
52+
53+
echo "user=${USER} actor=${ACTOR} event=${EVENT_NAME}/${EVENT_ACTION:-none} fork=${IS_FORK}"
54+
55+
# Push to upstream: only users with push (merge) rights can push here.
56+
[ "$EVENT_NAME" = "push" ] && [ "$IS_FORK" != "true" ] && allow "Push to upstream repository."
57+
58+
# Push to your own fork.
59+
[ "$EVENT_NAME" = "push" ] && [ "$ACTOR" = "$REPO_OWNER" ] && allow "Push by fork owner."
60+
61+
USER_PERM=$(permission_of "$USER")
62+
echo "user_permission=${USER_PERM}"
63+
case "$USER_PERM" in
64+
admin|maintain|write|triage|read)
65+
allow "${USER} has repository access (${USER_PERM}, same source as merge rights)."
66+
;;
67+
esac
68+
69+
# Outsider PR: repository owner added ok-to-test on this run.
70+
[ "$EVENT_ACTION" = "labeled" ] || deny "${USER} has no repository access."
71+
72+
LABELER_PERM=$(permission_of "$ACTOR")
73+
echo "ok-to-test labeler=${ACTOR} permission=${LABELER_PERM}"
74+
[ "$LABELER_PERM" = "admin" ] && allow "Repository owner ${ACTOR} added ok-to-test."
75+
76+
deny "ok-to-test must be added by a repository owner (admin)."

‎.github/workflows/e2e_tests.yaml‎

Lines changed: 44 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,53 @@
11
# .github/workflows/e2e_tests.yml
22
name: E2E Tests
33

4-
on: [push, pull_request_target]
4+
on:
5+
push:
6+
pull_request_target:
7+
types: [opened, synchronize, reopened, labeled]
58

69
jobs:
10+
# Own job so repository secrets are never sent to a runner unless this passes.
11+
authorize:
12+
uses: ./.github/workflows/e2e_authorize.yaml
13+
714
e2e_tests:
15+
needs: authorize
16+
if: needs.authorize.outputs.authorized == 'true'
817
runs-on: ubuntu-latest
918
strategy:
1019
fail-fast: false
1120
matrix:
1221
mode: ["server", "library"]
1322
environment: ["ci"]
14-
e2e_group: [1, 2, 3]
23+
# Config-aligned shards (@cfg_*). Packed small groups keep job count reasonable
24+
# while avoiding mixed-config restarts inside large suites.
25+
shard:
26+
- name: default
27+
tags: "not @skip and @cfg_default"
28+
- name: authorized
29+
tags: "not @skip and @cfg_authorized"
30+
- name: mcp
31+
tags: "not @skip and (@cfg_mcp or @cfg_mcp_invalid or @cfg_mcp_api_auth)"
32+
- name: rbac
33+
tags: "not @skip and @cfg_rbac"
34+
- name: skills
35+
tags: "not @skip and (@cfg_skills or @cfg_skills_directory)"
36+
- name: shields
37+
tags: "not @skip and @cfg_shields"
38+
- name: other
39+
tags: "not @skip and (@cfg_rh_identity or @cfg_negative or @cfg_byok_pdf or @cfg_degraded or @cfg_unified)"
40+
# Server-only; listed in shard (not matrix.include) so it expands with
41+
# mode=server before any library jobs. include would append after library.
42+
- name: tls
43+
tags: "not @skip and @cfg_tls"
44+
exclude:
45+
- mode: library
46+
shard:
47+
name: tls
48+
tags: "not @skip and @cfg_tls"
1549

16-
name: "E2E: ${{ matrix.mode }} mode / ${{ matrix.environment }} / group ${{ matrix.e2e_group }}"
50+
name: "E2E: ${{ matrix.mode }} / ${{ matrix.environment }} / ${{ matrix.shard.name }}"
1751

1852
env:
1953
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
@@ -30,9 +64,9 @@ jobs:
3064
# On push → falls back to the current repository.
3165
repository: ${{ github.event.pull_request.head.repo.full_name || github.repository }}
3266

33-
# On PR_TARGET → the PR head *commit* (reproducible).
67+
# On PR_TARGET → the PR head commit at event time (not the moving branch).
3468
# On push → the pushed commit that triggered the workflow.
35-
ref: ${{ github.event.pull_request.head.ref || github.sha }}
69+
ref: ${{ github.event.pull_request.head.sha || github.sha }}
3670

3771
# Tests need access to secrets.
3872
# This should be refactored if possible to mitigate the risk.
@@ -43,7 +77,7 @@ jobs:
4377
persist-credentials: ${{ github.event_name != 'pull_request_target' }}
4478

4579
# Fetch submodules (required for lightspeed-providers)
46-
submodules: ‘recursive’
80+
submodules: "recursive"
4781

4882
- name: Verify actual git checkout result
4983
run: |
@@ -112,15 +146,15 @@ jobs:
112146
echo "=== Configuration Summary ==="
113147
echo "Deployment mode: ${{ matrix.mode }}"
114148
echo "Environment: ${{ matrix.environment }}"
115-
echo "E2E shard (Makefile test-e2e-tagged): @e2e_group_${{ matrix.e2e_group }} (with not @skip)"
149+
echo "E2E shard (Makefile test-e2e-tagged): ${{ matrix.shard.tags }}"
116150
echo "Source config: tests/e2e/configs/run-${{ matrix.environment }}.yaml"
117151
echo ""
118152
echo "=== Configuration Preview ==="
119153
echo "Providers: $(grep -c "provider_id:" run.yaml)"
120154
echo "Models: $(grep -c "model_id:" run.yaml)"
121155
echo ""
122156
echo "=== lightspeed-stack.yaml ==="
123-
grep -A 3 "llama_stack:" lightspeed-stack.yaml
157+
grep -A 3 "ogx:" lightspeed-stack.yaml
124158
125159
- name: Cache HuggingFace embedding model
126160
uses: actions/cache@v4
@@ -239,8 +273,8 @@ jobs:
239273
TERM: xterm-256color
240274
FORCE_COLOR: 1
241275
E2E_DEPLOYMENT_MODE: ${{ matrix.mode }}
242-
# Matches Makefile test-e2e-tagged / E2E_BEHAVE_TAG_EXPR (one @e2e_group_* per job).
243-
E2E_BEHAVE_TAG_EXPR: "not @skip and @e2e_group_${{ matrix.e2e_group }}"
276+
# Matches Makefile test-e2e-tagged / E2E_BEHAVE_TAG_EXPR (one @cfg_* pack per job).
277+
E2E_BEHAVE_TAG_EXPR: "${{ matrix.shard.tags }}"
244278
run: |
245279
echo "Installing test dependencies..."
246280
pip install uv

‎.github/workflows/e2e_tests_lightspeed_evaluation.yaml‎

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,16 @@
11
name: E2E Tests for Lightspeed Evaluation
22

3-
on: [push, pull_request_target]
3+
on:
4+
[]
45

56
jobs:
7+
# Own job so repository secrets are never sent to a runner unless this passes.
8+
authorize:
9+
uses: ./.github/workflows/e2e_authorize.yaml
10+
611
e2e_tests:
12+
needs: authorize
13+
if: needs.authorize.outputs.authorized == 'true'
714
runs-on: ubuntu-latest
815
strategy:
916
fail-fast: false
@@ -23,9 +30,9 @@ jobs:
2330
# On push → falls back to the current repository.
2431
repository: ${{ github.event.pull_request.head.repo.full_name || github.repository }}
2532

26-
# On PR_TARGET → the PR head *commit* (reproducible).
33+
# On PR_TARGET → the PR head commit at event time (not the moving branch).
2734
# On push → the pushed commit that triggered the workflow.
28-
ref: ${{ github.event.pull_request.head.ref || github.sha }}
35+
ref: ${{ github.event.pull_request.head.sha || github.sha }}
2936

3037
# Don’t keep credentials when running untrusted PR code under PR_TARGET.
3138
persist-credentials: ${{ github.event_name != 'pull_request_target' }}
@@ -87,7 +94,7 @@ jobs:
8794
echo "Models: $(grep -c "model_id:" run.yaml)"
8895
echo ""
8996
echo "=== lightspeed-stack.yaml ==="
90-
grep -A 3 "llama_stack:" lightspeed-stack.yaml
97+
grep -A 3 "ogx:" lightspeed-stack.yaml
9198
9299
- name: Run services (Library Mode)
93100
env:

‎.github/workflows/e2e_tests_providers.yaml‎

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7,29 +7,35 @@ on:
77
workflow_dispatch:
88

99
jobs:
10+
# Own job so repository secrets are never sent to a runner unless this passes.
11+
authorize:
12+
uses: ./.github/workflows/e2e_authorize.yaml
13+
1014
e2e_tests:
15+
needs: authorize
16+
if: needs.authorize.outputs.authorized == 'true'
1117
runs-on: ubuntu-latest
1218
strategy:
1319
fail-fast: false
1420
matrix:
1521
mode: ["server", "library"]
1622
environment: ["azure", "vertexai", "watsonx", "bedrock"]
1723
# Expected default LLM for Behave (matches tests/e2e/configs/run-<env>.yaml).
18-
# | environment | model_id | provider_id |
19-
# |-------------|-------------------------------------|---------------|
20-
# | azure | gpt-4o-mini | azure |
21-
# | vertexai | google/gemini-2.5-flash | google-vertex |
22-
# | watsonx | meta-llama/llama-3-3-70b-instruct | watsonx |
23-
# | bedrock | deepseek.v3-v1:0 | aws-bedrock |
24+
# | environment | model_id | provider_id |
25+
# |-------------|--------------------------------------------| --------------|
26+
# | azure | gpt-4o-mini | azure |
27+
# | vertexai | publishers/google/models/gemini-2.5-flash | google-vertex |
28+
# | watsonx | meta-llama/llama-3-3-70b-instruct | watsonx |
29+
# | bedrock | deepseek.v3-v1:0 | aws-bedrock |
2430
include:
2531
- environment: azure
2632
e2e_default_model: gpt-4o-mini
2733
e2e_default_provider: azure
2834
- environment: vertexai
29-
e2e_default_model: google/gemini-2.5-flash
35+
e2e_default_model: publishers/google/models/gemini-2.5-flash
3036
e2e_default_provider: google-vertex
3137
- environment: watsonx
32-
e2e_default_model: watsonx/meta-llama/llama-3-3-70b-instruct
38+
e2e_default_model: meta-llama/llama-3-3-70b-instruct
3339
e2e_default_provider: watsonx
3440
- environment: bedrock
3541
e2e_default_model: deepseek.v3-v1:0
@@ -198,7 +204,7 @@ jobs:
198204
echo "Models: $(grep -c "model_id:" run.yaml)"
199205
echo ""
200206
echo "=== lightspeed-stack.yaml ==="
201-
grep -A 3 "llama_stack:" lightspeed-stack.yaml
207+
grep -A 3 "ogx:" lightspeed-stack.yaml
202208
203209
- name: Cache HuggingFace embedding model
204210
uses: actions/cache@v4
@@ -330,10 +336,6 @@ jobs:
330336
if: matrix.environment == 'watsonx' && matrix.mode == 'server'
331337
run: sleep 3600 # 120 minutes
332338

333-
- name: Remove the prefix for watsonx default model
334-
if: matrix.environment == 'watsonx'
335-
run: echo "E2E_DEFAULT_MODEL_OVERRIDE=meta-llama/llama-3-3-70b-instruct" >> $GITHUB_ENV
336-
337339
- name: Run e2e tests
338340
env:
339341
TERM: xterm-256color

‎.github/workflows/e2e_tests_rhaiis.yaml‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,13 @@ on:
88

99

1010
jobs:
11+
# Own job so repository secrets are never sent to a runner unless this passes.
12+
authorize:
13+
uses: ./.github/workflows/e2e_authorize.yaml
14+
1115
e2e_tests:
16+
needs: authorize
17+
if: needs.authorize.outputs.authorized == 'true'
1218
runs-on: ubuntu-latest
1319
strategy:
1420
fail-fast: false

‎.github/workflows/openapi_spectral.yaml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ jobs:
2121
with:
2222
python-version: "3.12"
2323
- name: Install dependencies
24-
# Same pattern as local dev (CONTRIBUTING.md): dev + llslibdev for a full app import.
25-
run: uv sync --group dev --group llslibdev
24+
# Same pattern as local dev (CONTRIBUTING.md): dev + ogxlibdev for a full app import.
25+
run: uv sync --group dev --group ogxlibdev
2626
- name: Install PDM
2727
# scripts/generate_openapi_schema.py asserts OpenAPI info.version matches `pdm show --version`.
2828
run: uv pip install pdm

‎.github/workflows/pylint.yaml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,6 @@ jobs:
1818
with:
1919
python-version: '3.12'
2020
- name: Install dependencies
21-
run: uv sync --group llslibdev
21+
run: uv sync --group ogxlibdev
2222
- name: Python linter
2323
run: uv run pylint src tests

‎.github/workflows/pyright.yaml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,6 @@ jobs:
1818
with:
1919
python-version: '3.12'
2020
- name: Install dependencies
21-
run: uv sync --group llslibdev
21+
run: uv sync --group ogxlibdev
2222
- name: Run Pyright tests
2323
run: uv run pyright src

‎.github/workflows/unit_tests.yaml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
- name: uv version
2525
run: uv --version
2626
- name: Install dependencies
27-
run: uv pip install --python ${{ matrix.python-version }} --group llslibdev .
27+
run: uv pip install --python ${{ matrix.python-version }} --group ogxlibdev .
2828
- name: Install pdm # Required for dynamic version test
2929
run: uv pip install pdm
3030
- name: Run unit tests

0 commit comments

Comments
 (0)