Commit Graph
399 Commits
Author SHA1 Message Date
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
Wolfgang WaltherandWolfgang Walther b435f1b2d4 nix: Move docs build and serve scripts into nix
This is long overdue. We expect everyone contributing to postgrest to use the nix tools,
so it makes no sense to carry around external tools anymore.
2024-02-18 13:10:00 +01:00
Laurence IslaandWolfgang Walther a1f2ecadda nix: Move docs tools into core infrastructure 2024-02-18 13:10:00 +01:00
Wolfgang WaltherandWolfgang Walther e110fdbd2c nix: Refactor checkedShellScript's inRootDir to workingDir
This allows more flexible control over the working directory. Values for workingDir must always start
with a / and will then be relative to the repo root.
2024-02-18 13:10:00 +01:00
Wolfgang Walther 75a86ba873 ci: Change names for release branches from rel-MAJOR.MINOR to vMAJOR
This naming scheme gives us the best support for readthedocs.

References #2814
2024-02-17 17:43:03 +01:00
Wolfgang Walther b22bb748f2 nix: Remove left-over commented out code in postgrest-test-doctests
This seems to be commented out for a while already, but nobody reported
problems, so far.
2024-02-11 11:38:53 +01:00
Wolfgang WaltherandWolfgang Walther 410fa9508b nix: Make postgrest-with-postgresql-xxx postgrest-test-io work better
The upside is that postgrest-with-postgresql-xxx postgrest-test-io works as expected
now. The downside is, that postgrest-with-postgresql-xxx psql now starts without
any schema. This now needs an explicit postgrest-with-postgresql-xxx -f path/to.sql
to do anything useful.

Resolves #2864
2024-02-10 20:51:55 +01:00
Wolfgang Walther 49584728b6 nix: Remove broken docker-based nix development environment
It used to be possible to spin up a nix environment via docker container this way,
but the upstream nixos/nix image has changed and the docker build doesn't succeed
anymore. Since nobody complained about that, we can assume it is not being used
anyway.
2024-02-06 18:27:20 +01:00
Wolfgang Walther 74d8ddec36 nix: Make postgrest-push-cachix more efficient by passing each derivation only once 2024-02-06 10:20:02 +01:00
Wolfgang WaltherandWolfgang Walther ea02729ebd nix: Use -split-sections with pkgsStatic to make static executable smaller again
This works around https://github.com/NixOS/nixpkgs/issues/286285 to use -split-sections
in a cross-compiling scenario. This will reduce the size of the static executable and also
remove the remaining references to /nix/store/.. reducing closure size dramatically.

This also fixes the docker image blowing up in size since we switched to pkgsStatic.
2024-02-06 10:19:31 +01:00
Wolfgang WaltherandWolfgang Walther cc9b725005 nix: Remove libkrb5 references from static executable 2024-02-06 10:19:31 +01:00
Wolfgang WaltherandWolfgang Walther 4a1b9a4609 nix: Remove libpq reference from static executable 2024-02-06 10:19:31 +01:00
Wolfgang WaltherandWolfgang Walther f51090f3d1 nix: Check static executable for /nix/store references
This makes the static build fail in case any references to the nix store
are left over. Those will increase the closure size of the nix derivation
massively and lead to a huge docker image.

