261 Commits

Author SHA1 Message Date
Jordi Enric
25abebc32e a new hope (#38893)
* a new hope

* run tests in ci against cli mode

* summary

* try vercel action to run e2e against studio self hosted preview

* believe

* debug

* gh pages artifact

* test

* rm pages step

* fix automation bypass missing

* continue on error

* only install necessary deps for CI

* fix bypass

* remove

* fail job if test fails

* disable customer query if is_platform false

* vercel check

* fix var name, make comment update instead

* check bypass on runtime

* add env var

* fix tests going to project ref instead of default

* fix

* better dates in comment

* Update E2E test workflow to include flaky test detection and improve summary output

* fix

* fix dumb mistake
2025-09-23 12:02:23 +02:00
Ivan Vasilov
dc5ab444df feat: Add typechecking as a required check for the merge queue (#38939)
* Disable typesafe builds on prod for studio.

* Add typecheck github action to the merge queue checks.

* Add typescript dependency to packages to stabilize their versions.

* Add tailwindcss to the catalog.
2025-09-23 11:34:56 +02:00
Jordi Enric
10d96127e5 coveralls: fail-on-error false (#38866)
failonerror false
2025-09-19 17:32:13 +02:00
Charis
66d8ee67b9 fix: docs sync script (#38795) 2025-09-18 16:05:23 -04:00
Charis
8cd5e10038 feat: alternate search index for nimbus (#38662)
* feat: alternate search index for nimbus

Create an alternate search index for Nimbus that filters out
feature-flagged pages (equivalent to setting all feature flags to
false).

Notes:
- Creates two new DB tables, `page_nimbus` and `page_section_nimbus`,
  which are filtered versions of `page` and `page_section`
- Makes `nimbus` versions of all the DB search functions
- Refactored the embedding upload script. Changes to make it faster (got
  annoyed by how slow it was when testing...), incorporate retries, and
  produce better summary logs.
- Upload script, when run with the environment variable
  ENABLED_FEATURES_OVERRIDE_DISABLE_ALL, produces and uploads the
  alternate search index
- Changed all the search calls in frontend/API to check for
  `isFeatureEnabled('search:fullIndex')` to determine whether to search
  the full or alternate index

* ci: produce nimbus search indexes on merge

* fix: turn full search index on
2025-09-16 12:37:53 -04:00
Etienne Stalmans
ec66608c25 chore: stricter action config for labeler (#38708)
* chore: stricter action config for labeler

* chore: checkout not needed
2025-09-15 14:26:05 +00:00
Chris Chinchilla
407d466aaf chore: Add labeler action and documentation config (#38704)
* Add labeler action and documentation config

* Update .github/labeler.yml

Co-authored-by: Raúl Barroso <code@raulb.dev>

---------

Co-authored-by: Raúl Barroso <code@raulb.dev>
2025-09-15 12:02:04 +00:00
Katerina Skroumpelou
a5fc052704 docs: update js client libs docs (#38595)
* docs: update js client libs docs

* chore: update test snapshot for specs

* ci(docs): run tests on spec changes

---------

Co-authored-by: Charis Lam <26616127+charislam@users.noreply.github.com>
2025-09-11 12:14:27 +01:00
Kevin Grüneberg
dfb152ab8c chore: consolidate payment method components / ownership (#38578)
Security approval is required for PCI compliance. This means we need security approval wherever we embed Stripe for payment methods.

Security approval was previously very coarse and most billing changes required security approval unnecessarily.

This PR aims to move all files relevant for payment method display/changes into a single folder and adjusts the ownership to only require security approval for that.
2025-09-10 13:54:36 +08:00
Charis
47705a8968 chore: replace all supabase urls with relative urls (#38537)
* fix: rewrite relative URLs when syncing to GitHub discussion

Relative URLs back to supabse.com won't work in GitHub discussions, so
rewrite them back to absolute URLs starting with https://supabase.com

* fix: replace all supabase urls with relative urls

* chore: add linting for relative urls

* chore: bump linter version

* Prettier

---------

Co-authored-by: Chris Chinchilla <chris.ward@supabase.io>
2025-09-09 12:54:33 +00:00
blacksmith-sh[bot]
96f99014d8 .github/workflows: Migrate workflows to Blacksmith runners (#38549)
Migrate workflows to Blacksmith

Co-authored-by: blacksmith-sh[bot] <157653362+blacksmith-sh[bot]@users.noreply.github.com>
2025-09-09 18:27:43 +08:00
Kevin Grüneberg
742b720b37 chore: use built-in GH runner (#38544)
Temp fix until blacksmith is unblocked
2025-09-09 06:14:15 +00:00
Kevin Grüneberg
1363954156 ci: use blacksmith (#38543) 2025-09-09 05:10:46 +00:00
Charis
11ebbb7a7c fix: embedding upload error (#38439)
Markdown processing for uploads now depends on the 'common' package (for
feature flag querying). Added it to the GitHub Workflow to make sure
it is accessible during that step. (Actually added the whole packages
directory since it seems likely that we might need other stuff from this
in the future.)
2025-09-04 11:47:47 -04:00
Francesco Sansalvadore
2feda5ee19 cms www blog (#38045)
* show cms blog posts in www
* remove contentlayer from www
* outputFileTracingExcludes
* update remotePatterns
* fetch cms posts server-side with revalidation
* add cms env vars to turbo.json
* add www env vars to turbo.json
* include cms posts in www sitemap
* add migration to remove image from cms post
* update cms meta image mapping in www
2025-09-03 14:49:28 +02:00
Charis
9551315f6a fix: search sync + sentry errors issues (#37912)
* fix: search sync + sentry errors issues

Fixes two issues:
1. Search sync: The embedded content now includes denormalized examples,
   so the examples codegen needs to be run before embeddings are
   created. Otherwise, the GitHub Action will fail because it cannot
   find the examples to use for content inclusion.
2. Sentry errors on pages that fail to load: Sentry errors were being
   sent for genuine 404s because the check for FileNotFoundErrors was
   wrong. The error that is caught is wrapped in a new Error by
   Result.unwrap(), so it's the child of this error, error.cause, that
   is potentially a FileNotFoundError, not the error itself.

* fix: remove double processing of mdx
2025-08-13 16:50:30 -04:00
Charis
3e25e4dd37 chore: remove troubleshooting codeowners (#37697)
Code ownership was temporary while ironing out problems with sync
workflow. It seems more stable now, so I'm removing codeownership to
make sure people aren't blocked on troubleshooting updates while I'm
away.
2025-08-05 14:22:23 -04:00
Charis
0c0be801ae chore(docs): add logflare logging (#37310) 2025-07-31 15:10:37 -04:00
Kamil Ogórek
f7545fe90d ci: Change permissions for api docs update CI action (#37433) 2025-07-25 07:03:26 +00:00
Pamela Chia
5f76c85dd1 chore: cleanup telemetry codeowners (#37396) 2025-07-23 17:18:07 +08:00
Jordi Enric
ac6b1b94e5 add e2e test action (#37293) 2025-07-18 14:39:48 +02:00
Bo Lu
6e84bd1d72 docs: add Iceberg and DuckDB FDW docs (#36965)
* docs: add Apache Iceberg FDW docs

* docs: add DuckDB FDW docs

* fix(tests): fix docs tests erroring in CI

GitHub Auth was enabled in our supabase config.toml, which causes the supabase startup to try finding GITHUB_CLIENT_ID and GITHUB_CLIENT_SECRET in env. We don't actually need these for tests, so we can just mock them.

---------

Co-authored-by: Charis Lam <26616127+charislam@users.noreply.github.com>
2025-07-09 11:00:54 -04:00
Charis
e2fecc0f5d chore(docs linter): bump version (#36715)
* chore(docs linter): bump version

* style: format
2025-07-03 14:46:29 +00:00
Jordi Enric
e0629c44b2 rm e2e gh action (#36846) 2025-07-03 00:40:34 +02:00
Ivan Vasilov
37e44bec9c feat: Add GTM (#35567)
* Add third-parties dependency for GTM. Reexport the GTM from the common package.

* Add the TelemetryTagManager to four of the production apps.

* Add the GOOGLE_TAG_MANAGER_ID env var as a turbo dependency to the 4 apps.

* Skip rendering the tag manager if the env var is not set or not running on the platform.

* Fix the prop type to be extracted from the component.

* Add default values for consent to GTM.

* Another try to mimic gtag function.

* Fix a link in www.

* Try another approach.

* try.

* Remove the data-redaction flag.

* Remove extra code.

* Send a sign-up event if GTM is enabled.

* Send only the email to GTM.

* Minor fixes.

* Remove third-parties from pnpm lockfile.

* Lets try to make studio work again.

* Add CSP rules for img loading for GTM.

* Add event for testing.

* Add www.googletagmanager.com to the CSP rules.

* Add Stape to CSP rules.

* Fix stape CSP.

* Clean up the code.

* Remove extra console.log.

* Fix the stape urls for CORS.

* Fix the wrong category for Stape URL.

* Add google ads urls.

* Bump the timeout.

* Add google.com to the img-src for google ads.

* update csp

* remove comment

* update to use google analytics without signals

* add stape to default-src in csp

* move csp to middleware

* add google ads support and fix middleware base path

* remove google tag manager / google ads references from csp. load via stape proxy instead

* add double click url to image src

* add Google Tag Manager URL to CSP configuration

* add ga4 urls to csp

* remove google urls from CSP

---------

Co-authored-by: Alaister Young <a@alaisteryoung.com>
2025-06-30 10:35:47 +00:00
Kevin Grüneberg
4d4036e649 chore: update code owners or pricing (#36499)
Allow billing team to approve/make changes
2025-06-18 14:22:08 +08:00
Paul Cioanca
b7234ea26d chore: use larger runner group rather than a single larger runner (#36216) 2025-06-06 13:10:29 +03:00
Charis
4b9662b21e ci(docs lint): fix commenting workflow (#36062)
* ci(docs): fix sync process

GraphQL codegen needs to be run before sync because otherwise the types
are missing. Missed this in local testing because codegen had already
been run for other reasons.

* fix(troubleshooting sync): unresolved import

* ci(docs lint): fix commenting workflow
2025-06-05 13:16:36 -04:00
Charis
3158807579 ci(docs): sync script (#36001)
Add a script for syncing error codes from the repo to the database. This
is part of the newly created rootSync script, where all sync scripts
should be moved eventually.
2025-06-05 12:28:45 -04:00
Jordi Enric
55c3fdb49a E2E Testing Setup Consolidation (#35080)
* add new e2e folder

* add local supabase and confitional storage

* fix e2e selfhosted

* update actions

* add correct e2e folder

* fix e2e actions

* fix action project ids

* fix permissions

* fix script

* fix playwright install

* playwright root

* pnpm i

* fix api rul

* add env docs

* update run script

* only install deps for e2e

* use same dep

* only install deps for tests

* upd lockfile

* use official vercel integration

* use vercel cli

* remove old folder

* fix script

* rm filter

* rename e2e studio package

* fix install browsers

* add polling for vercel build

* use vercel-preview-url package

* undo actions

* rename ci env to ci

* chore:add rls check and make playwright test less flakey (#35348)

* update ci action

* fix paths

* fix browser install

* run ci against staging

* try caching builds

* fix envs

* fix env check

* fix sign in

* fix sign in url

* fix envs and url

* fix caching

* fix race condition in sign in page

* fix race condition in sign in page

* add check to see if being redirected

* fix caching, check IS_PLATFORM var

* log is_platform

* try vercel build

* fix vercel project id

* fix path

* add temp vercel.json file

* fix paths

* undo project id stuff

* rm cwd

* fix path

* fix paths again

* fix path

* fix base url

* try different fix

* fix config base url

* fix base studio url issues

* retain video on fails

* Update e2e/studio/README.md

Co-authored-by: Copple <10214025+kiwicopple@users.noreply.github.com>

* Update e2e/studio/README.md

Co-authored-by: Copple <10214025+kiwicopple@users.noreply.github.com>

* fix env file naming

* undo caching

* rm old tests folder

* fix readme scripts

* rm vercel deploy for now, just run build locally

* fix url

* fix build script

* fix is_platform

* fix stuck studio start

* fix env vars

* retain network and logs on fail for better debugging

* add apiurl env

* back to vercel

* disable catpcha

* fix test

* update environment configuration to remove default URLs for CI and streamline API base URL handling

* fix typeerr

* fix urls in home.spec

* fix urls in logs.spec

* fix urls in sqleditor spec

* fix table editor spec

* add tourl util

* use staging api in ci

* re add base url env var

* fix url in projects page

* fix url in sql editor spec

* fix sign in not waiting for cookies omfg

* fix env var name

* fix sql-editor test

* simplify table removal

* add opt out telemetry step

* fix logs tests

* fix table editor spec

* remove flaky steps from table editor tests

* use vercel deployment events instead of build

* add studio check

* fix condition

* debug event

* rm if

* trigger deploy

* undo ac

* make opt out button step optional, some envs dont hav eit

* use testid for sql run button

* use id instaed of timestamp in logs tests

* empty

* rm retries

* up glbal timeout

* chore: fix failing sql-editor playwright test (#35767)

* chore: fix failing sql-editor playwright test

* chore: minor fixes

* Chore/update playwright config (#35826)

chore: update playwright config

* rm supabase project from e2e tests

* refactor and simplify environments

* fix sql editor test

* fix ci env vars

* fix

* fix on windows

* update readme

* add playwright install script to readme

* rm turbopack trace flag

* npm to pnpm for scripts

* delete ivan lines

---------

Co-authored-by: Michael Ong <minghao_3728@hotmail.com>
Co-authored-by: Copple <10214025+kiwicopple@users.noreply.github.com>
2025-06-03 17:37:39 +02:00
Charis
df9c1bc017 ci(docs): scheduled linter (#36116)
1. Fix lint errors showing up in the scheduled linting run.
2. Found a bug with the scheduled linting run workflow: if the bot
branch already exists, we check it out and try to run lint fix on it.
But this branch is never synced with the current state of master, which
is the one we actually want to run lint fix on. Instead we should delete and recreate it from latest master if it already exists..
2025-06-02 15:30:16 +00:00
Charis
f58eead769 chore(docs): clean up environment variables (#36036)
Our environment variables are a bit of a mess, so cleaning them up:

- We have duplicate environment variables that resolve to the same thing
but just have different names, deduplicating all of these
- We have a .env.development (for publicly safe variables) and a
.env.example, we
really only need one
- Privately, we have a .env (for running scripts) and a .env.local (for
Next.js). Changing the dotenv source for scripts, so again we only need
one
2025-05-29 16:35:26 -04:00
Charis
4e547b31e8 ci(docs lint): fix workflow_run condition (#36038)
The originating workflow was changed so that lint failures fail the
workflow, so now we should be running the target workflow on failure,
not on success.
2025-05-29 15:26:02 -04:00
Charis
a0a31f00e9 ci(docs lint): fix workflow for external lints (#35968)
Workflow for external lints still not working quite right.

1. The lint workflow should fail if linting fails, to block merge. Right
now the exit status of the linter is ignored; added a step to fix that.
2. The workflow_run event is not triggered by completion of the first
workflow. Couldn't find an obvious problem with the two, but saw online
that some people had problems with a quoted workflow name, so tried
renaming the workflows to avoid having to quote the names.
2025-05-29 14:46:49 -04:00
Charis
5dc929a584 chore(docs linter): fix external prs workflow (#35785)
The external PRs workflow is still broken: commenting on the PR with the
lint results doesn't work because pull_request events triggered from
forks do not have write permissions.

Following GitHub recommendations, I broke it down into two workflows:

1. First workflow writes the lint results (if any) to an uploaded
artifact.
2. Second workflow (triggered by workflow_run and thus has write
permissions) downloads the artifact and posts the results as a PR
comment.
2025-05-27 10:10:04 -04:00
Charis
bf3bada7fd test: run supabase locally during test (#35947)
Alter the docs test script so it spins up Supabase locally. Will allow
for end-to-end tests against the local DB.

Also small alteration to one of the test files to silence an annoying
(but intended) error.
2025-05-27 10:00:21 -04:00
Etienne Stalmans
b492341ed1 chore: make MildTomato codeowner of packages (#35558)
* chore: make MildTomato codeowner of packages

* chore: make supabase/design package/ui owners
2025-05-26 13:40:03 +00:00
Charis
419ae4707f chore(docs): bump linter version (#35724) 2025-05-20 11:54:35 -04:00
Jordi Enric
6e91494b16 Add coveralls integration (#35424)
* update gh action, update vitest config

* debug

* debug cov

* idk try something different

* test2

* test3

* add base path

* rm debug

* add apiAuthenticate tests

* supabaseClient tests

* apiWrappers tests

* add apiHelpers tests

* add configcat tests

* add formatSql tests

* add github tests

* add cloudprovider utils tests

* add helpers tests

* fix typeerr

* add missing readonly err

* fix typeerrrs

* fix type errors in apiWrapper tests

* fix apiHelpers test

* add packages/ui tests

* add coveralls flags

* try coveralls parallel config

* fix coveralls parallel config

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2025-05-08 12:23:37 +02:00
Charis
c136ee4c19 ci (docs): fix docs lint action on forks (#35277)
Before:

The docs lint action doesn't run properly on forks because it tries to
use the branch name to identify the PR for updating, but the branch name is adapted on forks, so it is not `branch-name`, but `forking-account:branch-name`.

After:

Use the PR number instead to identify the PR instead.
2025-04-25 12:02:27 -04:00
Charis
68832f2c00 ci (docs): prevent concurrent search update processes (#35127) 2025-04-21 08:39:37 -04:00
Han Qiao
56f0bb58c5 chore: update docker tag for dependabot (#35037) 2025-04-15 22:28:23 +08:00
Han Qiao
5d8d1f92be fix: format build version for dependabot (#34933) 2025-04-11 18:48:12 +08:00
Stephen Morgan
431be5682b fix: review actions (#34648)
* fix: possible command injection in docs-lint

* fix: explicit permissions for github actions
2025-04-02 16:41:14 +13:00
Kevin Grüneberg
c1330d35c0 ci: fix autofix (#34332) 2025-03-22 15:51:01 +01:00
Andrew Valleteau
eb7efdef7f chore(studio): move Query to pgMeta add tests (#34232)
* chore(studio): move Query to pgMeta add tests

- Move the Query builder from studio to pgMeta
- Add e2e tests over the generated sql to ensure syntax and runtime
  result over pg database
- fix bug with orde by for table with undefined column

* chore: fix query import path

* chore: set ES target for lint

* chore: add github action for pg-meta test package

* chore: add tsconfig to sparse checkout
2025-03-20 19:04:58 +00:00
Charis
2709fa4a3e feat: pre-compile-time partials (#34028)
Partials are currently defined via MDX includes. This PR switches to pre-compile-time partials, which have a new syntax:

```
<$Partial path="path/to/file.mdx" />
```

## Rationale

This produces two improvements:

1. Partial substitution can occur in pipelines that don't use MDX compilation. For example, we can now do partial substitution before building the search index, so partial content will also be indexed.
2. After the App Router migration, the MDXProviders should've been deprecated, but were kept around for the sole reason of making partials work, and leading to us shipping unnecessary client-side code. We get a minor decrease in overall client bundle size (5.74 MB to 5.6 MB) by getting rid of the Providers.

## Breaking changes

Besides the change to partial syntax, the arguments are also less powerful than before because we are doing string substitution and don't have the full power of JS. Defining string variables is still possible (documented in the Contributing guide), and since that's all we actually do in practice, this shouldn't be too cumbersome. There is always the escape hatch of making a custom component for more complex content reuse cases.
2025-03-18 10:37:39 -04:00
Pamela Chia
2e60c6c9a0 fix: codeowners for telemetry based on team (#34242) 2025-03-17 19:33:14 +01:00
Charis
77b4856ba9 ci(docs): improve linting of external PRs (#34104) 2025-03-11 12:57:49 +01:00
Charis
9080f8e32a ci: docs lint prevent prs hanging (#33819)
Conditional and required checks don't mix well on GitHub -- if a required check is skipped it still hangs, preventing PRs from getting merged indefinitely. Instead, we need to to run the action on every PR, but bail early if no docs content changes were made.

Since the logic for when/how this action runs is getting a bit convoluted, I also split up the tests against master (run against all files, no conditional checks) from the tests aginst PRs (run against changed files, with conditional checks)
2025-02-24 19:40:25 +00:00