🧯 ci: Stop Diagnostic Artifact Uploads From Failing or Stalling Test Jobs (#18068)

On 2026-11-11 the artifact service answered every request with an HTML
page. In Playwright run 43092661470 eight memory shards failed in
"Upload Playwright HTML report" after retrying for 9 to 10.5 minutes;
in six of them every test had passed.

Uploads that no job downloads (Playwright reports, traces and
screenshots, the Lighthouse report, the advisory quality reports) are
now `continue-on-error` with a three minute step timeout, so a failed
upload stays out of the job result and a stalled one cannot run the job
into its own timeout. The Jest result uploads were already
`continue-on-error` and gain the same bound. Build outputs and mutation
shards that a later job downloads stay fatal.

merge-gate.test.mjs holds the gated workflows to that split, and
workflow.test.mts holds Change Quality to it.
This commit is contained in:
Danny Avila 2026-11-11 19:17:15 -05:00 • committed by GitHub
parent d434417089
commit bd9108a87a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 87 additions and 7 deletions

View file

@ -138,6 +138,27 @@ test('every gated workflow starts for a merge group and closes in one gate over
}
});
test('an artifact upload can fail a gated job only when another job downloads the artifact', () => {
const runs = (step, action) => step.uses?.startsWith(`actions/${action}-artifact@`);
for (const suite of SUITES) {
const steps = Object.entries(workflows[suite.workflow].jobs).flatMap(([job, definition]) =>
definition.steps.map((step) => ({ job, step })),
);
const downloaded = new Set(
steps.filter(({ step }) => runs(step, 'download')).map(({ step }) => step.with.name),
);
for (const { job, step } of steps.filter(({ step }) => runs(step, 'upload'))) {
const label = `${suite.workflow} ${job} uploads ${step.with.name}`;
if (downloaded.has(step.with.name)) {
assert.equal(step['continue-on-error'], undefined, `${label}, which a later job needs`);
continue;
}
assert.equal(step['continue-on-error'], true, `${label}, which no job downloads`);
assert.ok(step['timeout-minutes'] > 0, `${label} without a bound on a stalled upload`);
}
}
});
test('a required context is the name of exactly one gate job and of nothing else', () => {
const contexts = SUITES.map((suite) => suite.context);
assert.equal(new Set(contexts).size, contexts.length);