Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4a3936f71c | ||
|
|
9b6b5d06ea | ||
|
|
ec83d08be6 | ||
|
|
c026d0752f |
@@ -5,6 +5,18 @@ This project adheres to [Semantic Versioning](http://semver.org/).
|
||||
|
||||
## Unreleased
|
||||
|
||||
## [12.2.8] - 2025-02-10
|
||||
|
||||
### Fixed
|
||||
|
||||
- #3841, Log `503` client error to stderr - @taimoorzaeem
|
||||
|
||||
## [12.2.7] - 2025-02-03
|
||||
|
||||
### Fixed
|
||||
|
||||
- #2524, Fix schema reloading notice on windows - @diogob
|
||||
|
||||
## [12.2.6] - 2025-01-29
|
||||
|
||||
### Fixed
|
||||
|
||||
@@ -1 +1 @@
|
||||
index-state: hackage.haskell.org 2024-05-17T23:41:49Z
|
||||
index-state: hackage.haskell.org 2025-02-01T14:59:33Z
|
||||
|
||||
@@ -74,8 +74,8 @@ let
|
||||
hasql-notifications = lib.dontCheck (prev.callHackageDirect
|
||||
{
|
||||
pkg = "hasql-notifications";
|
||||
ver = "0.2.2.0";
|
||||
sha256 = "sha256-73OQ9/su2qvO7HavF3xuuNWLXSXyB9reBUQDaHys06I=";
|
||||
ver = "0.2.2.2";
|
||||
sha256 = "sha256-myKwlug7OgTa/qP6mHfCD+5Q8IhM17JvpJBfSo+M01k=";
|
||||
}
|
||||
{ }
|
||||
);
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
name: postgrest
|
||||
version: 12.2.6
|
||||
version: 12.2.8
|
||||
synopsis: REST API for any Postgres database
|
||||
description: Reads the schema of a PostgreSQL database and creates RESTful routes
|
||||
for tables, views, and functions, supporting all HTTP methods that security
|
||||
@@ -110,7 +110,7 @@ library
|
||||
, gitrev >= 1.2 && < 1.4
|
||||
, hasql >= 1.6.1.1 && < 1.7
|
||||
, hasql-dynamic-statements >= 0.3.1 && < 0.4
|
||||
, hasql-notifications >= 0.2.2.0 && < 0.3
|
||||
, hasql-notifications >= 0.2.2.2 && < 0.2.3
|
||||
, hasql-pool >= 1.0.1 && < 1.1
|
||||
, hasql-transaction >= 1.0.1 && < 1.1
|
||||
, heredoc >= 0.2 && < 0.3
|
||||
|
||||
@@ -265,8 +265,9 @@ usePool AppState{stateObserver=observer, stateMainThreadId=mainThreadId, ..} ses
|
||||
SQL.ServerError{} ->
|
||||
when (Error.status (Error.PgError False err) >= HTTP.status500) $
|
||||
observer $ QueryErrorCodeHighObs err
|
||||
SQL.SessionUsageError (SQL.QueryError _ _ (SQL.ClientError _)) ->
|
||||
pure ()
|
||||
err@(SQL.SessionUsageError (SQL.QueryError _ _ (SQL.ClientError _))) ->
|
||||
-- An error on the client-side, usually indicates problems wth connection
|
||||
observer $ QueryErrorCodeHighObs err
|
||||
)
|
||||
|
||||
return res
|
||||
|
||||
+1
-1
@@ -19,6 +19,6 @@ nix:
|
||||
extra-deps:
|
||||
- configurator-pg-0.2.10
|
||||
- fuzzyset-0.2.4
|
||||
- hasql-notifications-0.2.2.0
|
||||
- hasql-notifications-0.2.2.2
|
||||
- hasql-pool-1.0.1
|
||||
- postgresql-libpq-0.10.1.0
|
||||
|
||||
@@ -19,12 +19,12 @@ packages:
|
||||
original:
|
||||
hackage: fuzzyset-0.2.4
|
||||
- completed:
|
||||
hackage: hasql-notifications-0.2.2.0@sha256:a4e591ef3f06647b056567d3b66948c4a85371f05deb5434edb6ce190f7c845d,2021
|
||||
hackage: hasql-notifications-0.2.2.2@sha256:d1d6bc0d3ee5e418fc12ea023b78739e0decba6c34e2b43bec55b89e18bd4412,2025
|
||||
pantry-tree:
|
||||
sha256: bd7192a5e82ef6dbac711c3433408a0330c8db1cd3482be1ccd4fbd0a63bc2f6
|
||||
sha256: 83a9cbb179b1efd0b2acd6509583c7afcdbe63469ab033d8581d48d675a80b44
|
||||
size: 452
|
||||
original:
|
||||
hackage: hasql-notifications-0.2.2.0
|
||||
hackage: hasql-notifications-0.2.2.2
|
||||
- completed:
|
||||
hackage: hasql-pool-1.0.1@sha256:3cfb4c7153a6c536ac7e126c17723e6d26ee03794954deed2d72bcc826d05a40,2302
|
||||
pantry-tree:
|
||||
|
||||
+1
-1
@@ -11,5 +11,5 @@ nix:
|
||||
|
||||
extra-deps:
|
||||
- fuzzyset-0.2.4
|
||||
- hasql-notifications-0.2.2.0
|
||||
- hasql-notifications-0.2.2.2
|
||||
- hasql-pool-1.0.1
|
||||
|
||||
+3
-3
@@ -12,12 +12,12 @@ packages:
|
||||
original:
|
||||
hackage: fuzzyset-0.2.4
|
||||
- completed:
|
||||
hackage: hasql-notifications-0.2.2.0@sha256:a4e591ef3f06647b056567d3b66948c4a85371f05deb5434edb6ce190f7c845d,2021
|
||||
hackage: hasql-notifications-0.2.2.2@sha256:d1d6bc0d3ee5e418fc12ea023b78739e0decba6c34e2b43bec55b89e18bd4412,2025
|
||||
pantry-tree:
|
||||
sha256: bd7192a5e82ef6dbac711c3433408a0330c8db1cd3482be1ccd4fbd0a63bc2f6
|
||||
sha256: 83a9cbb179b1efd0b2acd6509583c7afcdbe63469ab033d8581d48d675a80b44
|
||||
size: 452
|
||||
original:
|
||||
hackage: hasql-notifications-0.2.2.0
|
||||
hackage: hasql-notifications-0.2.2.2
|
||||
- completed:
|
||||
hackage: hasql-pool-1.0.1@sha256:3cfb4c7153a6c536ac7e126c17723e6d26ee03794954deed2d72bcc826d05a40,2302
|
||||
pantry-tree:
|
||||
|
||||
@@ -1644,3 +1644,22 @@ def test_jwt_cache_purges_expired_entries(defaultenv):
|
||||
response = postgrest.session.get("/authors_only", headers=hdrs3)
|
||||
|
||||
assert response.status_code == 200
|
||||
|
||||
|
||||
def test_pgrst_log_503_client_error_to_stderr(defaultenv):
|
||||
"PostgREST should log 503 errors to stderr"
|
||||
|
||||
env = {
|
||||
**defaultenv,
|
||||
"PGAPPNAME": "test-io",
|
||||
}
|
||||
|
||||
with run(env=env) as postgrest:
|
||||
|
||||
postgrest.session.get("/rpc/terminate_pgrst?appname=test-io")
|
||||
|
||||
output = postgrest.read_stdout(nlines=6)
|
||||
|
||||
log_message = '{"code":"PGRST001","details":"no connection to the server\\n","hint":null,"message":"Database client error. Retrying the connection."}\n'
|
||||
|
||||
assert any(log_message in line for line in output)
|
||||
|
||||
Reference in New Issue
Block a user