At the same time, those references will not be functional on non-nix systems,
to which the static executable is distributed, anyway.
2024-02-06 10:19:31 +01:00
Wolfgang Walther 63ff6d1f15 nix: Fix postgrest-loadtest after vegeta update
The recent nixpkgs update gave us a new version of vegeta. This version includes a new
DNS cache features - which unfortunately doesn't play well with unix sockets. Disabling
the DNS cache makes requests succeed again.
2024-02-05 21:38:23 +01:00
Wolfgang WaltherandWolfgang Walther c43696c9a6 nix: Move postgrest-check-static inside derivation of static package
This will make the static build fail if we're not producing a static binary.
2024-01-26 23:24:12 +01:00
Wolfgang WaltherandWolfgang Walther c94aa9ccd9 fix: Build static postgrest with GSSAPI support
Resolves #2815
2024-01-26 17:17:05 +01:00
Wolfgang WaltherandWolfgang Walther dcb6c5bb13 nix: Bump libpq version to link against v16 2024-01-26 17:17:05 +01:00
Wolfgang WaltherandWolfgang Walther 85fbb233a7 nix: Build only libpq instead of full postgresql package 2024-01-26 17:17:05 +01:00
Wolfgang WaltherandWolfgang Walther 259d97acee nix: Build static postgrest executable via pkgsStatic
This replaces the build via static-haskell-nix and will hopefully make
it possible to cross compile in the future.
2024-01-26 17:17:05 +01:00
Wolfgang WaltherandWolfgang Walther 2e298824d6 deps: Replace postgresql-libpq fork with upstream v0.10
Our changes to reduce memory usage have been merged and released
upstream, so no need for the fork anymore.
2024-01-25 21:27:17 +01:00
Steve ChavezandGitHub 7a387c7a30 nix: add parallel-curl wrapper (#3172)
stock curl doesn't make it easy to make many parallel requests to a
single endpoint. The endpoint has to be repeated N times.

```
curl --parallel https://example.com https://example.com ..
```

This provides a wrapper for parallel curl. It's useful for testing
scenarios like pool timeouts.

```
parallel-curl N https://example.com
```
2024-01-18 20:03:01 -05:00
Wolfgang WaltherandWolfgang Walther 6682baebd2 nix: Update nixpkgs and build with GHC 9.4.8 2024-01-18 18:54:33 +01:00
Wolfgang WaltherandWolfgang Walther e4c60889ee nix: Make postgrest-nixpkgs-upgrade take the latest stable version
Previously this command upgraded to the latest unstable version of nixpkgs,
but this was often broken. Taking the latest stable branch should give
better results.
2024-01-18 18:54:33 +01:00
Laurence IslaandGitHub f5fca59b2e chore: update sponsor logo (#3161) 2024-01-15 20:09:42 -05:00
Laurence IslaandGitHub 4a1dee453b chore: add new sponsor 2023-12-18 12:14:01 -05:00
Laurence IslaandSteve Chavez e31363a325 chore: add new sponsor 2023-12-12 10:38:09 -05:00
Taimoor ZaeemandGitHub 3c1a7f2641 feat: add timezone in Prefer header (#3024)
* increase reloading timeout in io-tests
* increase memory test by 1M
2023-11-13 14:16:27 -05:00
omahsandGitHub f10d4139fe nix: fix typos in README 2023-11-08 11:43:42 -05:00
Laurence IslaandSteve Chavez 99b705d44f chore: remove former sponsors 2023-11-07 16:25:47 -05:00
Laurence IslaandGitHub 379d9d6298 chore: add Neon as sponsor 2023-11-06 20:02:58 -05:00
Wolfgang Walther 6920a88dc0 nix: Fix postgrest-release on rel-branches pushing to the right branch 2023-10-25 19:09:21 +02:00
Wolfgang Walther 98bd1de1cd nix: Allow running postgrest-release on rel- branches 2023-10-25 16:29:03 +02:00
steve-chavez a9d6c318fd nix: instructions for static binary 2023-10-06 19:54:05 -03:00
Laurence IslaandSteve Chavez 90e3a5e29f Add test option for PostgreSQL 16 2023-09-21 15:38:46 -03:00
Andrei DziahelandSteve Chavez fca039a54d nix:postgrest-loadtest-against multiple branches
Improve postgrest-loadtest-against script to accept multiple refs
to perform loadtests against *all* of them
2023-09-21 14:08:53 -03:00
Laurence IslaandGitHub 2888f351d1 Remove former sponsor 2023-09-12 22:41:39 -05:00