Skip to content

Commit 0bd30d6

Browse files
authored
Merge branch 'main' into responses_prompt_templates
2 parents 4b05984 + 8b37a85 commit 0bd30d6

165 files changed

Lines changed: 34135 additions & 1167 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/mergify.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,28 @@ pull_request_rules:
2121
label:
2222
remove:
2323
- needs-rebase
24+
25+
- name: auto-merge on stable release branches
26+
conditions:
27+
- base~=^release-[0-9]+\.[0-9]+\.x$
28+
- check-success=ci-status
29+
- "#approved-reviews-by>=1"
30+
- "#changes-requested-reviews-by=0"
31+
- -conflict
32+
- -draft
33+
- -closed
34+
actions:
35+
merge:
36+
method: merge
37+
38+
- name: auto-merge dependabot github-deps PRs
39+
conditions:
40+
- author=dependabot[bot]
41+
- title~=^chore\(github-deps\)
42+
- check-success=ci-status
43+
- -conflict
44+
- -draft
45+
- -closed
46+
actions:
47+
merge:
48+
method: merge

.github/workflows/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ Llama Stack uses GitHub Actions for Continuous Integration (CI). Below is a tabl
66
| ---- | ---- | ------- |
77
| Backward Compatibility Check | [backward-compat.yml](backward-compat.yml) | Check backward compatibility for config.yaml files |
88
| Build Distribution Images | [build-distributions.yml](build-distributions.yml) | Build Distribution Images |
9+
| CI Status | [ci-status.yml](ci-status.yml) | Aggregate CI check status |
910
| CodeQL Workflow Security Scan | [codeql.yml](codeql.yml) | CodeQL Workflow Security Scan |
1011
| Documentation Build | [docs-build.yml](docs-build.yml) | Build and validate documentation |
1112
| Installer CI | [install-script-ci.yml](install-script-ci.yml) | Test the installation script |
@@ -16,7 +17,9 @@ Llama Stack uses GitHub Actions for Continuous Integration (CI). Below is a tabl
1617
| Vector IO Integration Tests | [integration-vector-io-tests.yml](integration-vector-io-tests.yml) | Run the integration test suite with various VectorIO providers |
1718
| OpenAPI Generator SDK Validation | [openapi-generator-validation.yml](openapi-generator-validation.yml) | Validate OpenAPI Generator SDK generation |
1819
| OpenResponses Conformance Tests | [openresponses-conformance.yml](openresponses-conformance.yml) | Run OpenResponses conformance tests against llama-stack Responses API |
20+
| Post-release automation | [post-release.yml](post-release.yml) | Post-release automation |
1921
| Pre-commit | [pre-commit.yml](pre-commit.yml) | Run pre-commit checks |
22+
| Prepare release | [prepare-release.yml](prepare-release.yml) | Prepare release |
2023
| Test Llama Stack Build | [providers-build.yml](providers-build.yml) | Test llama stack build |
2124
| Test llama stack list-deps | [providers-list-deps.yml](providers-list-deps.yml) | Test llama stack list-deps |
2225
| Build, test, and publish packages | [pypi.yml](pypi.yml) | Build, test, and publish packages |

.github/workflows/backward-compat.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@ on:
1515
- 'src/llama_stack/distributions/**/config.yaml'
1616
- 'tests/backward_compat/**'
1717
- '.github/workflows/backward-compat.yml'
18+
merge_group:
19+
branches:
20+
- main
21+
- 'release-[0-9]+.[0-9]+.x'
1822

1923
concurrency:
2024
group: ${{ github.workflow }}-${{ github.ref }}
@@ -37,7 +41,7 @@ jobs:
3741
python-version: '3.12'
3842

3943
- name: Install uv
40-
uses: astral-sh/setup-uv@eac588ad8def6316056a12d4907a9d4d84ff7a3b # v7.3.0
44+
uses: astral-sh/setup-uv@5a095e7a2014a4212f075830d4f7277575a9d098 # v7.3.1
4145
with:
4246
enable-cache: true
4347

@@ -232,6 +236,7 @@ jobs:
232236
233237
test-integration-release:
234238
name: Run Integration Tests with Latest Release (Informational)
239+
if: github.event_name == 'pull_request'
235240
runs-on: ubuntu-latest
236241

