Skip to content

Commit f41dd6c

Browse files
committed
ci: let a flaky download fail its own job, not the whole cluster
A transient PyPI/uv fetch failure was recorded as a cluster-wide outage, which then skipped every other job on that cluster for 20 minutes. On this branch's CI that turned one bad download into red AMD lanes whose tests had already reported 0 failed. The breaker was justified by 17 Frontier jobs spending ~33 minutes each rediscovering an outage -- but the dependency install happens before any compute is committed, on the login node for Frontier, so a failed fetch costs no allocation and there is nothing to protect the matrix from. uv already retries internally. Removes classify-build-failure.sh entirely: this was its only rule. Net -128 lines. The outage breaker itself stays for cases that genuinely are cluster-wide; nothing marks one for a download any more. Claude-Session: https://claude.ai/code/session_013573Qr8zEMdYLkP4XyVfiy
1 parent 417fa64 commit f41dd6c

6 files changed

Lines changed: 29 additions & 159 deletions

File tree

.github/scripts/classify-build-failure.sh

Lines changed: 0 additions & 41 deletions
This file was deleted.

.github/workflows/common/build.sh

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -75,11 +75,6 @@ run_build_step() {
7575
local rc=${PIPESTATUS[0]}
7676
set -e
7777
if [ "$rc" -ne 0 ]; then
78-
local cls=0
79-
bash .github/scripts/classify-build-failure.sh "$log" "$job_cluster" || cls=$?
80-
if [ "$cls" -ne 0 ]; then
81-
exit "$cls"
82-
fi
8378
exit "$rc"
8479
fi
8580
}

.github/workflows/frontier/build.sh

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -24,20 +24,16 @@ clean_build
2424

2525
source .github/scripts/retry-build.sh
2626

27-
# This login-node step is where Frontier's dependency install actually happens,
28-
# and so where a PyPI outage actually lands -- 17 jobs spent ~33 minutes each
29-
# rediscovering one on 2026-08-28. Tee the output and classify a failure so the
30-
# first job to hit it records it and the rest of the matrix can skip.
27+
# Frontier's dependency install happens here, on the login node -- so a failed
28+
# download costs no allocation and there is nothing to protect the matrix from.
29+
# A flaky PyPI fetch used to be recorded as a cluster-wide outage, which then
30+
# skipped every other job on that cluster: one bad download turned into a red
31+
# matrix, including jobs whose tests had already passed. uv already retries.
3132
# No set -e in this script, so capture the status rather than toggling it.
3233
deps_log="deps-${cluster_name}-${job_device}-${job_interface}.log"
3334
retry_build ./mfc.sh build --deps-only -j 8 $build_opts 2>&1 | tee "$deps_log"
3435
deps_rc=${PIPESTATUS[0]}
3536

3637
if [ "$deps_rc" -ne 0 ]; then
37-
cls=0
38-
bash .github/scripts/classify-build-failure.sh "$deps_log" "$cluster_name" || cls=$?
39-
if [ "$cls" -ne 0 ]; then
40-
exit "$cls"
41-
fi
4238
exit 1
4339
fi

toolchain/mfc/test_build_preflight.py

Lines changed: 12 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -122,17 +122,22 @@ def test_a_failing_probe_stops_before_the_solver_build(workspace):
122122
assert len(trace.read_text().splitlines()) == 1, "solver build must not be attempted"
123123

124124

125-
def test_a_pypi_failure_records_a_cluster_outage(workspace):
125+
def test_a_pypi_failure_is_an_ordinary_build_failure(workspace):
126+
"""A flaky download must not red out the rest of the cluster.
127+
128+
The dependency install happens before any compute is committed -- on the
129+
login node for Frontier -- so a failed fetch costs no allocation and there
130+
is nothing to protect the matrix from. Recording it as a cluster-wide outage
131+
skipped every other job on that cluster, including ones whose tests had
132+
already passed, and uv already retries internally.
133+
"""
126134
tmp_path, install_mfc, run, _ = workspace
127135
install_mfc(full_build_stdout=PYPI_FAILURE, full_build_rc=1)
128-
run()
129-
assert outage_recorded(tmp_path)
130136

