Wolfgang Walther and Wolfgang Walther
b566481477
nix(refactor): Move shell scripts to subdirectory nix/tools
2021-04-18 13:51:39 +02:00
Wolfgang Walther and Wolfgang Walther
fe497fc438
nix(refactor): Add buildToolbox to streamline module interface towards shell.nix
2021-04-18 13:51:39 +02:00
Wolfgang Walther and Wolfgang Walther
de73ced34a
nix(feat): Change memoryTests shell argument to memory
...
Avoids confusion with `memoryTest`.
2021-04-18 13:51:39 +02:00
Wolfgang Walther and Wolfgang Walther
bc879507ae
nix(fix): Make naming of tools in postgrest-release- namespace consistent
2021-04-18 13:51:39 +02:00
Wolfgang Walther and Wolfgang Walther
280b89d87c
lint: Apply shellcheck suggestions for bash scripts in test/*
2021-04-18 13:51:39 +02:00
Wolfgang Walther and Wolfgang Walther
eee5d5d482
nix(feat): Add shellcheck to postgrest-lint for bash scripts in test/*
2021-04-18 13:51:39 +02:00
Wolfgang Walther and Wolfgang Walther
2e73886adc
nix(refactor): Split memoryTest from tests.nix into memory.nix
2021-04-18 13:51:39 +02:00
Wolfgang Walther and Wolfgang Walther
e199337a53
nix(feat): Check required environment variables in postgrest-release tools
2021-04-18 13:51:39 +02:00
Wolfgang Walther and Wolfgang Walther
2417cfb02f
nix(feat): Force optional arguments to go before positional arguments in argbash scripts
...
This improves passing subcommands to postgrest-with- tools.
2021-04-18 13:51:39 +02:00
Wolfgang Walther and Wolfgang Walther
2559d32912
nix(feat): Add argbash bash completion support
2021-04-18 13:51:39 +02:00
Wolfgang Walther and Wolfgang Walther
c2df7d8198
nix(fix): Avoid losing exit trap through subcommand in postgrest-with-all
2021-04-18 13:51:39 +02:00
Wolfgang Walther and Wolfgang Walther
c8edfac39e
nix(feat): Add argbash support to checked-shell-script
...
Each postgrest- script now has a -h/--help option showing the
checked-shell-script.docs argument.
Additional CLI arguments can be defined through the
checked-shell-script.args argument using the argbash template syntax:
https://argbash.readthedocs.io/en/stable/guide.html
2021-04-18 13:51:39 +02:00
Wolfgang Walther and Wolfgang Walther
39d4646a4c
nix(refactor): Add withEnv to checked-shell-script
2021-04-18 13:51:39 +02:00
Wolfgang Walther and Wolfgang Walther
40b1dccc54
nix(fix): Load withTmpDb into nix to have shellcheck run on it
2021-04-18 13:51:39 +02:00
Wolfgang Walther and Wolfgang Walther
32bac81d91
nix(refactor): Move withPostgresqlVersions and withAllVersions to new withTools
2021-04-18 13:51:39 +02:00
Wolfgang Walther and Wolfgang Walther
dccce946e3
nix(refactor): Move name arguments into scripts and use global postgresql in tests.nix
2021-04-18 13:51:39 +02:00
Remo Rechkemmer and GitHub
915d568257
ci: Use cachix authtoken in CI ( #1821 )
2021-04-17 16:25:28 +02:00
Steve Chavez and GitHub
698bfe6e7b
refactor: make Junction non-recursive ( #1818 )
...
Also Cardinality now includes a Junction or ConstraintName
2021-04-16 13:12:58 -05:00
Wolfgang Walther and Wolfgang Walther
1f206a560b
ci: check sha512 of downloaded codecov script
2021-04-16 14:10:49 +02:00
Wolfgang Walther and Wolfgang Walther
42f8f4fdcb
ci: remove stack-test-memory
2021-04-16 14:10:49 +02:00
Wolfgang Walther and Wolfgang Walther
c67cd5e6fc
ci: reorder tests in nix-test to improve performance and give early coverage feedback
2021-04-16 14:10:49 +02:00
Wolfgang Walther and Wolfgang Walther
67e3886547
ci: split nix-build-test into nix-build nix-test and introduce circleci contexts
2021-04-16 14:10:49 +02:00
laurenceisla and GitHub
4b46c4eff3
feat: Add explicit headers-only POST request using Prefer header
...
Allows using header "Prefer=headers-only" explicitly to get a response with only a Location header.
BREAKING CHANGE: Change default for POST request from headers-only to minimal
Resolves #1656
2021-04-14 00:14:12 +02:00
Wolfgang Walther and Wolfgang Walther
cd09cc6c52
ci: fix cirrus build timeout
2021-04-14 00:13:08 +02:00
Remo Rechkemmer and GitHub
c2c7bbe9dd
refactor: remove obsoleted Private module ( #1811 )
2021-04-12 20:47:22 +02:00
Wolfgang Walther and Wolfgang Walther
d40d704043
remove unused static assets
2021-04-12 20:31:32 +02:00
Wolfgang Walther and Wolfgang Walther
91d0c732f0
add comment to Setup.hs
2021-04-12 20:31:32 +02:00
Remo Rechkemmer and GitHub
801e229c59
refactor: Carve CLI and Version modules out of Config ( #1806 )
2021-04-12 19:17:47 +02:00
Wolfgang Walther and Wolfgang Walther
67ca814d0b
nix: properly throw away tix files for postgrest-watch, resolves #1807
2021-04-12 19:03:16 +02:00
Wolfgang Walther and Wolfgang Walther
fc791a6320
nix: add withTmpDir to checked-shell-script
2021-04-12 19:03:16 +02:00
579a626de2
nix: move withtmpdb to separate file
...
Co-authored-by: Remo Rechkemmer <59358383+monacoremo@users.noreply.github.com >
2021-04-12 19:03:16 +02:00
Remo Rechkemmer and GitHub
f99fd6cbad
refactor: Split up Types.hs and logically organize modules ( #1793 )
2021-04-11 18:28:01 +02:00
Remo Rechkemmer and GitHub
8c44410ce0
remove misleadingly named emptyOnFalse and similar ( #1803 )
2021-04-11 10:38:35 +02:00
Wolfgang Walther and Wolfgang Walther
9118a4a780
fix random codecov/project drops in CI, resolves #1800
...
Those are caused by running the spec tests with `-threaded`, which results in a race to write to spec.tix.
2021-04-10 20:38:51 +02:00
Wolfgang Walther and GitHub
a5372e4713
nix: show better error messages for missing arguments in hsie scripts ( #1798 )
2021-04-09 18:48:00 +02:00
Jérémy Pagé and GitHub
67f555d24e
nix: Fix incorrect use of bash variable ( #1797 )
2021-04-08 14:33:18 +02:00
7f11c1a991
fix: Void functions return null instead of empty body ( #1795 )
...
* Change empty body reponse to null for scalar functions returning void or null values
* Add test for functions returning an integer with null value
Co-authored-by: Laurence Isla <lau.isla.c@gmail.com >
2021-04-08 01:45:13 +02:00
steve-chavez
9c79a4174c
Add Contributor Covenant Code of Conduct v2
2021-04-06 22:22:13 -05:00
Wolfgang Walther and Wolfgang Walther
376beac22f
update contributing guidelines
2021-04-06 17:07:14 +02:00
Remo Rechkemmer and GitHub
65e7f9e846
nix: Add a tool for checking Haskell imports and exports ( #1768 )
2021-04-06 11:46:12 +02:00
Boris Korzun and Steve Chavez
9f074cecce
cirrusci: update FreeBSD pkg
2021-03-26 10:13:38 -05:00
steve-chavez
71f6061d30
Add Supabase as a sponsor
2021-03-25 20:42:43 -05:00
Robert Vollmert and Steve Chavez
3a466aea9a
tests: don't match JSON bodies literally
...
The change of hash function with hashable-1.3.1.0 changes object
ordering in JSON output, causing some test failures:
https://app.circleci.com/pipelines/github/PostgREST/postgrest/805/workflows/067844c9-9ce4-49e8-8790-315625ab309b/jobs/8309
e.g.:
> expected: "[{\"b\":\"baz\",\"a\":\"bar\"}]"
> but got: "[{\"a\":\"bar\",\"b\":\"baz\"}]"
This changes the tests to not compare against the body literally,
and instead use the ResponseMatcher instance from Test.Hspec.Wai.JSON.
2021-03-14 12:45:02 -05:00
Robert Vollmert and Steve Chavez
5baec4819f
circleci: update base image
...
Switches to the non-legacy cimg/base: https://circleci.com/developer/images/image/cimg/base
In particular, this updates the gcc version to fix the build of
cryptonite-0.27: https://github.com/haskell-crypto/cryptonite/issues/326
2021-03-14 12:45:02 -05:00
steve-chavez
d3a8b5f6e1
Change db-load-guc-config to db-config
...
Make clear that in-db config is being read
2021-03-05 19:03:15 -05:00
steve-chavez
498e77215a
Reread in-db config when recoverying connection
...
* Separate reading files from whole config re-read
* Only reload external file on SIGUSR2/NOTIFY
2021-03-05 19:03:15 -05:00
steve-chavez
6750a5c44d
Restrict db settings to current db and global
...
Global settings are overriden by database specific settings if they
share common ones.
2021-03-05 19:03:15 -05:00
steve-chavez
e4516ab606
Correct db settings to use "_" instead of "-"
...
GUC settings with dashes cannot be shown with show or current_setting.
https://www.postgresql.org/message-id/flat/20210209144059.GA21360%40depesz.com
2021-03-05 19:03:15 -05:00
Robert Vollmert and Steve Chavez
c3ccaf1a08
Allow lens-5.0
2021-02-28 13:02:37 -05:00
Robert Vollmert and Steve Chavez
a7dab6d95a
cirrusci: update to FreeBSD 12.2
...
This fixes CI failure because FreeBSD 12.1 became EOL in Jan 2021
(3 months after release of 12.2): https://www.freebsd.org/security/#sup
2021-02-27 13:26:02 -05:00