Commit Graph
195 Commits
Author SHA1 Message Date
Charis ba132968cd ci(docs): fix linter v2 pipeline (#30930)
The linter was failing whenever grep turned up empty because pipefail was on, now ignoring grep error so it'll stop erroring on all irrelevant PRs 😵
2024-12-05 15:48:19 +00:00
Charis 4cecae1e09 ci(docs): linter bump version + expand scope (#30860) 2024-12-04 20:37:49 +00:00
Charis 572111224b ci(docs): bump linter + expand linting to auth section (#30704) 2024-11-28 10:26:00 -05:00
419eba99a1 fix(self-hosted): self hosted docker compose (#30674)
* fix(self-host): ensure migrations connect back to postgres database

* fix(self-host): use supabase_admin user for supavisor pooler

* fix(self-host): services healthchecks

* fix(self-host): vector config path

* feat(ci): add smoke test for self-hosted stack

---------

Co-authored-by: Shawal Mbalire <mbalireshawal@gmail.com>
Co-authored-by: Robson Martins <robson@controle.digital>
2024-11-28 11:37:08 +00:00
Charis 78d0755008 docs(ci): expand linter scope (#30678)
Expand linter scope to cover `ai` directory as well.
2024-11-26 14:28:40 -05:00
Charisandgithub-actions[bot] d9a1a615f5 ci: linter v2 (#30480)
PR to start introducing Linter V2!

Primary improvements from this linter:

Better parsing of MDX (fewer false positives)
More flexibility
And suggested autofixes! (see auto-generated PR comment below for how that works)
Turning this on for only a small portion of the repo at first to avoid an avalanche of alerts, will slowly expand from there.

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-11-22 15:22:05 -05:00
Charis fe50beb8a5 ci(docs): lint only changed files (#30589) 2024-11-21 17:00:20 -05:00
Han Qiao 1440bf04dc chore: update auth url config for preview (#30544) 2024-11-19 22:41:24 +08:00
Etienne Stalmans 37a9a58880 chore: add security as codeowners (#30432)
Security need to review pages that contain payment processor content, as
per PCI-DSS.
2024-11-14 14:52:26 +01:00
Charisandgithub-tidy-bot 3f08a033d9 fix: autofix action (#30421)
Autofix action is failing with error message:

```
fatal: You are not currently on a branch.
To push the history leading to the current (detached HEAD)
state now, use

    git push origin HEAD:<name-of-remote-branch>
```

This is because the checkout action on a PR by default checks out the merge commit, which is not a branch. Instead, check out [`github.head_ref`](https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/accessing-contextual-information-about-workflow-runs#github-context), which will point to the source of the PR.

---------

Co-authored-by: github-tidy-bot <github-tidy-bot@supabase.com>
2024-11-11 16:18:42 -05:00
Charis 4a82aabaf0 feat(docs): sync troubleshooting (#29933)
When a troubleshooting entry is created or updated in this repo, sync it to GitHub. This creates a new troubleshooting discussion if one does not exist, and updates the content on an existing troubleshooting discussion if it has changed.

To preserve the connections between GitHub discussions and Markdown files, record the discussion ID and URL to the database. The database ID is then written to the Markdown file, and a new PR is generated to commit the new Markdown with ID.

There is currently no mechanism to delete outdated discussions. That will be a follow-up.
2024-10-29 12:58:46 -04:00
Charis c2fe11850d feat: embed code samples from github (#29519)
Add the ability to embed code samples from GitHub into tutorials, so we can have a single source of truth for the source code.

Introduces the <$CodeSample /> syntax, which is a special syntax and not a real React component (see the directives/README.md for why on earth I did it this way -- in this specific case, CodeHike adjusts the MDX syntax tree before it gets compiled, and we need to adjust it ourselves before CodeHike sees it, so we need to get down to the level of manipulating the AST in order to make this work with CodeHike).

Adjusted one of the example tutorials to use this new feature as a test.
2024-09-26 15:54:57 -04:00
Charis 182440c9ae chore: remove www redirects from codeownership (#28634)
As discussed on Slack, this unblocks docs PRs, which can be approved by
anyone on the Supabase team.
2024-08-14 10:11:08 -04:00
Charis fc164b5d07 Refactor/app router refs (#28095)
Migrates client SDK References to App Router. (Management and CLI API references aren't migrated yet, nor are self-hosting config references.)

Some notes:

Big changes to the way crawler pages are built and individual section URLs (e.g., javascript/select) are served. All of these used to be SSG-generated pages, but the number of heavy pages was just too much to handle -- slow as molasses and my laptop sounded like it was taking off, and CI sometimes refuses to build it all at all.

Tried various tricks with caching and pre-generating data but no dice.

So I changed to only building one copy of each SDK+version page, then serving the sub-URLs through a response rewrite. That's for the actual user-visible pages.

For the bot pages, each sub-URL needs to be its own page, but prebuilding it doesn't work, and rendering on demand from React components is too slow (looking for super-fast response here for SEO). Instead I changed to using an API route that serves very minimal, hand-crafted HTML. It looks ugly, but it's purely for the search bots.

You can test what bots see by running curl --user-agent "Mozilla/5.0 (iPhone; CPU iPhone OS 6_0 like Mac OS X) AppleWebKit/536.26 (KHTML, like Gecko) Version/6.0 Mobile/10A5376e Safari/8536.25 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)" <URL_OF_PAGE>

Also added some smoke tests to run against prod for the crawler routes, since we don't keep an eye on those regularly, and Vercel config changes could surprise-break them. Tested the meta images on Open Graph and all seems to work fine.

With this approach, full production builds are really fast: ~5 minutes

Starts using the new type spec handling, which is better at finding params automatically, so I could remove some of the manually written ones from the spec files.
2024-08-13 16:12:59 -04:00
Inian 1b4682ed4f Update CODEOWNERS (#28602) 2024-08-13 13:58:39 +00:00
Kevin Grüneberg 4c0278f95b chore: simplify autofix (#28408) 2024-08-06 04:36:05 +00:00
Kevin Grüneberg 2f7331a80d chore: simplify autofix (#28407) 2024-08-06 12:25:21 +08:00
Charis 0772a88e0f ci: remove migration push from search action (#28327)
We don't need this for migration pushes since the Supabase integration will do
it instead. Removing it makes this action less brittle since embedding updates
get blocked on CLI problems.
2024-08-02 13:58:30 -04:00
Kevin Grüneberg 4496c5a9ab chore: only lint in CI, not on Vercel (#28136) 2024-07-23 16:28:52 +08:00
Thor 雷神 Schaeff 5a56fcc60e Update marketing as blog CODEOWNERS (#27853)
* Update CODEOWNERS

* Update .github/CODEOWNERS
2024-07-08 16:26:55 +08:00
Chris Gwilliams 8c14611348 Fix for labelling issues and handling errors (#27393)
* fix for labelling issues and handling errors

* fix typos
2024-06-24 11:35:03 +01:00
Ivan Vasilov 22b76fecaf feat: When publishing a studio image, change the latest tag in DockerHub to the latest images (#27378)
Add command to change the latest tag in DockerHub to the latest images.
2024-06-19 11:45:10 +00:00
Ivan Vasilov 0676e916c7 fix: Put a latest tag on DockerHub when publishing a new image (#27350)
* Don't create a new image whenever a new tag is published on supabase/supabase.

* No need for an input when triggering a new build.

* Enable the latest tag for all pushes.
2024-06-18 13:38:17 +02:00
Chris Gwilliams e2271707cc Feat: Add stale Action for marking stale issues and Action to auto label new issues with source (#27033)
* add stale bot for marking stalue issues and action to auto label an
issues source

* Update auto-label-issues.yml
2024-06-17 06:53:51 +00:00
Charis 74dce1358b ci: auto-run last-checked once daily (#27212) 2024-06-12 11:30:33 -04:00
Ivan Vasilov 5847ad54cf fix: Test the playwright tests in Github actions (#26799)
* Add an API page for run-lints endpoint.

* Fix the playwright test.

* Make the check mandatory in the github action.

* Fix a console.log.

* Use a more stable way of waiting for buttons before clicking them.

* Add helper method for dismissing toasts.

* Wait for the other toast.

* Try and fix the flakiness of the toasts.

* Minor fix.

* Upload artifacts at the end of the github action run.

* Fix yaml stuff.

* Use the newer action for uploading. Shorten the retention period to 7 days.

* Add waitForResponse for the entity types API call.

* snapshot.

* Wait for the page to be loaded.

* Make the timeout bigger when waiting for response.

* Try to fix the timeouts.

* Minor restructuring of the test.

* Add another test and few minor todo tests.

* Fix the table names.

* Don't render hcaptcha in test mode.

* Expand the test to include sorting and filtering.

* Add a test for checking if the other schemas are can be listed.

* Make the sort popover button more stable.

* Fix a unused forward ref in the NavMenuItem component.

* Don't render the Toaster container when in test mode.

* Simplify starting the dev server when testing.

* Fix all inputs to have proper test ids.

* Fix the command for testing.
2024-06-07 17:44:28 +02:00
Charis 308b3e06b9 fix(last changed): timestamps from gh actions (#27075)
Need a fetch-depth 0 in order to preserve commit dates within GitHub
Actions, otherwise a shallow fetch will use the current date as the
commit date, which renders this entire flow useless.
2024-06-06 18:13:39 -04:00
Charis c281dd0eb1 ci(docs): update last_changed table action (#27038)
Keeps track of fine-grained (per section) edit times for docs content.

Once daily, a GitHub Action runs that:

- Checks whether content hashes have changed for each section
- Updates the table that tracks content edit times if the hashes have changed

Note: The cron job isn't scheduled yet. I'll run the Action manually a few times to validate it, then turn it on in another PR.
2024-06-06 15:20:05 -04:00
Charis 4fbcd61e95 feat: new command menu pt 1 (#23699)
Introduces the first (very small) slice of the new command menu as a `ui-pattern`.

This slice just handles state for available commands. It isn't hooked up to anything yet.
2024-06-04 14:32:13 -04:00
Hieu f5af2e6193 fix: mgmt api docs gha (#26985)
* fix: use sparse-checkout

* fix: always run on master
2024-06-04 14:31:38 +07:00
HieuandJoshen Lim aa9d5fe5e1 fix: remove invalid command (#26957)
Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2024-06-04 13:45:18 +07:00
Ivan Vasilov 4a43f3b854 Fix: Try to fix the prettier github action (#26970)
* Try to fix the prettier github action.

* Revert "Try to fix the prettier github action."

This reverts commit 3a3fbe51e1.

* Fix the prettier dependency in package-lock.json.

* Run prettier format over the whole repo.

* Revert "Fix the prettier dependency in package-lock.json."

This reverts commit 8c6b241907.

* Revert the prettier format changes.

* Add a command for checking prettier. Use it in the github action. Use npm ci in the github action.

* Fix another accidental formatting.
2024-06-03 12:32:57 +00:00
Hieu 40412091b4 fix: install dependencies command (#26902) 2024-05-31 09:53:54 +07:00
Hieu d855bfb3f8 feat: automate mgmt api spec update (#26655)
* fix: correct mgmt api naming

* feat: new command to generate mgmt api sections

* feat: sort section items

* chore: tidy up

* fix: add generate sections to the default command

* feat: add gha to auto update mgmt api docs

* chore: tidy up

* fix: operationId logic to support self-hosting references

* chore: update latest mgmt api specs

* chore: update latest mgmt api specs
2024-05-31 08:53:19 +07:00
Han Qiao 9360b94398 feat: version control branch configs with terraform (#23299) 2024-05-07 11:30:26 +08:00
Terry Sutton a5d00f9923 Chore/rename open ai key name (#21856)
* Rename OPENAI_KEY to OPENAI_API_KEY

* Force a redeploy
2024-04-25 09:38:56 -02:30
Kevin Grüneberg 27f9f96ff7 chore: upgrade to node 20 (#22240) 2024-03-26 18:54:22 +07:00
Alaister Young 3750ad3f69 feat: CONTRIBUTING.md (#22107)
* feat: CONTRIBUTING.md

* add full stop
2024-03-19 09:27:47 +00:00
Charis c1bde9a1a7 chore: temporarily remove fail-on-error for vale (#21618) 2024-02-28 09:39:58 +08:00
Ivan Vasilov 1afb029da0 fix: Make the playwright tests always succeed (#21591)
* Make the playwright tests always succeed.

* Push a change to trigger the tests.

* Try moving the continue-on-error on the failed step.
2024-02-27 17:13:07 +08:00
Inian a13d1deb97 Update CODEOWNERS (#21562)
anyone maintainer should be able to approve blog updates
2024-02-26 23:55:47 +08:00
Charis 06c6f27a80 ci: add docs linting (#21462)
Add a prose linter that runs on docs content changes and a basic config. Linter only lints changed lines, and it will fail on error. For now, this is not a mandatory check because we expect a lot of false positives while we tweak the linter to suit our conventions.
2024-02-23 12:10:16 -05:00
Ivan Vasilov 66ae36e005 feat: Playwright tests (#21083)
* initial commit for testing the github action.

* Improvements to the Github action.

* Add docker caching.

* Fix an issue in the github action.

* Another fix for the action.

* Just delete the db after the tests.

* Add a supabase app to the playwright-tests.

* Delete .env.testing.

* Remove the docker image caching from the Playwright github action.

* Add a README.md.

* Add an example test for the table editor.

* Ignore the generated keys.json.

* Add commands for running and writing tests.

* Remove Auth tests.

* Only show the react-query tool when not in test mode.

* Add data-testids to the buttons and use them in the test.

* Handle a case where SUPABASE_URL isn't defined.

* Fix the button test id.

* Remove some dependency.

* Try setting a timeout for an action.

* Add timeout to another action.

* Add some timeouts before the save button.

* Add some timeout before clicking save.

* Enable the video recording only during local testing.

* Minor fixes.

* Expand the README.
2024-02-19 12:12:54 +01:00
Charis 42723d8232 refactor: move ai, realtime, functions, remaining auth docs to content directory (#21259) 2024-02-14 17:39:05 +00:00
Kevin Grüneberg f7e60bf324 chore: upgrade prettier/eslint + autofix (#20785) 2024-01-30 10:54:02 +08:00
CharisandGreg Richardson d6234f823a fix: include integrations in our search indexes (#20709)
Co-authored-by: Greg Richardson <greg.nmr@gmail.com>
2024-01-26 15:20:54 -05:00
Kevin Grüneberg 129b3d927a chore: move specs to docs folder (#20136) 2024-01-03 18:54:23 +01:00
Greg Richardson 1a244b79a5 Automated AI tests via GitHub Actions (#19880)
* ci: ai tests

* chore(ai-commands): update readme

* fix: dont load .env.local in ci environment

* fix: pass openai env variable into ci job

* feat(ai): llm evaluated tests

* chore(ai): remove unused jest snapshots
2023-12-20 09:34:30 -07:00
Inian b4fac0e449 Update CODEOWNERS (#19247) 2023-11-27 16:54:43 +08:00
Charis 21ebccc640 fix: add reference docs back to search index (#19054)
Reference docs weren't being indexed properly because the specs weren't
getting checked out at build time.
2023-11-17 16:04:24 -05:00