Commit Graph
284 Commits
Author SHA1 Message Date
Diogo BiazusandWolfgang Walther c026d0752f fix: Fix regression for schema cache reloading via NOTIFY on Windows
Upstream accidentally removed the fix, which was introduced for #2524. Fixed again.

(cherry picked from commit b285f5fba6)
2025-02-03 18:35:24 +01:00
Wolfgang WaltherandWolfgang Walther 3379ee3483 chore(deps): Update nixpkgs to unstable 2024-05-29
This makes actionlint happy about the new ubuntu runners.
2024-11-06 17:35:55 +01:00
Laurence IslaandSteve Chavez 5a1e9b01e4 nix: remove texlive dependencies from postgrest-docs-render 2024-06-27 14:08:16 -05:00
Laurence IslaandSteve Chavez 572581cbb6 chore: organize diagrams in different folders 2024-06-27 14:08:16 -05:00
Laurence IslaandSteve Chavez 5b62501ce7 docs: improve architecture diagram
- SVG format instead of PNG
- The components now have links to their reference in the Docs
- Supports dark mode
2024-06-27 14:08:16 -05:00
Wolfgang Walther a2d00e305a nix: Make postgrest-release work on remotes without .git suffix 2024-06-05 21:32:41 +02:00
Wolfgang Walther 70a8a80491 Revert "fix: Build static postgrest with GSSAPI support"
This reverts commit c94aa9ccd9.
2024-06-05 19:59:07 +02:00
Wolfgang Walther b4d235f72a nix: refactor to remove TODO
We have meanwhile received the commit in question.
2024-06-05 19:53:29 +02:00
Joel JakobssonandGitHub a46bea16e2 nix: fix slocat overlay with nix 2.22
This seems to happen on nix 2.22 only, v2.21 in CI and v2.20 locally work fine. The error is:

vendor folder is empty, please set 'vendorHash = null;' in your expression
For full logs, run 'nix-store -l /nix/store/kxnnr344n7gsxzc6kycj19hs19rvddjj-slocat-go-modules.drv'.
error: 1 dependencies of derivation '/nix/store/x9w480k36a11i99m6zp12d5cjijsn3lm-slocat.drv' failed to build

Since the slocat module doesn't actually have any dependencies, this shouldn't matter much.
2024-06-03 10:24:35 +02:00
steve-chavez 82a43c2767 nix: postgrest-gen-ctags use haskdogs 2024-05-25 15:21:44 -05:00
steve-chavez 756aad7827 fix: listener silent fail on replica
Update hasql-notifications to include the fix on
https://github.com/diogob/hasql-notifications/issues/24.

Which now reveals the following error:

```
$ postgrest-with-postgresql-16 --replica -f test/spec/fixtures/load.sql postgrest-run

17/May/2024:18:35:38 -0500: Successfully connected to PostgreSQL 16.2 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 13.2.0, 64-bit
17/May/2024:18:35:38 -0500: Could not listen for notifications on the "pgrst" channel. ERROR:  cannot execute LISTEN during recovery
17/May/2024:18:35:38 -0500: Retrying listening for notifications...
```

This is still not good because the LISTEN channel will be retried
forever without a backoff.
2024-05-18 23:33:04 -05:00
steve-chavez aa75412932 nix: PGRST_DB_URI preference for tmp db replica
When using `postgrest-with-postgresql-* --replica`, the PGRST_DB_URI
will set the replica host as preference. This to be able to run
quick manual tests with postgrest running on a replica.
2024-05-18 23:33:04 -05:00
steve-chavez 05447bae33 nix: add postgrest-gen-jwt/secret for manual tests
```
$ postgrest-gen-secret
uMd97XSQzNkA1CWhMZ7u88Pj0RNyhrpo

$ postgrest-gen-jwt postgrest_test_author
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJyb2xlIjoicG9zdGdyZXN0X3Rlc3RfYXV0aG9yIn0.Xod-F15qsGL0WhdOCr2j3DdKuTw9QJERVgoFD3vGaWA
```

Also modifies postgrest-run to include a default PGRST_JWT_SECRET for
quicker manual tests.
2024-05-13 12:37:08 -05:00
Wolfgang WaltherandWolfgang Walther d903a8a115 nix: Adjust postgrest-release to new release workflow
This changes the postgrest-release tool to work with our new workflow.
It can be run on main and the v* release branches. When on a release
branch, it will bump a patch version and push to that branch only.

When on main, it will bump a minor version by default. To bump a major
version, pass --major. This first bump will be force-pushed to the
v<major> branch. A second bump to the current development version will
then be pushed to the main branch.

The tool will not tag commits anymore - this happens in CI
automatically.

References #3113
Resolves #3082
2024-05-09 18:05:04 +02:00
Wolfgang Walther 3afa5f6a36 ci: Move docker-hub-readme.md to base folder
This is not related to nix tooling anymore, because a github action
without any nix tooling is updating this now.
2024-05-09 14:35:52 +02:00
steve-chavez f9e9740999 nix: add postgrest-ctags command
Generates ctags for Haskell and Python code.
2024-05-08 12:27:26 -05:00
Wolfgang Walther 2f98d837ff ci: Push docker hub description automatically on main branch 2024-05-04 21:55:52 +02:00
Wolfgang Walther cdcab34852 nix: Make postgrest-lint fail on dead nix code 2024-05-04 20:34:59 +02:00
Wolfgang Walther 1ca2d1f8be ci: Refactor get_cirrusci_freebsd script to GitHub action
This should make it more reliable and also easier to re-use, if we need
to.

