Repository navigation
Description
Performance Benchmarks has been reporting success while producing nothing. The step it runs exits 1, continue-on-error: true swallows it, and the job then uploads an empty artifact and posts an empty code block to the PR.
The proof
The comment the job left on #973, verbatim:
## 📊 Performance Benchmark Results
An empty fenced block. That is what every PR reaching this job has been getting.
Two breakages, stacked
1. deno picks up a tsconfig from a different app. .github/workflows/api-tests.yml runs the bench with no --config:
deno bench --allow-all functions/api/__tests__/benchmarks/rest-vs-trpc.bench.ts > benchmark-results.txt
Config discovery walks out of packages/supabase and lands on a sibling:
error: Unsupported 'jsx' compiler option value 'react-native'.
Supported: 'react-jsx', 'react-jsxdev', 'react', 'precompile'
at apps/ui-storybook-native/tsconfig.json
"jsx": "react-native" is valid for React Native and unsupported by deno. That file has been there since the Expo 55→56 upgrade (#298), so the bench has been dead roughly that long. Reproduced locally, identical message. The > redirect still creates benchmark-results.txt, empty — which is why the artifact and the comment are empty rather than absent, and why nothing looked broken.
2. With the config fixed, the bench still does not compile. Passing --config=functions/api/deno.json clears the jsx error and uncovers a real type error in the benchmark's own dependency:
TS2552 [ERROR]: Cannot find name 'url'. Did you mean 'URL'?
[...url.searchParams.keys()].join(", ") || "none"
at packages/supabase/functions/api/__tests__/setup.ts:305:15
That is a genuine bug, not a config artifact — setup.ts:299 has const params = … and no url in scope, so the error branch would throw ReferenceError instead of logging if it were ever reached. Introduced or last touched by #932 / #922.
So fixing the config alone will not make this green; both need doing, and the second one is a live defect in a shared test fixture.
The continue-on-error question
It is there so a flaky benchmark cannot block a PR, which is reasonable. The problem is that it also hides "the benchmark did not run", and those are different states. Options, roughly in order of preference:
- Keep
continue-on-erroron the measurement, but fail the job ifbenchmark-results.txtis empty or missing — "it ran and was slow" stays non-blocking, "it never ran" becomes loud. - Drop
continue-on-erroronce it actually runs, and let a genuine regression fail. - Delete the job. It has produced no data since chore(deps): upgrade Expo SDK 55 → 56 (atomic) #298 and nobody missed it, which is its own argument.
Same family as #941 (checks that only run in prepush) and #961 (test files no runner executes): a green that means nothing is worse than a red, because people spend the green.
Acceptance
-
deno benchruns the benchmark file to completion in CI, with an explicit--config. -
setup.ts:305is fixed so the magic-link error branch logs instead of throwing. -
benchmark-results.txtis non-empty in the uploaded artifact, and the PR comment shows real figures (or the comment step is dropped — see Every fork PR fails REST API Tests on a cosmetic step: the benchmark comment needs a same-repo guard #986). - An empty or missing results file fails the job rather than passing it.
Found while merging #972; the empty comment above is from #973.
Activity
fix(ci): skip the benchmark PR comment on forks, so fork PRs stop goi…
fix(ci): make the performance benchmark actually run, and fail loudly…