Wolfgang Walther and Steve Chavez
7cc8502a64
fix: Remove aggregates, procedures and window functions from schema cache and OpenAPI output
...
Aggregates and Window functions can't be called as RPCs in a useful way.
Procedures are not supported right now, but might be added later.
Resolves #2101
Signed-off-by: Wolfgang Walther <walther@technowledgy.de >
2022-06-03 22:19:16 -05:00
Wolfgang Walther and Steve Chavez
5a88161ff7
fix: Take PG version into account in --dump-schema
...
The PG version is only read by the Connection Worker, which is not used in the case dump-schema. Now, the pg version is read in the schema cache queries directly, avoiding this problem in all cases.
Signed-off-by: Wolfgang Walther <walther@technowledgy.de >
2022-06-03 22:19:16 -05:00
Wolfgang Walther and Steve Chavez
973c22a102
ci: Fix windows build failing because of outdated keyring
...
Signed-off-by: Wolfgang Walther <walther@technowledgy.de >
2022-06-03 22:19:16 -05:00
Wolfgang Walther and Steve Chavez
2c001010df
fix: Remove trigger functions from schema cache and OpenAPI output
...
Trigger functions can't be called directly from SQL and can't be called
via the /rpc prefix either - it makes no sense to expose them in the
OpenAPI output. And we don't need to cache them in the schema cache
either.
Best practice would be to keep the trigger functions in a non-exposed
schema anyway.
2022-06-03 22:19:16 -05:00
Wolfgang Walther and Steve Chavez
a36c5ce52d
ci: Add -with-rtsopts=-KxK option to prevent introducing space leaks
...
Resolves #387
2022-06-03 22:19:16 -05:00
Wolfgang Walther and Steve Chavez
8bfbf9eb89
Align columns in postgrest.cabal
2022-06-03 22:19:16 -05:00
Wolfgang Walther and Steve Chavez
2e334db31b
fix: Read database configuration properly when = is present in value
...
Resolves #2120
2022-06-03 22:19:16 -05:00
Wolfgang Walther and Steve Chavez
d1851a6966
refactor: Reformat db-config query
2022-06-03 22:19:16 -05:00
Wolfgang Walther and Steve Chavez
76fdf29f5c
refactor: Move each Wai Middleware to a separate file
2022-06-03 22:19:16 -05:00
Wolfgang Walther and Steve Chavez
685acccf6d
test: Reorganize test/ folder into one subdirectory for each test type
2022-06-03 22:19:16 -05:00
Wolfgang Walther and Steve Chavez
9378de558f
Remove unused dependencies from postgrest.cabal
2022-06-03 22:19:16 -05:00
Wolfgang Walther and Steve Chavez
747b0234ae
cov: Add coverage overlay for impossible case in corsPolicy
2022-06-03 22:19:16 -05:00
Wolfgang Walther and Steve Chavez
ce578ec1b8
refactor: simplify logger middleware
2022-06-03 22:19:16 -05:00
Wolfgang Walther and Steve Chavez
7272d8894c
cov: Remove unreachable static icon
2022-06-03 22:19:16 -05:00
Wolfgang Walther and Steve Chavez
de8253facc
cov: Add tests for request logging
2022-06-03 22:19:16 -05:00
Wolfgang Walther and Steve Chavez
a15118576d
test: Remove unused unix-socket.config file
...
Unix sockets are the default in io tests and we are testing ip connections explicitly.
2022-06-03 22:19:16 -05:00
Wolfgang Walther and Steve Chavez
0a44125d92
test: Improve io test perfomance
...
Local test improves performance by 15%.
2022-06-03 22:19:16 -05:00
Wolfgang Walther and Steve Chavez
9c9e25b2af
test: Move io-tests SQL fixtures to a separate file
2022-06-03 22:19:16 -05:00
Wolfgang Walther and Steve Chavez
ce6ea74ee1
test: Improve log output for failing io-tests
2022-06-03 22:19:16 -05:00
Wolfgang Walther and Steve Chavez
e8e3349a71
test: Refactor invalid_role_claim_key_notify_reload test to properly read all available input
2022-06-03 22:19:16 -05:00
Wolfgang Walther and Steve Chavez
06a9794448
test: Use .encode() end .decode default values in io-tests
...
Those default to "utf-8" anyway.
2022-06-03 22:19:16 -05:00
Wolfgang Walther and Steve Chavez
30a6ae6241
nix: Fix nested postgrest-with-postgresql-x calls when -f is used
2022-06-03 22:19:16 -05:00
Wolfgang Walther and Steve Chavez
c228c37619
Remove outdated heroku manifest
2022-06-03 22:19:16 -05:00
Wolfgang Walther and Steve Chavez
9f09a6547d
cov: Improve jwt claims test-cases
2022-06-03 22:19:16 -05:00
Wolfgang Walther and Steve Chavez
130dcc4f66
fix: Fix wrong CORS header Authentication -> Authorization
...
Also refactors defaultCorsPolicy and corsPolicy and cleans up CORS tests
2022-06-03 22:19:16 -05:00
Wolfgang Walther and Steve Chavez
7db4a75146
fix: Make recursive view parsing work with XMLTABLE + DEFAULT
2022-06-03 22:19:16 -05:00
Wolfgang Walther and Steve Chavez
9c7e6070f0
fix: Dump db-config option without quotes as it's a boolean
2022-06-03 22:19:16 -05:00
Wolfgang Walther and Steve Chavez
3c8e309a32
nix(feat): Add postgrest-git-hooks to enable pre-commit and pre-push hooks
2022-06-03 22:19:16 -05:00
Wolfgang Walther and Steve Chavez
7940e73a12
nix: Add weeder to postgrest-coverage
...
Removes a bit of dead code from SpecHelper.hs
2022-06-03 22:19:16 -05:00
Wolfgang Walther and Steve Chavez
9b397878dc
refactor: Make asJsonSingleF "safe", by accessing only the first element of a json_agg result
2022-06-03 22:19:16 -05:00
Wolfgang Walther and Steve Chavez
eda59c241e
fix: Execute deferred constraint triggers when using Prefer: tx=rollback
...
Resolves #2020
2022-06-03 22:19:16 -05:00
Wolfgang Walther and Steve Chavez
4d64aae870
fix: Link to latest docs in pre-release openapi output
...
Resolves #2018
2022-06-03 22:19:16 -05:00
Wolfgang Walther and Steve Chavez
e337891c89
ci: Use matrix strategy to test against postgres versions
2022-06-03 22:19:16 -05:00
Wolfgang Walther and Steve Chavez
d8f03e37ae
ci: Run IO tests against all postgres versions
...
Resolves #1820 .
2022-06-03 22:19:16 -05:00
Wolfgang Walther and Steve Chavez
0d99789938
ci: Disable update of dockerhub description on release
...
This is not allowed via personal access token right now and could be re-enabled in the future, once solved by docker hub.
2022-06-03 22:19:16 -05:00
Wolfgang Walther and Steve Chavez
88674c5af6
nix(feat): Add bash completion for git references
2022-06-03 22:19:16 -05:00
Wolfgang Walther and Steve Chavez
1aebe62a03
nix(feat): Add postgrest-loadtest
2022-06-03 22:19:16 -05:00
Wolfgang Walther and Steve Chavez
f7b3608d4e
nix(feat): Add postgrest-with-git and postgrest-with-pgrst tools
2022-06-03 22:19:16 -05:00
Wolfgang Walther
19c3ee2143
ci: Fix target commit for report workflow
2021-11-26 08:01:00 +01:00
4fb0d1279c
test: Add test to confirm ASSERT will return 500 Internal Server Error
...
Co-authored-by: Dmitry Wagin <dmitry.wagin@ya.ru >
2021-11-25 22:56:49 +01:00
Wolfgang Walther
81f9bf290c
ci: Fix permissions for report workflow
2021-11-24 23:01:33 +01:00
Wolfgang Walther and Wolfgang Walther
dbef11869c
ci: Add report workflow ahead of #1812
2021-11-24 21:23:57 +01:00
Wolfgang Walther and Wolfgang Walther
b38564e623
nix(refactor): Make checking for required environment variables a no-op
2021-11-24 21:23:57 +01:00
Wolfgang Walther and Wolfgang Walther
2a2a4bdeac
nix: remove unused ghr import
2021-11-24 21:23:57 +01:00
Wolfgang Walther and Wolfgang Walther
a65ac9b0f6
feat: drop support for pg 9.5
2021-11-24 19:42:53 +01:00
Wolfgang Walther and Wolfgang Walther
7ed8b10776
test: Remove conditional for pgVersion95 in JsonOperatorSpec
...
pgVersion95 is the minimum already.
2021-11-24 19:42:53 +01:00
Wolfgang Walther and Wolfgang Walther
c3854e7c74
ci: Add dependabot config for auto updates of github actions
2021-11-24 18:41:32 +01:00
Wolfgang Walther and Remo
b7dcc63e37
nix: Simplify with_tmp_db
2021-11-24 18:06:56 +01:00
Wolfgang Walther and Wolfgang Walther
1981160536
ci: Use include in stack build matrix
2021-11-21 21:53:24 +01:00
Wolfgang Walther and Wolfgang Walther
f3eb8a317d
ci: Disable fail-fast in stack matrix to keep other builds alive on failure
2021-11-21 21:53:24 +01:00
Wolfgang Walther and Wolfgang Walther
7aedebecee
ci: Visually separate jobs in workflow file
2021-11-21 18:40:42 +01:00
Wolfgang Walther and Wolfgang Walther
d5afdc7c53
ci: Use matrix strategy to build with stack
2021-11-21 18:40:42 +01:00
Wolfgang Walther and Wolfgang Walther
b7c261f520
ci: Update actions
2021-11-21 18:40:42 +01:00
Wolfgang Walther and Wolfgang Walther
942391c508
ci: Add .github scripts to shellcheck
2021-11-21 18:40:42 +01:00
Wolfgang Walther and Wolfgang Walther
f333305491
ci: Add setup-nix action to reuse nix-related code
2021-11-21 18:40:42 +01:00
Wolfgang Walther and Wolfgang Walther
88283801cb
ci: Limit release job permissions to minimum required
2021-11-21 18:40:42 +01:00
Wolfgang Walther and Remo
041f73cae8
nix(feat): Add actionlint to postgrest-lint
2021-11-17 18:58:34 +01:00
Wolfgang Walther and Wolfgang Walther
a1b3bca7fc
fix: Make pfkSourceColumns query work with standard_conforming_strings = off
2021-10-28 08:21:11 +02:00
Wolfgang Walther and Wolfgang Walther
8cde90b7fe
refactor: Use include_triggers argument to pg_relation_is_updatable instead of manual check
2021-10-26 19:15:02 +02:00
Wolfgang Walther and Steve Chavez
b05898d17f
fix: Return array of objects for RPCs with single-column TABLE return type
...
This is a regression after changing responses for RPCs with INOUT or OUT arguments in #1615 .
Resolves #1930 .
2021-09-02 10:13:03 -05:00
Wolfgang Walther and Remo
5874482f03
nix(fix): Database cluster not cleaned up before artifact upload
2021-08-15 12:35:52 +02:00
Wolfgang Walther and Remo
0511e99dd4
nix(refactor): Add withPath to checkedShellScript
2021-08-15 12:35:52 +02:00
Wolfgang Walther and Wolfgang Walther
4ded01b104
nix(fix): Fix missed devtools->devTools renaming
2021-04-24 15:25:10 +02:00
Wolfgang Walther and Wolfgang Walther
c691b37f76
nix(feat): Create all temporary directories with script name template
...
Temporary directories are now created in $TMPDIR/postgrest/script-name-XXX. This allows recognizing the origin of a single temporary directory and uploading the whole $TMPDIR/postgrest folder as an artifact in CI.
2021-04-24 15:07:13 +02:00
Wolfgang Walther and Wolfgang Walther
14ddecc81a
nix(fix): Avoid rebuilding during postgrest-coverage
2021-04-24 15:07:13 +02:00
Wolfgang Walther and Wolfgang Walther
3611eab39c
nix(fix): Make postgrest-dump-schema work in nix-shell --pure
2021-04-24 15:07:13 +02:00
Wolfgang Walther and Wolfgang Walther
e5350d2d50
nix(refactor): Split cabalTools from devtools
...
This allows to use `postgrest-build` in CI without pulling in a lot of dependencies.
2021-04-24 15:07:13 +02:00
Wolfgang Walther and Wolfgang Walther
249d4117e0
nix(style): reorder tools in default.nix
2021-04-24 15:07:13 +02:00
Wolfgang Walther and Wolfgang Walther
ba47a54293
nix(refactor): Make with_tmp_db true checkedShellScript
...
This extends the interface of withTmpDb to allow loading different sets
of database fixtures via `postgrest-with-postgresql-xx --fixtures
<path>`.
2021-04-24 15:07:13 +02:00
Wolfgang Walther and Wolfgang Walther
7ca0d46936
nix(fix): Fix postgrest-push-cachix in nix-shell --pure
2021-04-18 13:51:39 +02:00
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
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
Wolfgang Walther and Wolfgang Walther
cd09cc6c52
ci: fix cirrus build timeout
2021-04-14 00:13:08 +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
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
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 Wolfgang Walther
376beac22f
update contributing guidelines
2021-04-06 17:07:14 +02:00
Wolfgang Walther and Wolfgang Walther
ba86b479f8
cov: refactor ApiRequest profile header detection
2021-01-14 16:40:29 +01:00
Wolfgang Walther and Wolfgang Walther
6dd126461e
cov: Remove unused code
2021-01-14 16:40:29 +01:00