Skip to content

Commit 6766019

Browse files
committed
Update
[ghstack-poisoned]
2 parents 90b08cc + ae416d6 commit 6766019

7 files changed

Lines changed: 218 additions & 121 deletions

File tree

.github/workflows/build_wheels_linux.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,12 @@ jobs:
201201
# when using Python version, less than the conda latest
202202
###############################################################################
203203
echo 'Installing conda-forge'
204-
curl -L -o /mambaforge.sh https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-Linux-aarch64.sh
204+
# Pin the installer. The shared setup-binary-builds action installs
205+
# conda=25.3.0 into this base env, and conda 25.3.0 has no Python 3.14
206+
# build. Miniforge releases newer than this one put the base env on
207+
# Python 3.14, which makes that install unsatisfiable and fails every
208+
# aarch64 wheel build. Bump this tag only together with that pin.
209+
curl -fL -o /mambaforge.sh https://github.com/conda-forge/miniforge/releases/download/26.3.2-3/Miniforge3-Linux-aarch64.sh
205210
chmod +x /mambaforge.sh
206211
/mambaforge.sh -b -p /opt/conda
207212
rm /mambaforge.sh

aws/ami/windows/scripts/Installers/Install-CUDA-Tools.ps1

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,6 @@ Switch ($cudaVersion) {
2525
"12.8" {
2626
$toolkitInstaller = "cuda_12.8.1_572.61_windows.exe"
2727
}
28-
"12.9" {
29-
$toolkitInstaller = "cuda_12.9.1_576.57_windows.exe"
30-
}
3128
"13.0" {
3229
$cudnn_subfolder="cudnn-windows-x86_64-9.20.0.48_cuda13-archive"
3330
$toolkitInstaller = "cuda_13.0.0_windows.exe"
@@ -38,6 +35,11 @@ Switch ($cudaVersion) {
3835
$toolkitInstaller = "cuda_13.2.1_windows.exe"
3936
$installerArgs = ""
4037
}
38+
"13.4" {
39+
$cudnn_subfolder="cudnn-windows-x86_64-9.20.0.48_cuda13-archive"
40+
$toolkitInstaller = "cuda_13.4.0_windows_x86_64.exe"
41+
$installerArgs = ""
42+
}
4143
}
4244

4345

aws/ami/windows/windows.pkr.hcl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -107,21 +107,21 @@ build {
107107
}
108108

109109
provisioner "powershell" {
110-
environment_vars = ["CUDA_VERSION=12.9"]
110+
environment_vars = ["CUDA_VERSION=13.0"]
111111
scripts = [
112112
"${path.root}/scripts/Installers/Install-CUDA-Tools.ps1",
113113
]
114114
}
115115

116116
provisioner "powershell" {
117-
environment_vars = ["CUDA_VERSION=13.0"]
117+
environment_vars = ["CUDA_VERSION=13.2"]
118118
scripts = [
119119
"${path.root}/scripts/Installers/Install-CUDA-Tools.ps1",
120120
]
121121
}
122122

123123
provisioner "powershell" {
124-
environment_vars = ["CUDA_VERSION=13.2"]
124+
environment_vars = ["CUDA_VERSION=13.4"]
125125
scripts = [
126126
"${path.root}/scripts/Installers/Install-CUDA-Tools.ps1",
127127
]
Lines changed: 31 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,53 +1,45 @@
1-
# External CI Provider → GitHub Repo Mapping for CRCR OIDC
1+
# CI Provider Configuration for CRCR
22
#
3-
# CI platforms that don't carry a native "repository" OIDC claim need an
4-
# explicit mapping from their pipeline identity to a GitHub owner/repo.
3+
# This file supplies MUTABLE authorization data only — specifically,
4+
# Buildkite pipeline-to-repo identity mappings. Trust anchors (OIDC
5+
# issuer URLs and JWKS endpoints) are compiled into jwt_helper.py and
6+
# cannot be overridden from this file.
57
#
68
# IMPORTANT: Buildkite mappings use immutable organization_id/pipeline_id
79
# (UUIDs) rather than slugs. Slugs are renameable and a released slug
810
# can be claimed by a different organization; IDs are permanent.
911
# Find IDs via: buildkite-agent oidc request-token --audience <aud>
1012
#
11-
# SECURITY: By default, any build in a mapped pipeline can authenticate.
12-
# If a pipeline runs fork-PR builds, use required_claims to restrict
13-
# which builds are authorized (e.g. only builds on specific branches).
14-
# Pipelines that do NOT expose OIDC to fork builds are safe without
15-
# required_claims.
16-
#
1713
# The Lambda fetches this file at runtime (via CI_PROVIDERS_URL) and
18-
# caches it in Redis, so changes here take effect without redeployment.
19-
20-
buildkite:
21-
# Simple format (pipeline does not run fork builds):
22-
# organization_id/pipeline_id: owner/repo
23-
#
24-
# Constrained format (pipeline may run fork builds):
25-
# organization_id/pipeline_id:
26-
# repo: owner/repo
27-
# required_claims:
28-
# build_branch: [main, nightly] # only these branches can auth
29-
# cluster_id: specific-cluster-uuid
14+
# caches it in Redis, so mapping changes take effect without redeployment.
3015

31-
# Example entries:
32-
# 018e4f2a-1b2c-3d4e/018e5a6b-7c8d-9e0f: vllm-project/vllm
33-
#
34-
# 018e4f2a-1b2c-3d4e/018e9a0b-1c2d-3e4f:
35-
# repo: vllm-project/vllm
36-
# required_claims:
37-
# build_branch: [main, release]
16+
providers:
17+
buildkite:
18+
# Pipeline-to-repo mapping (Buildkite OIDC has no "repository" claim).
19+
# Keys are immutable organization_id/pipeline_id UUIDs.
20+
#
21+
# Simple format:
22+
# org_id/pipeline_id: owner/repo
23+
#
24+
# Constrained format (for pipelines that run fork builds):
25+
# org_id/pipeline_id:
26+
# repo: owner/repo
27+
# required_claims:
28+
# build_branch: [main, nightly]
29+
repo_map:
30+
# vllm-project/vllm -- the "CI" pipeline in the vllm organization.
31+
# Reports torch-nightly results to CRCR (vllm-project/vllm#51830).
32+
# This pipeline builds fork PRs and any job in it can mint an OIDC
33+
# token, so it is constrained to main: a fork PR must not be able
34+
# to report as vllm-project/vllm.
35+
018b5ec5-c236-4037-ba08-d8a5d29bcdae/018cdabc-d930-49f6-9085-634c4cb582ed:
36+
repo: vllm-project/vllm
37+
required_claims:
38+
build_branch: [main]
3839

39-
# vllm-project/vllm -- the "CI" pipeline in the vllm organization.
40-
# Reports torch-nightly results to CRCR (vllm-project/vllm#51830).
41-
# This pipeline builds fork PRs and any job in it can mint an OIDC token, so
42-
# it is constrained to main: a fork PR must not be able to report as
43-
# vllm-project/vllm.
40+
# Legacy flat section kept for deploy-ordering safety (old code reads this).
41+
buildkite:
4442
018b5ec5-c236-4037-ba08-d8a5d29bcdae/018cdabc-d930-49f6-9085-634c4cb582ed:
4543
repo: vllm-project/vllm
4644
required_claims:
4745
build_branch: [main]
48-
49-
# gitlab:
50-
# group/project: owner/repo
51-
52-
# jenkins:
53-
# job-name: owner/repo

aws/lambda/cross_repo_ci_relay/tests/test_jwt_helper.py

Lines changed: 91 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
from unittest.mock import MagicMock, patch
33

44
from utils.jwt_helper import (
5+
_jwks_clients,
56
AUDIENCE,
67
BUILDKITE_ISSUER,
78
BUILDKITE_REPO_MAP,
@@ -259,7 +260,7 @@ def tearDown(self):
259260
BUILDKITE_REPO_MAP.clear()
260261
BUILDKITE_REPO_MAP.update(self._orig_map)
261262

262-
def test_loads_valid_buildkite_entries(self):
263+
def test_loads_valid_buildkite_entries_legacy(self):
263264
raw = {
264265
"buildkite": {
265266
"org-id-1/pipe-id-1": "vllm-project/vllm",
@@ -275,7 +276,7 @@ def test_loads_valid_buildkite_entries(self):
275276
BUILDKITE_REPO_MAP[("org-id-2", "pipe-id-2")]["repo"], "acme/repo"
276277
)
277278

278-
def test_loads_constrained_entries(self):
279+
def test_loads_constrained_entries_legacy(self):
279280
raw = {
280281
"buildkite": {
281282
"org-id/pipe-id": {
@@ -293,6 +294,59 @@ def test_loads_constrained_entries(self):
293294
self.assertEqual(entry["required_claims"]["build_branch"], ["main", "nightly"])
294295
self.assertEqual(entry["required_claims"]["cluster_id"], ["cluster-uuid"])
295296

297+
def test_providers_section_loads_repo_map(self):
298+
raw = {
299+
"providers": {
300+
"buildkite": {
301+
"repo_map": {
302+
"org-id/pipe-id": "vllm-project/vllm",
303+
},
304+
},
305+
}
306+
}
307+
load_ci_provider_mappings(raw)
308+
self.assertEqual(
309+
BUILDKITE_REPO_MAP[("org-id", "pipe-id")]["repo"], "vllm-project/vllm"
310+
)
311+
312+
def test_providers_section_loads_constrained_repo_map(self):
313+
raw = {
314+
"providers": {
315+
"buildkite": {
316+
"repo_map": {
317+
"org-id/pipe-id": {
318+
"repo": "myorg/myrepo",
319+
"required_claims": {"build_branch": ["main"]},
320+
},
321+
},
322+
},
323+
}
324+
}
325+
load_ci_provider_mappings(raw)
326+
entry = BUILDKITE_REPO_MAP[("org-id", "pipe-id")]
327+
self.assertEqual(entry["repo"], "myorg/myrepo")
328+
self.assertEqual(entry["required_claims"]["build_branch"], ["main"])
329+
330+
def test_providers_ignores_issuer_jwks_fields(self):
331+
"""Config may still contain issuer/jwks_uri for documentation but they
332+
are ignored — trust anchors are compiled in."""
333+
raw = {
334+
"providers": {
335+
"buildkite": {
336+
"issuer": "https://evil.example.com",
337+
"jwks_uri": "https://evil.example.com/.well-known/jwks",
338+
"repo_map": {
339+
"org-id/pipe-id": "vllm-project/vllm",
340+
},
341+
},
342+
}
343+
}
344+
load_ci_provider_mappings(raw)
345+
self.assertNotIn("https://evil.example.com", _jwks_clients)
346+
self.assertEqual(
347+
BUILDKITE_REPO_MAP[("org-id", "pipe-id")]["repo"], "vllm-project/vllm"
348+
)
349+
296350
def test_empty_config_clears_map(self):
297351
BUILDKITE_REPO_MAP[("old", "entry")] = {
298352
"repo": "old/repo",
@@ -317,6 +371,18 @@ def test_skips_invalid_entries(self):
317371
self.assertNotIn(("noslash", ""), BUILDKITE_REPO_MAP)
318372
self.assertEqual(BUILDKITE_REPO_MAP[("ok-id", "pipe-id")]["repo"], "ok/repo")
319373

374+
def test_legacy_fallback_when_providers_has_no_repo_map(self):
375+
"""If providers section exists but has no buildkite repo_map,
376+
fall back to legacy flat buildkite section."""
377+
raw = {
378+
"providers": {"github": {}},
379+
"buildkite": {"org-id/pipe-id": "legacy/repo"},
380+
}
381+
load_ci_provider_mappings(raw)
382+
self.assertEqual(
383+
BUILDKITE_REPO_MAP[("org-id", "pipe-id")]["repo"], "legacy/repo"
384+
)
385+
320386

321387
class TestUnsupportedIssuer(unittest.TestCase):
322388
"""Tests for tokens from unsupported issuers."""
@@ -342,5 +408,28 @@ def test_none_issuer_raises_401(self):
342408
self.assertEqual(ctx.exception.status_code, 401)
343409

344410

411+
class TestTrustAnchorsCompiledIn(unittest.TestCase):
412+
"""Verify that JWKS clients are hardcoded and not modifiable via config."""
413+
414+
def test_jwks_clients_contain_known_issuers(self):
415+
self.assertIn(GITHUB_ISSUER, _jwks_clients)
416+
self.assertIn(BUILDKITE_ISSUER, _jwks_clients)
417+
418+
def test_jwks_clients_not_expandable_via_config(self):
419+
"""Loading config with a rogue issuer must not add a JWKS client."""
420+
fake_issuer = "https://rogue.example.com"
421+
raw = {
422+
"providers": {
423+
"rogue": {
424+
"issuer": fake_issuer,
425+
"jwks_uri": f"{fake_issuer}/.well-known/jwks",
426+
"repo_map": {"org/pipe": "owner/repo"},
427+
},
428+
}
429+
}
430+
load_ci_provider_mappings(raw)
431+
self.assertNotIn(fake_issuer, _jwks_clients)
432+
433+
345434
if __name__ == "__main__":
346435
unittest.main()

0 commit comments

Comments
 (0)