Robert Vollmert and Steve Chavez
bb27eb57a9
Allow base64-bytestring 1.2.
2020-04-28 11:06:05 -05:00
Remo and GitHub
dbc3aa28c4
Add scripts for linting and styling with all dependencies managed by Nix ( #1501 )
...
* Integrate the style and lint dependencies with Nix
* Add documentation on the nix styling scripts.
2020-04-27 15:04:50 -05:00
Remo and GitHub
ad92c207f2
Run the spec test suite from the nix build job ( #1503 )
...
* Add caching to the tests run in CI with Nix
2020-04-27 13:39:57 -05:00
Remo and Steve Chavez
dea6c5eb92
Remove ghc options from stack.yaml
...
They are redundant after being added to postgrest.cabal in #1489
2020-04-27 12:41:55 -05:00
Robert and GitHub
3baefa1d96
Relax dependencies to build with GHC 8.10 (base, swagger2) ( #1502 )
...
* Allow swagger 2.7.
* Allow base-4.14 (GHC 8.10).
2020-04-25 13:35:01 -05:00
Remo and GitHub
c0546e0e46
Basic CI integration for Nix builds ( #1495 )
...
* Skip pushing to cachix for pull requests from forks.
* Build PostgREST first in the nix CI job in order to fail fast
2020-04-25 13:08:30 -05:00
Remo and GitHub
d5f1d1b1ad
Pin version 0.3 of protolude in nix ( #1499 )
2020-04-24 12:09:56 -05:00
Remo and GitHub
1c19bbde93
Run tests against several PostgreSQL versions using Nix ( #1492 )
...
* Show test output with postgrest-test-spec* in nix-shell
* Test output in color
2020-04-24 11:05:37 -05:00
Robert Vollmert and Steve Chavez
3da5a2875e
Update to protolude 0.3.0
...
The good part is that protolude 0.3.0 builds with GHC 8.10.
The bad part is that this change is a bit painful:
- the default `toS` has changed to no longer convert to and from ByteString
- similarly, `show` no longer outputs ByteString
The changes here are pretty much minimal to keep things compiling; I didn't
see a nice way to work with the new ConvertText class, even though `toUtf8`
seems like it might help if used besides `toS` at just the right spots.
2020-04-23 14:14:21 -05:00
Remo and Steve Chavez
2e6a094d48
Disable nix pure by default in stack.yaml
2020-04-23 12:48:04 -05:00
Remo and Steve Chavez
178c5d54d5
Integrate stack in the nix-shell environment
2020-04-22 14:30:02 -05:00
Remo and GitHub
a7c396e464
Fix and improvements to with_tmp_db ( #1488 )
...
* Load fixtures in one psql session
* Add an option to keet the tmp directory and logs.
2020-04-22 11:57:40 -05:00
Remo and GitHub
24db4a1e25
Basics for building PostgREST with Nix ( #1489 )
...
* Add GHC options used with stack to postgrest.cabal
* Add a Nix derivation for just the executable.
2020-04-21 11:59:00 -05:00
Robert and GitHub
ae77cf9a08
circleci: Build linters with memory-saving ghc-options. ( #1490 )
...
Previously, the linters would use the cached build artefacts from
building postgrest with -fno-spec-constr via stack.yaml. Potentially
passing it to the linter build explicitly will fix recent out-of-memory
issues.
2020-04-19 14:15:12 -05:00
Robert Vollmert and Steve Chavez
4a0a37588f
Fix hlint 2.2.11 bracketing suggestions
2020-04-16 17:47:52 -05:00
Robert Vollmert and Steve Chavez
5838214910
Fix tests for explicit errors in aeson-1.4.7, and raise lower bound
2020-04-16 17:47:52 -05:00
Robert Vollmert and Steve Chavez
b609d8491e
Update stack.yaml to lts-15.8 (GHC 8.8.3)
2020-04-16 17:47:52 -05:00
Robert Vollmert and Steve Chavez
18538707ab
Relax upper bounds for lens, network-uri, time.
...
This allows lens-4.19, network-uri-2.7 and time-0.10. According to
the respective changelogs, none of these should cause trouble.
lens-4.19 is required to build with GHC 8.10.
2020-04-16 13:36:26 -05:00
Robert Vollmert and Steve Chavez
e59c72cff3
circleci: Break out a plain build and cache job
2020-04-16 13:10:21 -05:00
Robert Vollmert and Steve Chavez
da573a1805
circleci: Dedicated cache key for style checks
2020-04-16 13:10:21 -05:00
Robert Vollmert and Steve Chavez
e24a7d005a
circleci: Split style and hlint out into separate job
2020-04-16 13:10:21 -05:00
Robert Vollmert and Steve Chavez
79399686db
Remove unused imports (with newer protolude)
...
The changes here are from fixing stack build with LTS 15.8 (GHC 8.8.3)
to be warning-free. Most if not all come from the newer protolude
version, which adds some things like `unwords`.
So to make sure that we don't get unused import warnings with newer
stackage, this both raises the protolude lower bound and removes
these imports.
2020-04-16 11:10:24 -05:00
Remo and GitHub
f6ce93f2c8
Add a script for running the test suite in a local temporary database. ( #1476 )
2020-04-14 12:34:50 -05:00
Remo and GitHub
8c35c9d711
Fix CI tests for Postgres 9.4 ( #1482 )
2020-04-14 11:00:43 -05:00
Wolfgang Walther and GitHub
be674eb41d
Fix POST, PATCH, DELETE with ?select= and empty body or return=minimal ( #1471 )
...
* add tests for POST, PATCH, DELETE when using ?select= with empty bodies or ret=min
* fix select with empty bodies and ret=min
* improved tests for default cases, fixed computed overloaded columns on empty-body?select= PATCH
2020-04-13 12:32:35 -05:00
steve-chavez
052843ac9b
Update BACKERS.md
2020-04-13 12:13:35 -05:00
Wolfgang Walther and GitHub
c524531784
Fix overloaded computed columns on RPC ( #1473 )
...
* fix some typos and spelling
* fix pg_source CTE name should be prefixed with pgrst_
* added tests for overloaded computed columns on patch calls
2020-04-06 14:04:55 -05:00
Wolfgang Walther and GitHub
82fa1d8812
add postgres-12 tests to circleci ( #1472 )
...
* circleci: new postgres docker containers need host auth trust
2020-04-06 11:00:26 -05:00
steve-chavez
2b61a63686
Bump to version v7.0.0
v7.0.0
2020-04-03 11:22:11 -05:00
steve-chavez
18e45659ea
Fix compiling on windows(unix socket issue)
...
Group unix socket functionality into its own module
2020-04-03 11:22:11 -05:00
steve-chavez
426637a47c
Fix circleci golang docker image
...
Upgrade golang otherwise ghr throws:
unrecognized import path "math/bits"
2020-04-03 11:22:11 -05:00
Steve Chavez and GitHub
ababf7d4fa
Change docker image to support scram-sha-256 auth ( #1467 )
...
Debian stretch has a libpq < 10: https://packages.debian.org/stretch/libpq5 .
But buster has libpq >= 10 https://packages.debian.org/buster/libpq5 .
Fixes https://github.com/PostgREST/postgrest/issues/1443 .
2020-04-01 10:14:00 -05:00
691bb5640d
Allow multiple schemas to be exposed in one instance ( #1450 )
...
The schema to use can be selected through the headers `Accept-Profile` for GET/HEAD and `Content-Profile` for POST/PATCH/PUT/DELETE.
This is based on the https://www.w3.org/TR/dx-prof-conneg/ttps://www.w3.org/TR/dx-prof-conneg/ spec.
Also increase all memory tests by 1M(otherwise CI fails).
Co-authored-by: Mahmoud Kassem <MKassem@gk-software.com >
Co-authored-by: Mahmoud Kassem <mahmoud_k@mail.com >
2020-03-30 14:04:20 -05:00
Wolfgang Walther and GitHub
a80eb2ff0e
Add docker-compose file to run tests ( #1463 )
2020-03-24 09:50:06 -05:00
Duncan Ogilvie and GitHub
fe59f9bedf
Improve command line help ( #1465 )
...
Make jwt-secret explicit about 32 characters minimum.
2020-03-21 18:44:08 -05:00
Steve Chavez and GitHub
0f8838623b
Fix empty headers being added on POST/PATCH/DELETE ( #1458 )
2020-03-13 11:02:38 -05:00
Robert and GitHub
5b5945e427
Update configurator-pg to 0.2.0 (better error messages) ( #1457 )
...
* Don't indent first line of configuration parser error messages
configurator-pg returns multi-line errors now. Alternatively,
we could indent all the lines.
2020-03-12 10:04:44 -05:00
Robert Vollmert and Steve Chavez
dea57bd1be
Raise lower bound for configurator-pg.
...
Building on GHC 8.8.3 requires the MonadFail instance that 0.1.0.6
provides.
2020-03-09 13:06:27 -05:00
Robert Vollmert and Steve Chavez
3e81a38438
Relax upper bounds for GHC 8.8.3 / stackage lts-15.3.
...
Specifically, allow base 4.13 which ships with GHC 8.8, as well
as several dependency updates including hasql-transaction 1.0,
swagger 2.5 and warp 3.3.
2020-03-09 13:06:27 -05:00
Robert Vollmert and Steve Chavez
dfdf3d30b3
Fix test typo.
2020-03-07 13:04:17 -05:00
Robert Vollmert and Steve Chavez
60b64d3e81
Upgrade hspec-wai dependency to 0.10.
2020-03-07 13:04:17 -05:00
Robert Vollmert and Steve Chavez
962fba4d16
Update stack.yaml.lock for HSYaml extra-deps.
2020-03-07 13:04:17 -05:00
steve-chavez
de218e900b
Fix for sylish-haskell
2020-02-21 13:30:30 -05:00
steve-chavez
b75e7cef90
Change server-proxy-uri 2 openapi-server-proxy-uri
...
The server-proxy-uri config option mislead into thinking it was a
web server global setting when it's only related to OpenAPI.
2020-02-02 15:23:32 -05:00
steve-chavez
9b1224827a
Allow overriding headers Location,Content-Type,etc
2020-01-21 12:28:05 -05:00
steve-chavez
c7f78fa7fc
Add response.headers on GET/POST/PATCH/PUT/DELETE
2020-01-21 12:28:05 -05:00
steve-chavez
7dade7f466
Add request method and path GUCs
2020-01-21 12:28:05 -05:00
steve-chavez
b20e1150a5
Add GUC for accessing the Authorization header
2020-01-21 12:28:05 -05:00
steve-chavez
aa0d6a6831
Update BACKERS.md
2020-01-21 12:28:05 -05:00
Steve Chavez and GitHub
663faa1f82
Allow specifying the constraint name to disambiguate an embedding ( #1430 )
...
Makes previous duck typing regex unnecessary since the FK can be renamed
to a singular name or to any other format.
* Remove embedding with duck typed column names
* Allow embedding by foreign key name
* Add junction disambiguation tests
2020-01-06 09:42:33 -05:00