Skip to content

Commit 6cab99d

Browse files
committed
Merge branch 'alpha' into add-node-17-support
2 parents 641f57c + 826aa79 commit 6cab99d

30 files changed

+1086
-815
lines changed

.github/workflows/ci.yml

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -192,14 +192,17 @@ jobs:
192192
- name: PostgreSQL 11, PostGIS 3.1
193193
POSTGRES_IMAGE: postgis/postgis:11-3.1
194194
NODE_VERSION: 16.13.0
195-
- name: PostgreSQL 12, PostGIS 3.1
196-
POSTGRES_IMAGE: postgis/postgis:12-3.1
195+
- name: PostgreSQL 11, PostGIS 3.2
196+
POSTGRES_IMAGE: postgis/postgis:11-3.2
197197
NODE_VERSION: 16.13.0
198-
- name: PostgreSQL 13, PostGIS 3.1
199-
POSTGRES_IMAGE: postgis/postgis:13-3.1
198+
- name: PostgreSQL 12, PostGIS 3.2
199+
POSTGRES_IMAGE: postgis/postgis:12-3.2
200200
NODE_VERSION: 16.13.0
201-
- name: PostgreSQL 14, PostGIS 3.1
202-
POSTGRES_IMAGE: postgis/postgis:14-3.1
201+
- name: PostgreSQL 13, PostGIS 3.2
202+
POSTGRES_IMAGE: postgis/postgis:13-3.2
203+
NODE_VERSION: 16.13.0
204+
- name: PostgreSQL 14, PostGIS 3.2
205+
POSTGRES_IMAGE: postgis/postgis:14-3.2
203206
NODE_VERSION: 16.13.0
204207
fail-fast: false
205208
name: ${{ matrix.name }}