237242
steps:
@@ -401,6 +406,7 @@ jobs:
401406

402407
check-schema-release-compatibility:
403408
name: Check Schema Compatibility with Latest Release (Informational)
409+
if: github.event_name == 'pull_request'
404410
runs-on: ubuntu-latest
405411

406412
steps:
@@ -415,7 +421,7 @@ jobs:
415421
python-version: '3.12'
416422

417423
- name: Install uv
418-
uses: astral-sh/setup-uv@eac588ad8def6316056a12d4907a9d4d84ff7a3b # v7.3.0
424+
uses: astral-sh/setup-uv@5a095e7a2014a4212f075830d4f7277575a9d098 # v7.3.1
419425
with:
420426
enable-cache: true
421427

.github/workflows/ci-status.yml

Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
name: CI Status
2+
3+
run-name: Aggregate CI check status
4+
5+
on:
6+
pull_request:
7+
branches:
8+
- main
9+
- 'release-[0-9]+.[0-9]+.x'
10+
merge_group:
11+
branches:
12+
- main
13+
- 'release-[0-9]+.[0-9]+.x'
14+
15+
concurrency:
16+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
17+
cancel-in-progress: true
18+
19+
jobs:
20+
ci-status:
21+
runs-on: ubuntu-latest
22+
timeout-minutes: 60
23+
permissions:
24+
checks: read
25+
steps:
26+
- name: Wait for CI checks to complete
27+
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
28+
with:
29+
script: |
30+
const sha = context.payload.pull_request?.head.sha ?? context.sha;
31+
const owner = context.repo.owner;
32+
const repo = context.repo.repo;
33+
34+
// Wait for other workflows to get queued
35+
core.info('Waiting 60s for CI workflows to get queued...');
36+
await new Promise(r => setTimeout(r, 60000));
37+
38+
const excludedChecks = new Set(['ci-status']);
39+
const excludedApps = new Set(['mergify']);
40+
41+
const terminalStatuses = new Set(['completed']);
42+
const successConclusions = new Set(['success', 'skipped', 'neutral']);
43+
const failureConclusions = new Set(['failure', 'cancelled', 'timed_out']);
44+
45+
while (true) {
46+
const { data: checkRuns } = await github.rest.checks.listForRef({
47+
owner,
48+
repo,
49+
ref: sha,
50+
per_page: 100,
51+
});
52+
53+
// Filter to only GitHub Actions checks, excluding ourselves and bots
54+
const relevant = checkRuns.check_runs.filter(cr => {
55+
if (excludedChecks.has(cr.name)) return false;
56+
if (cr.app && excludedApps.has(cr.app.slug)) return false;
57+
// Only include GitHub Actions checks
58+
if (!cr.app || cr.app.slug !== 'github-actions') return false;
59+
return true;
60+
});
61+
62+
if (relevant.length === 0) {
63+
core.info('No other CI checks found yet, waiting...');
64+
await new Promise(r => setTimeout(r, 30000));
65+
continue;
66+
}
67+
68+
const pending = relevant.filter(cr => !terminalStatuses.has(cr.status));
69+
const completed = relevant.filter(cr => terminalStatuses.has(cr.status));
70+
71+
core.info(`Checks: ${completed.length} completed, ${pending.length} pending out of ${relevant.length} total`);
72+
73+
for (const cr of completed) {
74+
core.info(` ✓ ${cr.name}: ${cr.conclusion}`);
75+
}
76+
for (const cr of pending) {
77+
core.info(` ⏳ ${cr.name}: ${cr.status}`);
78+
}
79+
80+
if (pending.length > 0) {
81+
core.info('Waiting 30s for pending checks...');
82+
await new Promise(r => setTimeout(r, 30000));
83+
continue;
84+
}
85+
86+
// All checks completed — evaluate conclusions
87+
const failed = completed.filter(cr => failureConclusions.has(cr.conclusion));
88+
89+
if (failed.length > 0) {
90+
for (const cr of failed) {
91+
core.error(`${cr.name} concluded with: ${cr.conclusion}`);
92+
}
93+
core.setFailed(`${failed.length} CI check(s) failed.`);
94+
return;
95+
}
96+
97+
const succeeded = completed.filter(cr => successConclusions.has(cr.conclusion));
98+
core.info(`All ${succeeded.length} CI checks passed.`);
99+
return;
100+
}