137+
result = run()
131138

132-
def test_a_pypi_failure_reports_the_outage_exit_code(workspace):
133-
tmp_path, install_mfc, run, _ = workspace
134-
install_mfc(full_build_stdout=PYPI_FAILURE, full_build_rc=1)
135-
assert run().returncode == 78
139+
assert result.returncode == 1, "a failed download must fail only its own job"
140+
assert not outage_recorded(tmp_path), "a failed download must not trip the cluster breaker"
136141

137142

138143
def test_an_ordinary_compile_error_is_not_treated_as_an_outage(workspace):
@@ -152,23 +157,6 @@ def test_the_build_output_is_still_shown_when_it_fails(workspace):
152157
assert "ftn-2116" in result.stdout + result.stderr
153158

154159

155-
def test_a_pypi_failure_during_the_probe_build_records_an_outage(workspace):
156-
# The probe build is now the first mfc.sh call in the job, so it is what
157-
# bootstraps build/venv from PyPI -- and on Phoenix clean_build has just
158-
# deleted that venv, so it is rebuilt every time. Classifying only the solver
159-
# build leaves the breaker blind to the outage it exists for.
160-
tmp_path, install_mfc, run, _ = workspace
161-
install_mfc(probe_build_stdout=PYPI_FAILURE, probe_build_rc=1)
162-
run()
163-
assert outage_recorded(tmp_path)
164-
165-
166-
def test_a_pypi_failure_during_the_probe_build_reports_the_outage_exit_code(workspace):
167-
tmp_path, install_mfc, run, _ = workspace
168-
install_mfc(probe_build_stdout=PYPI_FAILURE, probe_build_rc=1)
169-
assert run().returncode == 78
170-
171-
172160
def test_an_ordinary_probe_build_failure_is_not_an_outage(workspace):
173161
tmp_path, install_mfc, run, _ = workspace
174162
install_mfc(probe_build_stdout="NVFORTRAN-S-0034-Syntax error\n", probe_build_rc=1)

toolchain/mfc/test_classify_build_failure.py

Lines changed: 0 additions & 73 deletions
This file was deleted.

toolchain/mfc/test_frontier_deps.py

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -74,17 +74,22 @@ def test_a_successful_dependency_fetch_records_nothing(workspace):
7474
assert not outage_recorded(tmp_path)
7575

7676

77-
def test_a_pypi_outage_on_the_login_node_is_recorded(workspace):
77+
def test_a_pypi_failure_is_an_ordinary_build_failure(workspace):
78+
"""A flaky download must not red out the rest of the cluster.
79+
80+
The dependency install happens before any compute is committed -- on the
81+
login node for Frontier -- so a failed fetch costs no allocation and there
82+
is nothing to protect the matrix from. Recording it as a cluster-wide outage
83+
skipped every other job on that cluster, including ones whose tests had
84+
already passed, and uv already retries internally.
85+
"""
7886
tmp_path, install_mfc, run = workspace
7987
install_mfc(stdout=PYPI_FAILURE, rc=1)
80-
run()
81-
assert outage_recorded(tmp_path)
8288

89+
result = run()
8390

84-
def test_a_pypi_outage_on_the_login_node_reports_the_outage_exit_code(workspace):
85-
tmp_path, install_mfc, run = workspace
86-
install_mfc(stdout=PYPI_FAILURE, rc=1)
87-
assert run().returncode == 78
91+
assert result.returncode == 1, "a failed download must fail only its own job"
92+
assert not outage_recorded(tmp_path), "a failed download must not trip the cluster breaker"
8893

8994

9095
def test_an_ordinary_dependency_failure_is_not_an_outage(workspace):

0 commit comments

Comments
 (0)