CONTRIBUTING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,15 +154,15 @@ If your pull request introduces a change that may affect the storage or retrieva
154154
[PostGIS images (select one with v2.2 or higher) on docker dashboard](https://hub.docker.com/r/postgis/postgis) is based off of the official [postgres](https://registry.hub.docker.com/_/postgres/) image and will work out-of-the-box (as long as you create a user with the necessary extensions for each of your Parse databases; see below). To launch the compatible Postgres instance, copy and paste the following line into your shell:
155155

156156
```
157-
docker run -d --name parse-postgres -p 5432:5432 -e POSTGRES_PASSWORD=password --rm postgis/postgis:13-3.1-alpine && sleep 20 && docker exec -it parse-postgres psql -U postgres -c 'CREATE DATABASE parse_server_postgres_adapter_test_database;' && docker exec -it parse-postgres psql -U postgres -c 'CREATE EXTENSION pgcrypto; CREATE EXTENSION postgis;' -d parse_server_postgres_adapter_test_database && docker exec -it parse-postgres psql -U postgres -c 'CREATE EXTENSION postgis_topology;' -d parse_server_postgres_adapter_test_database
157+
docker run -d --name parse-postgres -p 5432:5432 -e POSTGRES_PASSWORD=password --rm postgis/postgis:13-3.2-alpine && sleep 20 && docker exec -it parse-postgres psql -U postgres -c 'CREATE DATABASE parse_server_postgres_adapter_test_database;' && docker exec -it parse-postgres psql -U postgres -c 'CREATE EXTENSION pgcrypto; CREATE EXTENSION postgis;' -d parse_server_postgres_adapter_test_database && docker exec -it parse-postgres psql -U postgres -c 'CREATE EXTENSION postgis_topology;' -d parse_server_postgres_adapter_test_database
158158
```
159159
To stop the Postgres instance:
160160

161161
```
162162
docker stop parse-postgres
163163
```
164164

165-
You can also use the [postgis/postgis:13-3.1-alpine](https://hub.docker.com/r/postgis/postgis) image in a Dockerfile and copy this [script](https://github.com/parse-community/parse-server/blob/master/scripts/before_script_postgres.sh) to the image by adding the following lines:
165+
You can also use the [postgis/postgis:13-3.2-alpine](https://hub.docker.com/r/postgis/postgis) image in a Dockerfile and copy this [script](https://github.com/parse-community/parse-server/blob/master/scripts/before_script_postgres.sh) to the image by adding the following lines:
166166

167167
```
168168
#Install additional scripts. These are run in abc order during initial start

README.md

Lines changed: 23 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -134,10 +134,10 @@ Parse Server is continuously tested with the most recent releases of PostgreSQL
134134

135135
| Version | PostGIS Version | End-of-Life | Parse Server Support End | Compatible |
136136
|-------------|-----------------|---------------|--------------------------|------------|
137-
| Postgres 11 | 3.0, 3.1 | November 2023 | April 2022 | ✅ Yes |
138-
| Postgres 12 | 3.1 | November 2024 | April 2023 | ✅ Yes |
139-
| Postgres 13 | 3.1 | November 2025 | April 2024 | ✅ Yes |
140-
| Postgres 14 | 3.1 | November 2026 | April 2025 | ✅ Yes |
137+
| Postgres 11 | 3.0, 3.1, 3.2 | November 2023 | April 2022 | ✅ Yes |
138+
| Postgres 12 | 3.2 | November 2024 | April 2023 | ✅ Yes |
139+
| Postgres 13 | 3.2 | November 2025 | April 2024 | ✅ Yes |
140+
| Postgres 14 | 3.2 | November 2026 | April 2025 | ✅ Yes |
141141

142142
### Locally
143143
```bash
@@ -525,9 +525,26 @@ let api = new ParseServer({
525525
| `idempotencyOptions.paths` | yes | `Array<String>` | `[]` | `.*` (all paths, includes the examples below), <br>`functions/.*` (all functions), <br>`jobs/.*` (all jobs), <br>`classes/.*` (all classes), <br>`functions/.*` (all functions), <br>`users` (user creation / update), <br>`installations` (installation creation / update) | PARSE_SERVER_EXPERIMENTAL_IDEMPOTENCY_PATHS | An array of path patterns that have to match the request path for request deduplication to be enabled. The mount path must not be included, for example to match the request path `/parse/functions/myFunction` specify the path pattern `functions/myFunction`. A trailing slash of the request path is ignored, for example the path pattern `functions/myFunction` matches both `/parse/functions/myFunction` and `/parse/functions/myFunction/`. |
526526
| `idempotencyOptions.ttl` | yes | `Integer` | `300` | `60` (60 seconds) | PARSE_SERVER_EXPERIMENTAL_IDEMPOTENCY_TTL | The duration in seconds after which a request record is discarded from the database. Duplicate requests due to network issues can be expected to arrive within milliseconds up to several seconds. This value must be greater than `0`. |
527527
528-
### Notes <!-- omit in toc -->
528+
### Postgres <!-- omit in toc -->
529+
530+
To use this feature in Postgres, you will need to create a cron job using [pgAdmin](https://www.pgadmin.org/docs/pgadmin4/development/pgagent_jobs.html) or similar to call the Postgres function `idempotency_delete_expired_records()` that deletes expired idempotency records. You can find an example script below. Make sure the script has the same privileges to log into Postgres as Parse Server.
531+
532+
```bash
533+
#!/bin/bash
534+
535+
set -e
536+
psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" <<-EOSQL
537+
SELECT idempotency_delete_expired_records();
538+
EOSQL
529539
530-
- This feature is currently only available for MongoDB and not for Postgres.
540+
exec "$@"
541+
```
542+
543+
Assuming the script above is named, `parse_idempotency_delete_expired_records.sh`, a cron job that runs the script every 2 minutes may look like:
544+
545+
```bash
546+
2 * * * * /root/parse_idempotency_delete_expired_records.sh >/dev/null 2>&1
547+
```
531548
532549
## Localization
533550

changelogs/CHANGELOG_alpha.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,38 @@
1+
# [5.0.0-alpha.18](https://github.com/parse-community/parse-server/compare/5.0.0-alpha.17...5.0.0-alpha.18) (2022-01-13)
2+
3+
4+
### Bug Fixes
5+
6+
* security upgrade follow-redirects from 1.14.6 to 1.14.7 ([#7769](https://github.com/parse-community/parse-server/issues/7769)) ([8f5a861](https://github.com/parse-community/parse-server/commit/8f5a8618cfa7ed9a2a239a095abffa8f3fd8d31a))
7+
8+
# [5.0.0-alpha.17](https://github.com/parse-community/parse-server/compare/5.0.0-alpha.16...5.0.0-alpha.17) (2022-01-13)
9+
10+
11+
### Bug Fixes
12+
13+
* schema cache not cleared in some cases ([#7678](https://github.com/parse-community/parse-server/issues/7678)) ([5af6e5d](https://github.com/parse-community/parse-server/commit/5af6e5dfaa129b1a350afcba4fb381b21c4cc35d))
14+
15+
# [5.0.0-alpha.16](https://github.com/parse-community/parse-server/compare/5.0.0-alpha.15...5.0.0-alpha.16) (2022-01-02)
16+
17+
18+
### Features
19+
20+
* add Idempotency to Postgres ([#7750](https://github.com/parse-community/parse-server/issues/7750)) ([0c3feaa](https://github.com/parse-community/parse-server/commit/0c3feaaa1751964c0db89f25674935c3354b1538))
21+
22+
# [5.0.0-alpha.15](https://github.com/parse-community/parse-server/compare/5.0.0-alpha.14...5.0.0-alpha.15) (2022-01-02)
23+
24+
25+
### Features
26+
27+
* support `postgresql` protocol in database URI ([#7757](https://github.com/parse-community/parse-server/issues/7757)) ([caf4a23](https://github.com/parse-community/parse-server/commit/caf4a2341f554b28e3918c53e7e897a3ca47bf8b))
28+
29+
# [5.0.0-alpha.14](https://github.com/parse-community/parse-server/compare/5.0.0-alpha.13...5.0.0-alpha.14) (2022-01-02)
30+
31+
32+
### Features
33+
34+
* support relativeTime query constraint on Postgres ([#7747](https://github.com/parse-community/parse-server/issues/7747)) ([16b1b2a](https://github.com/parse-community/parse-server/commit/16b1b2a19714535ca805f2dbb3b561d8f6a519a7))
35+
136
# [5.0.0-alpha.13](https://github.com/parse-community/parse-server/compare/5.0.0-alpha.12...5.0.0-alpha.13) (2021-12-08)
237

338

0 commit comments

Comments
 (0)