Repository navigation
ci(browser): say which check failed, and rank failures across runs - #1009
Conversation
…ne's reports A flaky or failed browser script was reported by name only. The console lines, the warning annotation, a new error annotation for a script that fails twice, the job summary and summary.json now carry the first error line of its log and the first stack frame in scripts/.
…ipts across recent runs bun scripts/ci-flakes.ts reads recent ci.yml runs through gh and lists each script and failing site with how often it failed and how often it passed only on a second run.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Summary
Merge Risk: ⚪ Minimal · up to
|
Change
Since #1002 a browser script that fails is run once more and a pass on the second run is reported as flaky. Two things were still missing for whoever maintains the lanes.
The report did not say what failed. "FLAKY scripts/ui-regression.ts" names a script with 65 checks. The lane now reads the failed run's log for the first error line and the first stack frame in
scripts/, and puts both in the console line, the warning annotation, the job summary andsummary.json:A script that fails twice gets an
::error title=Browser script failed::annotation with the same, which it did not have. A log with no recognisable error is reported as before, by script alone.Nothing counted failures across runs.
bun scripts/ci-flakes.ts [--hours 24] [--repo owner/name] [--json]reads recentci.ymlruns throughgh, every attempt of each, and prints each script and failing site with how often it failed and how often it passed only on a second run, most frequent first. It changes nothing. A failed job's log is read; a passed job's only when it carries the flaky warning, so 30 hours of this repository (242 runs, 516 browser jobs) take about 100 seconds instead of more than five minutes.What it shows today, first rows of
--hours 30:No change to which scripts run, to the second run, to exit codes or to what gates a merge.
Validation
bun run typecheck: pass.scripts/ci-flakes.test.ts(new),pages-gate.test.ts(new cases forfailureSite),conventions.test.ts,changelog-fold.test.ts: 0 fail. WithfailureSitemade to return no site, 4 of those cases fail.BROWSER_SCRIPTS=scripts/deep-link-demo-regression.ts GITHUB_ACTIONS=true bun scripts/ci-browser-parallel.tsand a throwaway line that made that script fail:::warning, the job summary andsummary.jsonall carryscripts/deep-link-demo-regression.ts:10andAssertionError: scratch forced failure;::error title=Browser script failed::with the same;process.exit(1)with nothing printed, first run only: exit 0, reported flaky by script alone, no "null" or "undefined".bun scripts/ci-flakes.ts --hours 30against this repository: exit 0 in 103 s; listsscripts/ui-regression.tsas flaky for run 38490957637 and the pre-retry failures.--jsonparses. WithGH_TOKENset to a bad token it printsgh: Bad credentials (HTTP 401)and exits 1.