ci(contract-tests): retry + diagnóstico real no smoke do supabase start#510
Conversation
O job smoke (advisory) falhava no step 'Start Supabase stack' (bring-up do stack local), e o dump de falha só mostrava /tmp/functions.log — vazio, pois o serve nem chegava a rodar, escondendo o erro real. - supabase start agora roda com --debug e log capturado; uma retry após 'supabase stop' absorve flakiness transitória de bring-up sem mascarar falha persistente. - Step de falha renomeado para 'Dump diagnostics' e ampliado: supabase-start.log, functions.log, 'docker ps -a' e 'supabase status'. Job permanece advisory (continue-on-error) e PR-only — sem impacto nos gates do main.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
WalkthroughO workflow contract-tests.yml do job ChangesMelhorias no job smoke
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Possibly related PRs
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
This pull request has been ignored for the connected project Preview Branches by Supabase. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
There was a problem hiding this comment.
Pull request overview
Hardens the advisory “Smoke — HTTP against supabase functions serve” CI job by making supabase start failures diagnosable and less flaky, so future infra/CLI bring-up issues are actionable without implying a contract/code regression.
Changes:
- Run
supabase startwith--debugand capture logs to/tmp/supabase-start.log. - Add a single retry for
supabase startaftersupabase stopto absorb transient bring-up failures. - Expand failure diagnostics to include Supabase start logs, functions serve logs,
docker ps -a, andsupabase status.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| start_stack() { | ||
| supabase start --debug > /tmp/supabase-start.log 2>&1 | ||
| } | ||
| # O bring-up do stack local é ocasionalmente flaky no CI (pull de imagens | ||
| # Docker, drift do CLI etc.). Uma retry após `supabase stop` absorve falhas | ||
| # transitórias sem mascarar erro persistente — o log é preservado p/ diagnóstico. | ||
| if ! start_stack; then | ||
| echo "::warning::supabase start falhou na 1ª tentativa — limpando e tentando novamente" | ||
| supabase stop || true | ||
| start_stack | ||
| fi |
Contexto
Durante a auditoria pós-merge do #509, o único check vermelho era o job "Smoke — HTTP against supabase functions serve" (workflow
contract-tests.yml).Diagnóstico
A falha foi no step
Start Supabase stack(supabase start) — bring-up do stack local no CI. Os steps seguintes (serve + smoke) foram skipped e o "Unit — Zod schemas" passou. Ou seja: não é regressão de contrato/código, é flakiness de infra ao subir o stack. Pior: o dump de falha só mostrava/tmp/functions.log(vazio, pois o serve nem rodou), escondendo o erro real.Mudança (aditiva, sem risco)
supabase startagora roda com--debuge log capturado; 1 retry apóssupabase stopabsorve flakiness transitória de bring-up sem mascarar falha persistente.Dump diagnostics):supabase-start.log,functions.log,docker ps -aesupabase status— assim a próxima falha será diagnosticável.Próximo passo provável
Se o erro real (agora visível) apontar drift do
supabase/setup-cli@v1 version: latest, o follow-up é pinar o CLI numa versão estável (3 workflows usamlatesthoje). Deixei de fora desta PR para não pinar no chute — espero o log real primeiro.https://claude.ai/code/session_01QpLctApdgHrT7hBAS3dk71
Generated by Claude Code
Summary by cubic
Hardens the smoke job in
contract-tests.ymlby adding a retry and real diagnostics tosupabase start, reducing CI flakiness and making failures actionable. The job remains advisory (continue-on-error) and PR-only, with no impact on main.supabase start --debugwith log capture; on first failure,supabase stopthen retry once./tmp/supabase-start.log,/tmp/functions.log,docker ps -a, andsupabase status.Written for commit 3cd4663. Summary will update on new commits.
Summary by CodeRabbit