steve-chavez
896b79f05b
refactor: separate reading file from parsing it
2020-07-13 11:30:16 -05:00
Wolfgang Walther and GitHub
343e41c51d
Location header improvements( #1475 )
...
* Create location header only on primary key columns, closes https://github.com/PostgREST/postgrest/issues/1461
* Return location header when pk columns not selected, fixes https://github.com/PostgREST/postgrest/issues/1162
2020-07-08 14:36:40 -05:00
steve-chavez
55b4f4fbe7
Fix expired JWTs starting an empty transaction
...
Fixes https://github.com/PostgREST/postgrest/issues/1094 .
Expired JWTs were doing an empty BEGIN/COMMIT in the db.
2020-07-03 17:23:10 -05:00
Wolfgang Walther and Steve Chavez
a5bc293372
add test cases for singular minimal
2020-07-03 13:54:39 -05:00
Steve Chavez and GitHub
43d71e95ac
Allow schema cache reloading with NOTIFY ( #1542 )
...
Fixes https://github.com/PostgREST/postgrest/issues/1512
Helps on environments where you can't send unix signals(Windows, managed
containers). Also provides better UX for schema reloads - NOTIFY
can be sent from pg clients(psql, pgadmin).
`NOTIFY pgrst` - with no payload - should be done to reload the schema cache.
Notifications with a payload will be ignored.
The channel can be enabled with `db-channel-enabled`(false by default)
and its name can be configured with `db-channel`.
The LISTEN thread uses a dedicated pg connection.
This connection is recovered if it fails.
A debounce of 1ms is done in case too many NOTIFYs arrive.
2020-06-24 19:00:02 -05:00
steve-chavez
24064f8626
github: CHANGELOG reminder in PR template
2020-06-05 13:57:47 -05:00
steve-chavez
8588a42aa9
Fix broken links in .github dir
...
Also add a PR template
2020-06-05 13:40:03 -05:00
Steve Chavez and GitHub
0f0d617951
Allow http status override through response.status guc ( #1541 )
...
Fixes https://github.com/PostgREST/postgrest/issues/1525
2020-06-05 13:01:36 -05:00
Remo Rechkemmer and GitHub
69b09e312a
Nixify io and memory tests ( #1538 )
...
* Include tests for io and memory in the Nix environment.
* include spec tests in nix-shell by default
* install the io and memory tests in CI
2020-05-28 12:45:14 -05:00
Felix Yan and GitHub
784ebe57d7
Allow aeson 1.5 ( #1537 )
2020-05-26 10:43:14 -05:00
Remo Rechkemmer and GitHub
08186ea51c
Nixify CircleCI setup ( #1535 )
...
* package ghr
* add nix-based release scripts
* refactor CI based on nix tests and release scripts
* update stack version in circleci
* update makefile
* remove docker directory
* add Docker Hub description
* add README on docker
2020-05-25 11:27:35 -05:00
steve-chavez
d4aba5cb08
Add notice about single Linux static executable
2020-05-22 14:30:23 -05:00
Remo Rechkemmer and GitHub
3a1844ec8e
Fix the static build ( #1534 )
...
* openssl linking fix is required after all
* remove Cabal override (obsoleted on new nixpkgs)
2020-05-21 14:47:07 -05:00
Remo Rechkemmer and GitHub
48c9ac36b1
Bump nixpkgs and simplify/clean up nix setup ( #1529 )
...
* Refactor tests and fix README
* fix linting hints from new hlint version
* postgrest-style with new nixpkgs-fmt
2020-05-20 21:30:20 -05:00
Remo Rechkemmer and GitHub
e6874c866d
Fix UNKNOWN being shown as git commit hash ( #1533 )
...
Fixes https://github.com/PostgREST/postgrest/issues/1530
2020-05-20 14:10:53 -05:00
Remo Rechkemmer and GitHub
289bb66f56
Reduce size of the static docker image by patching the Nix openssl package ( #1528 )
...
* hook docker images into the default builds
2020-05-20 11:49:11 -05:00
Steve Chavez and GitHub
67344c8e0a
cabal: fix upload to hackage ( #1532 )
...
When doing:
```
cabal upload dist-newstyle/sdist/postgrest-7.0.1.tar.gz
```
The following error is shown:
```
Error: Invalid package
'ghc-options: -Wall -Werror' makes the package very easy to break with
future GHC versions because new GHC versions often add new warnings.
Use just 'ghc-options: -Wall' instead. Alternatively, if you want to
use this, make it conditional based on a Cabal configuration flag
(with 'manual: True' and 'default: False') and enable that flag
during development.
```
Put -Werror in a cabal flag to work around this restriction.
2020-05-19 13:59:33 -05:00
steve-chavez
222a53015e
Fix Dockerfile
...
Remove libpq5 dependency since static bin already contains it.
2020-05-18 16:50:53 -05:00
steve-chavez
d6050c8615
Bump to version v7.0.1
v7.0.1
2020-05-18 13:05:09 -05:00
steve-chavez
7ffac522e3
circleci: remove linux distro releases
...
Prefer the linux static binary for x64
2020-05-18 13:05:09 -05:00
steve-chavez
6c4208d9e7
cirrusci: add binary artifact
2020-05-18 13:05:09 -05:00
steve-chavez
98bf4d861d
circleci: add static bin to release
2020-05-18 13:05:09 -05:00
Remo Rechkemmer and GitHub
bfcd289855
Build Docker image from Nix ( #1522 )
...
* Static docker image
* added tags for latest and with version
* add postgrest repository to docker image name
* set creation date on nix docker images
2020-05-16 11:35:32 -05:00
Remo Rechkemmer and GitHub
7c0fbf9b3f
Add static build with Nix ( fixes #1295 ) ( #1494 )
...
* Include modifications to nixpkgs and static-haskell-nix as patches.
* use the patched static-haskell-nix version
* Add cachix postgrest
2020-05-12 13:31:37 -05:00
steve-chavez
6fae07241f
Add FreeBSD CI
2020-05-08 15:11:44 -05:00
steve-chavez
a4f687fdfd
appveyor: specify windows image
2020-05-08 15:11:44 -05:00
steve-chavez
b1a101c253
Update BACKERS.md
2020-05-04 12:17:52 -05:00
steve-chavez
10c363b588
Remove PUT restriction for all columns/single row
...
Fixes https://github.com/PostgREST/postgrest/issues/1452 .
The single row restriction can be lifted because the
PUT will consider only the first object of the array.
2020-05-02 11:51:32 -05:00
steve-chavez
9a52632024
Fix Content-Profile not working for POST RPC
...
Accept-Profile was applied instead.
Fixes https://github.com/PostgREST/postgrest/issues/1508 .
2020-05-02 11:51:32 -05:00
steve-chavez
f57caf0987
Readd openapi-server-proxy-uri config option
...
This option accidentaly got lost during a merge.
Fixes https://github.com/PostgREST/postgrest/issues/1500
2020-05-02 11:51:32 -05:00
Remo and GitHub
f02904a959
Simplify the DbStructure queries ( #1478 )
...
* remove unused parts of the DbStructure queries
* explain magic numbers in DbStructure queries
* simplify primary keys query
2020-04-29 13:01:46 -05:00
Remo and GitHub
8b41b71db7
More consistent loading of the test fixtures ( #1506 )
...
Remove db setup from the Haskell test suite and include it in the test bash scripts.
2020-04-29 12:22:15 -05:00
Remo and GitHub
d4cf8e7abb
Hook the Nix styling scripts into CI ( #1504 )
2020-04-29 10:44:11 -05:00
Remo and GitHub
9134171b95
Fix the cachix push logic in CircleCI
...
Before pushing to cachix, check if the CACHIX_SIGNING_KEY env var is available.
2020-04-28 14:04:06 -05:00
Remo and GitHub
328c3453f8
Add tips and tricks to using nix-shell ( #1505 )
2020-04-28 12:45:29 -05:00
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