Resolves #2555
2024-05-04 14:56:57 +02:00
steve-chavez d9a51f23ce test: sanity tests for primary and replica
* new --replica option to `postgrest-with-postgresql-*`
* new command `postgrest-test-replica`
* new sanity tests on test_replica.py
* add postgrest-test-replica to postgrest-check and postgrest-coverage
2024-04-30 18:35:40 -05:00
steve-chavez 29cd7d195c nix: add instructions for haskell-packages.nix 2024-04-23 19:08:37 -05:00
Wolfgang WaltherandWolfgang Walther 80f83f0366 nix: Update to latest nixpkgs#master 2024-04-20 17:06:29 +02:00
Wolfgang WaltherandWolfgang Walther b6a50ab8ed nix: Allow changing to a fork in nixpkgs-version.nix 2024-04-20 17:06:29 +02:00
steve-chavez 1bf0c54dd6 feat: log connection pool events on log-level=info 2024-04-15 18:31:51 -05:00
Laurence IslaandGitHub 460259548d perf: fix space leaks by downgrading fuzzyset to v0.2.4 2024-04-11 14:13:20 -05:00
Laurence Isla 4bcd6725fe chore: update sponsor logos 2024-04-10 18:37:57 -05:00
Laurence Isla 70396d3f6c docs: add dark mode
- Uses sphinx-rtd-dark-mode for sphinx-rtd-theme
- Adds dark mode logos for sponsors
2024-04-10 18:37:57 -05:00
steve-chavez ab73624366 docs: add architecture diagram 2024-04-08 11:57:03 -05:00
Wolfgang Walther 6de3ba543d nix: Use minimal set of texlive dependencies for docs-render 2024-03-31 22:05:02 +02:00
Laurence IslaandGitHub 3f162535b8 nix: add example on how to use a library locally 2024-03-26 11:39:07 -05:00
steve-chavez 4b289b1c97 test: requests wait for schema cache load
* nix: add postgrest-test-big-schema command
2024-03-15 06:18:26 -05:00
steve-chavez 4a2c851ae5 chore: update cabal/stack new hasql-notifications 2024-03-13 20:43:46 -05:00
steve-chavez 86e15dbb77 fix: upgrade hasql-notifications to show error 2024-03-13 11:14:11 -05:00
Laurence IslaandWolfgang Walther cf7b9bad08 nix: only json output for postgrest-dump-schema 2024-03-07 16:50:14 +01:00
Laurence IslaandWolfgang Walther c276e9741e nix: fix postgrest-dump-schema with optional yaml output 2024-03-07 16:50:14 +01:00
Steve ChavezandGitHub d3f15baa4a nix: add postgrest-profiled-run (#3292) 2024-02-29 16:44:10 -05:00
Wolfgang Walther a1480c758e ci: Run postgrest-test-doctests without nix-shell
Resolves #3183
2024-02-27 10:02:42 +01:00
Wolfgang Walther c7eb4036a1 nix: Export all tools on each toolbox
This allows targeting each tool separately for installs.
2024-02-26 22:06:01 +01:00
Wolfgang Walther 08901323a3 nix: Move parallelCurl to devTools
This is not a with-tool, because it doesn't wrap another command.
2024-02-26 22:06:01 +01:00
Wolfgang Walther 1db6c04a28 ci: Remove unused .github/release script 2024-02-26 22:06:01 +01:00
Wolfgang Walther 6caaee777b nix: Simplify static.nix
The enable-executable-static flag is set by default, so doesn't make a difference.

The pkg-config improvement for libpq was merged upstream, so we can use the same
here already.
2024-02-24 15:38:02 +01:00
Wolfgang Walther ccc386cf38 nix: Add deadnix to postgrest-lint and remove dead nix code 2024-02-24 13:08:04 +01:00
Wolfgang Walther caf0a70171 nix: Clarify pkg-config usage in static.nix a bit
This will make it easier to make the switch from pkgsCross.libpq to pkgsStatic.libpq,
once that is possible to build upstream - if ever.
2024-02-24 12:08:40 +01:00
Wolfgang Walther 22e8906c40 nix: Run faster tasks first in postgrest-lint
This avoid long waiting times when waiting for the result of shellcheck or actionlint.
2024-02-23 14:02:05 +01:00
Wolfgang WaltherandWolfgang Walther 1a141c19df nix: Add postgrest-docs-render to render latex documents 2024-02-21 09:40:11 +01:00
Wolfgang WaltherandWolfgang Walther 8a21a9c34e fix: Dump media handlers and timezones with --dump-schema
Those were left out of the schema dump when the features were introduced, probably
because ByteString doesn't have a toJSON instance. Changing the type to Text solves
this easily.

Resolves #3237
2024-02-20 18:44:17 +01:00
Wolfgang Walther 4a796e0758 nix: Show connection hints for postgrest-with-postgresql-xx on stdout
This allows running this together with postgrest-run --dump-schema and
piping the result into jq without syntax errors.
2024-02-19 17:49:16 +01:00
Wolfgang Walther 16bc853114 nix: Change default socket location for libpq back to /var/run/postgresql
Commit 85fbb233 accidentally changed the default socket location in which libpq is
looking for postgresql unix sockets. This is changed in nixpkgs via patch. By imp-
orting the default patches, this is changed back to what it was before. Without
those patches it was changed from /run/postgresql to /tmp.

Not a bugfix, because it was not released, yet.
2024-02-19 16:24:17 +01:00
Wolfgang Walther 272c1cc1e2 nix: Fix docs-spellcheck with multiple references on a single line 2024-02-18 19:35:40 +01:00
Wolfgang Walther c196d406d4 nix: Make postgrest-watch postgrest-docs-check work
This moves the _build folder into the repo root, to avoid postgrest-watch ending in an
infinite loop of restarting the build.

Also, for repeated use during development, running linkcheck is not a good idea, this
will quickly result in rate-limiting requests from various servers.
2024-02-18 16:12:20 +01:00