Skip to content

Commit 38db243

Browse files
committed
Merge remote-tracking branch 'origin/main' into ajost/core-bindings-runtime-floor
2 parents 5417ea7 + 48f55a3 commit 38db243

18 files changed

Lines changed: 995 additions & 995 deletions

File tree

‎.github/workflows/test-wheel-linux.yml‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,10 @@ jobs:
128128
steps:
129129
- name: Checkout ${{ github.event.repository.name }}
130130
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
131+
with:
132+
# Test sources must match the wheels under test (nightly runs
133+
# reuse wheels built from an older commit of main).
134+
ref: ${{ inputs.sha || github.sha }}
131135

132136
- name: Setup proxy cache
133137
uses: nv-gha-runners/setup-proxy-cache@main

‎.github/workflows/test-wheel-windows.yml‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,10 @@ jobs:
107107
steps:
108108
- name: Checkout ${{ github.event.repository.name }}
109109
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
110+
with:
111+
# Test sources must match the wheels under test (nightly runs
112+
# reuse wheels built from an older commit of main).
113+
ref: ${{ inputs.sha || github.sha }}
110114

111115
- name: Setup proxy cache
112116
uses: nv-gha-runners/setup-proxy-cache@main

‎ci/tools/lookup-run-id‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,6 @@ if [[ "${MODE}" == "branch" ]]; then
104104
--repo "${REPOSITORY}" \
105105
--branch "${REF}" \
106106
--workflow "${WORKFLOW_NAME}" \
107-
--status success \
108107
--json databaseId,workflowName,status,conclusion,headSha,headBranch,createdAt,url \
109108
--limit 100)
110109

@@ -206,8 +205,8 @@ RUN_DATA=$(gh run list \
206205
--repo "${REPOSITORY}" \
207206
--commit "${COMMIT_SHA}" \
208207
--workflow "${WORKFLOW_NAME}" \
209-
--status completed \
210208
--json databaseId,workflowName,status,conclusion,headSha,headBranch,event,createdAt,url \
209+
--jq 'map(select(.status == "completed"))' \
211210
--limit 50)
212211

213212
if [[ -z "${RUN_DATA}" || "${RUN_DATA}" == "[]" ]]; then

‎ci/tools/tests/test_lookup_run_id.py‎

Lines changed: 47 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -22,21 +22,31 @@
2222
if args[:2] == ["run", "list"]:
2323
runs = json.loads(os.environ["FAKE_RUNS"])
2424
try:
25-
status = args[args.index("--status") + 1]
2625
limit = int(args[args.index("--limit") + 1])
2726
except (ValueError, IndexError):
28-
print("run list requires --status and --limit", file=sys.stderr)
27+
print("run list requires --limit", file=sys.stderr)
2928
raise SystemExit(2)
30-
if status == "success":
31-
runs = [run for run in runs if run["conclusion"] == "success"]
32-
elif status == "completed":
33-
runs = [run for run in runs if run["status"] == "completed"]
34-
else:
35-
print(f"unsupported status filter: {status}", file=sys.stderr)
29+
if "--status" in args:
30+
print("status filters are intentionally unsupported", file=sys.stderr)
3631
raise SystemExit(2)
32+
if "--jq" in args:
33+
try:
34+
jq_filter = args[args.index("--jq") + 1]
35+
except IndexError:
36+
print("run list --jq requires a value", file=sys.stderr)
37+
raise SystemExit(2)
38+
if jq_filter == 'map(select(.status == "completed"))':
39+
runs = [run for run in runs if run["status"] == "completed"]
40+
else:
41+
print(f"unsupported jq filter: {jq_filter}", file=sys.stderr)
42+
raise SystemExit(2)
3743
print(json.dumps(runs[:limit]))
3844
raise SystemExit(0)
3945
46+
if args[:2] == ["run", "view"]:
47+
print(json.dumps({"url": "https://example.invalid/runs/view"}))
48+
raise SystemExit(0)
49+
4050
if args[:1] == ["api"]:
4151
if "--paginate" not in args or "--jq" not in args:
4252
print("artifact lookup must be paginated and filtered", file=sys.stderr)
@@ -60,14 +70,24 @@
6070
"""
6171

6272

63-
def _run(run_id, created_at, *, branch="12.9.x", workflow="CI", conclusion="success"):
73+
def _run(
74+
run_id,
75+
created_at,
76+
*,
77+
branch="12.9.x",
78+
workflow="CI",
79+
conclusion="success",
80+
event="push",
81+
status="completed",
82+
):
6483
return {
6584
"databaseId": run_id,
6685
"workflowName": workflow,
67-
"status": "completed",
86+
"status": status,
6887
"conclusion": conclusion,
6988
"headSha": f"sha-{run_id}",
7089
"headBranch": branch,
90+
"event": event,
7191
"createdAt": created_at,
7292
"url": f"https://example.invalid/runs/{run_id}",
7393
}
@@ -104,14 +124,14 @@ def _lookup(fake_gh, runs, artifacts, *args, workflow="CI"):
104124

105125
@pytest.mark.agent_authored(model="gpt-5.6")
106126
class TestBranchLookup:
107-
def test_filters_successful_runs_before_applying_limit(self, fake_gh):
127+
def test_filters_successful_runs_without_status_filter(self, fake_gh):
108128
runs = [
109129
_run(
110130
run_id,
111131
"2026-08-13T12:00:00Z",
112132
conclusion="failure",
113133
)
114-
for run_id in range(200, 100, -1)
134+
for run_id in range(200, 190, -1)
115135
]
116136
runs.append(_run(50, "2026-08-12T12:00:00Z"))
117137

@@ -237,3 +257,18 @@ def test_propagates_artifact_api_failures(self, fake_gh):
237257

238258
assert result.returncode == 1
239259
assert "Failed to list artifacts for run 100" in result.stderr
260+
261+
262+
@pytest.mark.agent_authored(model="gpt-5.6")
263+
class TestTagLookup:
264+
def test_filters_completed_runs_without_status_filter(self, fake_gh):
265+
runs = [
266+
_run(300, "2026-08-13T12:00:00Z", branch="HEAD", status="in_progress"),
267+
_run(200, "2026-08-12T12:00:00Z", branch="HEAD"),
268+
_run(100, "2026-08-11T12:00:00Z", branch="HEAD"),
269+
]
270+
271+
result = _lookup(fake_gh, runs, {}, "HEAD")
272+
273+
assert result.returncode == 0, result.stderr
274+
assert result.stdout.strip() == "200"

0 commit comments

Comments
 (0)