e846d45ce6 chore(studio): retry flaky unit tests in CI (#48939)
<!-- ccr-slack-attribution -->
_Requested via [Slack
thread](https://supabase.slack.com/archives/C063LNYJJKS/p1786454906416269?thread_ts=1786454906.416269&cid=C063LNYJJKS)_

## I have read the
[CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md)
file.

YES

## What kind of change does this PR introduce?

Chore / CI reliability. One-line config change to
`apps/studio/vitest.config.ts`.

## What is the current behavior?

**Before:** the `Studio Unit Tests & Build Check` workflow sometimes
goes red on `master` for no reason anyone can act on. Since 2026-07-29
it failed 3 out of 82 test executions (3.7%), every time at job `test
(1)`, step `Run Tests`. Every one of those three passed on a re-run with
no code change:

- https://github.com/supabase/supabase/actions/runs/31495760766
(`4587d177`, Aug 11)
- https://github.com/supabase/supabase/actions/runs/31409667566
(`b04d1485`, Aug 10)
- https://github.com/supabase/supabase/actions/runs/31203465483
(`777c02c2`, Aug 7)

Each failure also posts a Slack alert to #team-frontend-alerts via
`.github/workflows/studio-master-alert.yml`, so someone gets pinged,
opens the run, clicks re-run, and it goes green.

## What is the new behavior?

**After:** a test that fails in CI gets up to two more attempts before
the job is marked failed. A genuinely broken test still fails all three
attempts and still goes red. Locally nothing changes — the first failure
is the result you see, so you are never waiting on retries while
debugging.

## Additional context

**How:** added `retry: IS_CI ? 2 : 0` to the `test` block of
`apps/studio/vitest.config.ts`, with `const IS_CI = !!process.env.CI`
matching the pattern already used in
`e2e/studio/playwright.config.ts:51` (`retries: IS_CI ? 5 : 0`).

**Known limitation — we do not know which test is flaking.** The GitHub
Actions log downloads for those three runs were not retrievable, and the
API only surfaces `Process completed with exit code 1`. So this treats
the symptom without naming the cause.

The natural follow-up is to upload a JUnit or JSON vitest report as an
artifact with `if: always()`, which would name the flaking test on the
next failure. That is deliberately **not** in this PR — it is a workflow
change and was scoped out.

One more honest caveat: per-test retry only helps if the failure is an
assertion or timeout inside a test. If the real cause is a worker crash
or OOM, retrying will not save the run. That is a live possibility here
— the workflow sets `NODE_OPTIONS: '--max_old_space_size=3072'` with the
in-repo comment "Default is 2 GB, increase to have less frequent OOM
errors", which says someone has already hit memory pressure in this job.

So: worth landing as a cheap reduction in false alarms, but if the 3.7%
does not drop, the report artifact is the next step rather than more
retries.


---
_Generated by [Claude
Code](https://claude.ai/code/session_01U4338RsMYAc1uGuwTFNGBD)_

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Ali Waseem <waseema393@gmail.com>
2026-08-11 13:57:01 +00:00
2025-06-17 11:08:46 +02:00
2026-06-30 14:03:40 +02:00
2024-01-10 13:34:41 +01:00
2021-07-25 12:45:26 +08:00

Supabase

Supabase is the Postgres development platform. We're building the features of Firebase using enterprise-grade open source tools.

  • Hosted Postgres Database. Docs
  • Authentication and Authorization. Docs
  • Auto-generated APIs.
  • Functions.
    • Database Functions. Docs
    • Edge Functions Docs
  • File Storage. Docs
  • AI + Vector/Embeddings Toolkit. Docs
  • Dashboard

Supabase Dashboard

Watch "releases" of this repo to get notified of major updates.

Watch this repo

Documentation

For full documentation, visit supabase.com/docs

To see how to Contribute, visit Getting Started

Community & Support

  • Community Forum. Best for: help with building, discussion about database best practices.
  • GitHub Issues. Best for: bugs and errors you encounter using Supabase.
  • Email Support. Best for: problems with your database or infrastructure.
  • Discord. Best for: sharing your applications and hanging out with the community.

How it works

Supabase is a combination of open source tools. We’re building the features of Firebase using enterprise-grade, open source products. If the tools and communities exist, with an MIT, Apache 2, or equivalent open license, we will use and support that tool. If the tool doesn't exist, we build and open source it ourselves. Supabase is not a 1-to-1 mapping of Firebase. Our aim is to give developers a Firebase-like developer experience using open source tools.

Architecture

Supabase is a hosted platform. You can sign up and start using Supabase without installing anything. You can also self-host and develop locally.

Architecture

  • Postgres is an object-relational database system with over 30 years of active development that has earned it a strong reputation for reliability, feature robustness, and performance.
  • Realtime is an Elixir server that allows you to listen to PostgreSQL inserts, updates, and deletes using websockets. Realtime polls Postgres' built-in replication functionality for database changes, converts changes to JSON, then broadcasts the JSON over websockets to authorized clients.
  • PostgREST is a web server that turns your PostgreSQL database directly into a RESTful API.
  • GoTrue is a JWT-based authentication API that simplifies user sign-ups, logins, and session management in your applications.
  • Storage a RESTful API for managing files in S3, with Postgres handling permissions.
  • pg_graphql a PostgreSQL extension that exposes a GraphQL API.
  • postgres-meta is a RESTful API for managing your Postgres, allowing you to fetch tables, add roles, and run queries, etc.
  • Envoy is a cloud-native, high-performance edge and service proxy.

Client libraries

Our approach for client libraries is modular. Each sub-library is a standalone implementation for a single external system. This is one of the ways we support existing tools.

Language Client Feature-Clients (bundled in Supabase client)
Supabase PostgREST GoTrue Realtime Storage Functions
⚡️ Official ⚡️
JavaScript (TypeScript) supabase-js postgrest-js auth-js realtime-js storage-js functions-js
Flutter supabase-flutter postgrest-dart gotrue-dart realtime-dart storage-dart functions-dart
Swift supabase-swift postgrest-swift auth-swift realtime-swift storage-swift functions-swift
Python supabase-py postgrest-py gotrue-py realtime-py storage-py functions-py
💚 Community 💚
C# supabase-csharp postgrest-csharp gotrue-csharp realtime-csharp storage-csharp functions-csharp
Go - postgrest-go gotrue-go - storage-go functions-go
Java - - gotrue-java - storage-java -
Kotlin supabase-kt postgrest-kt auth-kt realtime-kt storage-kt functions-kt
Ruby supabase-rb postgrest-rb - - - -
Rust - postgrest-rs - - - -
Godot Engine (GDScript) supabase-gdscript - - - - -

Badges

Made with Supabase

[![Made with Supabase](https://supabase.com/badge-made-with-supabase.svg)](https://supabase.com)
<a href="https://supabase.com">
  <img
    width="168"
    height="30"
    src="https://supabase.com/badge-made-with-supabase.svg"
    alt="Made with Supabase"
  />
</a>

Made with Supabase (dark)

[![Made with Supabase](https://supabase.com/badge-made-with-supabase-dark.svg)](https://supabase.com)
<a href="https://supabase.com">
  <img
    width="168"
    height="30"
    src="https://supabase.com/badge-made-with-supabase-dark.svg"
    alt="Made with Supabase"
  />
</a>

Translations

Languages
TypeScript 59.3%
MDX 21.5%
JavaScript 17.9%
CSS 0.6%
Shell 0.4%
Other 0.2%