.github/workflows/integration-auth-tests.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@ on:
2121
- 'requirements.txt'
2222
- '.github/workflows/integration-auth-tests.yml' # This workflow
2323
- 'scripts/integration-auth-tests.sh'
24+
merge_group:
25+
branches:
26+
- main
27+
- 'release-[0-9]+.[0-9]+.x'
2428

2529
concurrency:
2630
group: ${{ github.workflow }}-${{ github.ref == 'refs/heads/main' && github.run_id || github.ref }}

.github/workflows/integration-responses-conversations-auth-tests.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@ on:
2121
- 'requirements.txt'
2222
- '.github/workflows/integration-responses-conversations-auth-tests.yml' # This workflow
2323
- 'scripts/integration-responses-conversations-auth-tests.sh'
24+
merge_group:
25+
branches:
26+
- main
27+
- 'release-[0-9]+.[0-9]+.x'
2428

2529
concurrency:
2630
group: ${{ github.workflow }}-${{ github.ref == 'refs/heads/main' && github.run_id || github.ref }}

.github/workflows/integration-sql-store-tests.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@ on:
1818
- 'pyproject.toml'
1919
- 'requirements.txt'
2020
- '.github/workflows/integration-sql-store-tests.yml' # This workflow
21+
merge_group:
22+
branches:
23+
- main
24+
- 'release-[0-9]+.[0-9]+.x'
2125

2226
concurrency:
2327
group: ${{ github.workflow }}-${{ github.ref == 'refs/heads/main' && github.run_id || github.ref }}

.github/workflows/integration-tests.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@ on:
2424
- '.github/actions/run-and-record-tests/action.yml'
2525
- 'scripts/integration-tests.sh'
2626
- 'scripts/generate_ci_matrix.py'
27+
merge_group:
28+
branches:
29+
- main
30+
- 'release-[0-9]+.[0-9]+.x'
2731
schedule:
2832
# If changing the cron schedule, update the provider in the test-matrix job
2933
- cron: '0 0 * * *' # (test latest client) Daily at 12 AM UTC
@@ -189,4 +193,4 @@ jobs:
189193
inference-mode: ${{ matrix.config.inference_mode || 'replay' }}
190194
suite: ${{ matrix.config.suite }}
191195
target-branch: ${{ inputs.pr_head_ref || '' }}
192-
is-fork-pr: ${{ inputs.is_fork_pr && 'true' || (github.event.pull_request.head.repo.full_name != github.repository && 'true' || 'false') }}
196+
is-fork-pr: ${{ inputs.is_fork_pr && 'true' || (github.event_name != 'merge_group' && github.event.pull_request.head.repo.full_name != github.repository && 'true' || 'false') }}

.github/workflows/integration-vector-io-tests.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@ on:
2020
- 'pyproject.toml'
2121
- 'requirements.txt'
2222
- '.github/workflows/integration-vector-io-tests.yml' # This workflow
23+
merge_group:
24+
branches:
25+
- main
26+
- 'release-[0-9]+.[0-9]+.x'
2327
schedule:
2428
- cron: '0 0 * * *' # (test on python 3.13) Daily at 12 AM UTC
2529

.github/workflows/openapi-generator-validation.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@ on:
1919
- 'client-sdks/stainless/config.yml'
2020
# This workflow itself
2121
- '.github/workflows/openapi-generator-validation.yml'
22+
merge_group:
23+
branches:
24+
- main
25+
- 'release-[0-9]+.[0-9]+.x'
2226
push:
2327
branches:
2428
- main
@@ -113,7 +117,7 @@ jobs:
113117
python-version: '3.12'
114118

115119
- name: Set up Java
116-
uses: actions/setup-java@8df1039502a15bceb9433410b1a100fbe190c53b # v4.5.0
120+
uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5.2.0
117121
with:
118122
distribution: 'temurin'
119123
java-version: '11'

0 commit comments

Comments
 (0)