Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: create await new ParseServer(config).startApp() to resolve cloud code and schema before express app is exposed #7914

Closed
wants to merge 53 commits into from
Closed
Show file tree
Hide file tree
Changes from 44 commits
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
9ef1968
ci: fix node engine check (#7891)
mtrezza Mar 25, 2022
f63fb2b
fix: return correct response when revert is used in beforeSave (#7839)
dblythy Mar 26, 2022
b3199d7
chore(release): 5.2.1-alpha.1 [skip ci]
semantic-release-bot Mar 26, 2022
48bd512
perf: reduce database operations when using the constant parameter in…
dblythy Mar 26, 2022
e0cca58
chore(release): 5.2.1-alpha.2 [skip ci]
semantic-release-bot Mar 26, 2022
90155cf
feat: add MongoDB 5.1 compatibility (#7682)
github-actions[bot] Mar 27, 2022
499cead
chore(release): 5.3.0-alpha.1 [skip ci]
semantic-release-bot Mar 27, 2022
ef56e98
fix: security upgrade parse push adapter from 4.1.0 to 4.1.2 (#7893)
mtrezza Mar 27, 2022
119dbe0
chore(release): 5.3.0-alpha.2 [skip ci]
semantic-release-bot Mar 27, 2022
6b4b358
feat: add MongoDB 5.2 support (#7894)
mtrezza Mar 27, 2022
75eca2d
chore(release): 5.3.0-alpha.3 [skip ci]
semantic-release-bot Mar 27, 2022
0cec09f
fix: allow ES import for cloud string if package type is module
dblythy Mar 31, 2022
4e14aa2
revert helper
dblythy Mar 31, 2022
132a3e0
refactor: upgrade mongodb from 4.3.1 to 4.4.1 (#7906)
snyk-bot Apr 3, 2022
d74b6a3
ci: bump environment (#7907)
github-actions[bot] Apr 3, 2022
2b0957c
refactor: add missing schema definitions (#7917)
Moumouls Apr 3, 2022
a72b384
fix: custom database options are not passed to MongoDB GridFS (#7911)
dblythy Apr 4, 2022
0b929db
chore(release): 5.3.0-alpha.4 [skip ci]
semantic-release-bot Apr 4, 2022
cbdf7e8
Update ParseServer.js
dblythy Apr 5, 2022
ef3680a
refactor: upgrade @apollo/client from 3.5.8 to 3.5.9 (#7921)
snyk-bot Apr 9, 2022
6b68593
fix: security upgrade moment from 2.29.1 to 2.29.2 (#7931)
dependabot[bot] Apr 9, 2022
e88fb72
chore(release): 5.3.0-alpha.5 [skip ci]
semantic-release-bot Apr 9, 2022
a648709
Merge branch 'alpha' into await-cloud-code
mtrezza Apr 9, 2022
b7a1d76
fix: peer dependency mismatch for GraphQL dependencies (#7934)
marvinroger Apr 11, 2022
34b8110
chore(release): 5.3.0-alpha.6 [skip ci]
semantic-release-bot Apr 11, 2022
43ad5b3
refactor: upgrade @graphql-tools/links from 8.2.2 to 8.2.4 (#7932)
snyk-bot Apr 11, 2022
b45d44e
refactor: upgrade @graphql-tools/links from 8.2.4 to 8.2.6 (#7935)
snyk-bot Apr 15, 2022
8b91961
refactor: upgrade @graphql-tools/links from 8.2.6 to 8.2.7 (#7941)
dplewis Apr 17, 2022
122afcf
refactor: upgrade body-parser from 1.19.1 to 1.19.2 (#7944)
dplewis Apr 20, 2022
8868628
refactor: upgrade @graphql-tools/links from 8.2.7 to 8.2.8 (#7945)
dplewis Apr 22, 2022
20fc4e2
fix: security upgrade @parse/fs-files-adapter from 1.2.1 to 1.2.2 (#7…
snyk-bot Apr 25, 2022
8cf0b5e
chore(release): 5.3.0-alpha.7 [skip ci]
semantic-release-bot Apr 25, 2022
ac80bdd
refactor: upgrade winston from 3.5.1 to 3.7.2 (#7954)
mtrezza Apr 27, 2022
901a3ea
rename method to create
dblythy Apr 28, 2022
08e6c34
resolve .app
dblythy Apr 28, 2022
29fc673
Merge branch 'alpha' into await-cloud-code
dblythy Apr 28, 2022
efe75c2
Update index.spec.js
dblythy Apr 28, 2022
e6c45f5
create startApp function
dblythy Apr 28, 2022
b23d346
Update index.spec.js
dblythy Apr 28, 2022
2ae3980
increase coverage
dblythy Apr 28, 2022
81de641
Update DefinedSchemas.js
dblythy Apr 28, 2022
d7ee114
close servers
dblythy Apr 28, 2022
1f8a4ee
Update index.js
dblythy Apr 28, 2022
7f99592
fix tests
dblythy Apr 28, 2022
caa75f6
Update ParseServer.js
dblythy Apr 29, 2022
dec4082
Update ParseServer.js
dblythy Apr 29, 2022
d65be73
add holdPublicRoutes
dblythy May 3, 2022
61ef23f
Merge remote-tracking branch 'upstream/alpha' into alpha
dblythy May 3, 2022
60145a2
Merge branch 'alpha' into await-cloud-code
dblythy May 3, 2022
7cd5e38
definitions
dblythy May 3, 2022
871f13c
Merge branch 'alpha' into await-cloud-code
mtrezza May 3, 2022
d378e72
Merge branch 'alpha' into await-cloud-code
dblythy May 16, 2022
c29ba4f
Merge branch 'alpha' into await-cloud-code
dblythy Sep 18, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .babelrc
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
["@babel/preset-env", {
"targets": {
"node": "12"
}
},
"exclude": ["proposal-dynamic-import"]
}]
],
"sourceMaps": "inline"
Expand Down
56 changes: 33 additions & 23 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
branches:
- '**'
env:
NODE_VERSION: 16.13.0
NODE_VERSION: 16.14.2
PARSE_SERVER_TEST_TIMEOUT: 20000
jobs:
check-ci:
Expand Down Expand Up @@ -101,47 +101,57 @@ jobs:
strategy:
matrix:
include:
- name: MongoDB 5.2, ReplicaSet, WiredTiger
MONGODB_VERSION: 5.2.1
MONGODB_TOPOLOGY: replicaset
MONGODB_STORAGE_ENGINE: wiredTiger
NODE_VERSION: 14.19.1
- name: MongoDB 5.1, ReplicaSet, WiredTiger
MONGODB_VERSION: 5.1.1
MONGODB_TOPOLOGY: replicaset
MONGODB_STORAGE_ENGINE: wiredTiger
NODE_VERSION: 14.19.1
- name: MongoDB 5.0, ReplicaSet, WiredTiger
MONGODB_VERSION: 5.0.3
MONGODB_VERSION: 5.0.6
MONGODB_TOPOLOGY: replicaset
MONGODB_STORAGE_ENGINE: wiredTiger
NODE_VERSION: 16.13.0
NODE_VERSION: 16.14.2
- name: MongoDB 4.4, ReplicaSet, WiredTiger
MONGODB_VERSION: 4.4.10
MONGODB_VERSION: 4.4.13
MONGODB_TOPOLOGY: replicaset
MONGODB_STORAGE_ENGINE: wiredTiger
NODE_VERSION: 16.13.0
NODE_VERSION: 16.14.2
- name: MongoDB 4.2, ReplicaSet, WiredTiger
MONGODB_VERSION: 4.2.17
MONGODB_VERSION: 4.2.19
MONGODB_TOPOLOGY: replicaset
MONGODB_STORAGE_ENGINE: wiredTiger
NODE_VERSION: 16.13.0
NODE_VERSION: 16.14.2
- name: MongoDB 4.0, ReplicaSet, WiredTiger
MONGODB_VERSION: 4.0.27
MONGODB_VERSION: 4.0.28
MONGODB_TOPOLOGY: replicaset
MONGODB_STORAGE_ENGINE: wiredTiger
NODE_VERSION: 16.13.0
NODE_VERSION: 16.14.2
- name: MongoDB 4.0, Standalone, MMAPv1
MONGODB_VERSION: 4.0.27
MONGODB_VERSION: 4.0.28
MONGODB_TOPOLOGY: standalone
MONGODB_STORAGE_ENGINE: mmapv1
NODE_VERSION: 16.13.0
NODE_VERSION: 16.14.2
- name: Redis Cache
PARSE_SERVER_TEST_CACHE: redis
MONGODB_VERSION: 4.4.10
MONGODB_VERSION: 4.4.13
MONGODB_TOPOLOGY: standalone
MONGODB_STORAGE_ENGINE: wiredTiger
NODE_VERSION: 16.13.0
NODE_VERSION: 16.14.2
- name: Node 12
MONGODB_VERSION: 4.4.10
MONGODB_VERSION: 4.4.13
MONGODB_TOPOLOGY: standalone
MONGODB_STORAGE_ENGINE: wiredTiger
NODE_VERSION: 12.22.7
NODE_VERSION: 12.22.11
- name: Node 14
MONGODB_VERSION: 4.4.10
MONGODB_VERSION: 4.4.13
MONGODB_TOPOLOGY: standalone
MONGODB_STORAGE_ENGINE: wiredTiger
NODE_VERSION: 14.18.1
NODE_VERSION: 14.19.1
fail-fast: false
name: ${{ matrix.name }}
timeout-minutes: 15
Expand Down Expand Up @@ -183,22 +193,22 @@ jobs:
include:
- name: PostgreSQL 11, PostGIS 3.0
POSTGRES_IMAGE: postgis/postgis:11-3.0
NODE_VERSION: 16.13.0
NODE_VERSION: 16.14.2
- name: PostgreSQL 11, PostGIS 3.1
POSTGRES_IMAGE: postgis/postgis:11-3.1
NODE_VERSION: 16.13.0
NODE_VERSION: 16.14.2
- name: PostgreSQL 11, PostGIS 3.2
POSTGRES_IMAGE: postgis/postgis:11-3.2
NODE_VERSION: 16.13.0
NODE_VERSION: 16.14.2
- name: PostgreSQL 12, PostGIS 3.2
POSTGRES_IMAGE: postgis/postgis:12-3.2
NODE_VERSION: 16.13.0
NODE_VERSION: 16.14.2
- name: PostgreSQL 13, PostGIS 3.2
POSTGRES_IMAGE: postgis/postgis:13-3.2
NODE_VERSION: 16.13.0
NODE_VERSION: 16.14.2
- name: PostgreSQL 14, PostGIS 3.2
POSTGRES_IMAGE: postgis/postgis:14-3.2
NODE_VERSION: 16.13.0
NODE_VERSION: 16.14.2
fail-fast: false
name: ${{ matrix.name }}
timeout-minutes: 15
Expand Down
34 changes: 18 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,32 +112,34 @@ Before you start make sure you have installed:
#### Node.js
Parse Server is continuously tested with the most recent releases of Node.js to ensure compatibility. We follow the [Node.js Long Term Support plan](https://github.com/nodejs/Release) and only test against versions that are officially supported and have not reached their end-of-life date.

| Version | Latest Version | End-of-Life | Compatible |
|------------|----------------|-------------|---------------|
| Node.js 12 | 12.22.7 | April 2022 | ✅ Yes |
| Node.js 14 | 14.18.1 | April 2023 | ✅ Yes |
| Node.js 16 | 16.13.0 | April 2024 | ✅ Yes |
| Version | Latest Version | End-of-Life | Compatible |
|------------|----------------|-------------|--------------|
| Node.js 12 | 12.22.11 | April 2022 | ✅ Yes |
| Node.js 14 | 14.19.1 | April 2023 | ✅ Yes |
| Node.js 16 | 16.14.2 | April 2024 | ✅ Yes |
| Node.js 17 | 17.x | June 2022 | ❌ Not tested |

#### MongoDB
Parse Server is continuously tested with the most recent releases of MongoDB to ensure compatibility. We follow the [MongoDB support schedule](https://www.mongodb.com/support-policy) and only test against versions that are officially supported and have not reached their end-of-life date.

| Version | Latest Version | End-of-Life | Compatible |
|-------------|----------------|--------------|------------|
| MongoDB 4.0 | 4.0.27 | April 2022 | ✅ Yes |
| MongoDB 4.2 | 4.2.17 | TBD | ✅ Yes |
| MongoDB 4.4 | 4.4.10 | TBD | ✅ Yes |
| MongoDB 5.0 | 5.0.3 | January 2024 | ✅ Yes |

| Version | Latest Version | End-of-Life | Compatible |
|-------------|----------------|-------------|------------|
| MongoDB 4.0 | 4.0.28 | April 2022 | ✅ Yes |
| MongoDB 4.2 | 4.2.19 | TBD | ✅ Yes |
| MongoDB 4.4 | 4.4.13 | TBD | ✅ Yes |
| MongoDB 5.0 | 5.0.6 | TBD | ✅ Yes |
| MongoDB 5.1 | 5.1.1 | TBD | ✅ Yes |
| MongoDB 5.2 | 5.2.1 | TBD | ✅ Yes |

#### PostgreSQL
Parse Server is continuously tested with the most recent releases of PostgreSQL and PostGIS to ensure compatibility, using [PostGIS docker images](https://registry.hub.docker.com/r/postgis/postgis/tags?page=1&ordering=last_updated). We follow the [PostgreSQL support schedule](https://www.postgresql.org/support/versioning) and [PostGIS support schedule](https://www.postgis.net/eol_policy/) and only test against versions that are officially supported and have not reached their end-of-life date. Due to the extensive PostgreSQL support duration of 5 years, Parse Server drops support if a version is older than 3.5 years and a newer version has been available for at least 2.5 years.

| Version | PostGIS Version | End-of-Life | Parse Server Support End | Compatible |
|-------------|-----------------|---------------|--------------------------|------------|
| Postgres 11 | 3.0, 3.1, 3.2 | November 2023 | April 2022 | ✅ Yes |
| Postgres 12 | 3.2 | November 2024 | April 2023 | ✅ Yes |
| Postgres 13 | 3.2 | November 2025 | April 2024 | ✅ Yes |
| Postgres 14 | 3.2 | November 2026 | April 2025 | ✅ Yes |
| Postgres 11 | 3.0, 3.1, 3.2 | November 2023 | April 2022 | ✅ Yes |
| Postgres 12 | 3.2 | November 2024 | April 2023 | ✅ Yes |
| Postgres 13 | 3.2 | November 2025 | April 2024 | ✅ Yes |
| Postgres 14 | 3.2 | November 2026 | April 2025 | ✅ Yes |

### Locally
```bash
Expand Down
63 changes: 63 additions & 0 deletions changelogs/CHANGELOG_alpha.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,66 @@
# [5.3.0-alpha.7](https://github.com/parse-community/parse-server/compare/5.3.0-alpha.6...5.3.0-alpha.7) (2022-04-25)


### Bug Fixes

* security upgrade @parse/fs-files-adapter from 1.2.1 to 1.2.2 ([#7948](https://github.com/parse-community/parse-server/issues/7948)) ([20fc4e2](https://github.com/parse-community/parse-server/commit/20fc4e23b53c91aac657f894bd70d049b7525c37))

# [5.3.0-alpha.6](https://github.com/parse-community/parse-server/compare/5.3.0-alpha.5...5.3.0-alpha.6) (2022-04-11)


### Bug Fixes

* peer dependency mismatch for GraphQL dependencies ([#7934](https://github.com/parse-community/parse-server/issues/7934)) ([b7a1d76](https://github.com/parse-community/parse-server/commit/b7a1d7617b4bcac677cecedfeb6ac4a27447083b))

# [5.3.0-alpha.5](https://github.com/parse-community/parse-server/compare/5.3.0-alpha.4...5.3.0-alpha.5) (2022-04-09)


### Bug Fixes

* security upgrade moment from 2.29.1 to 2.29.2 ([#7931](https://github.com/parse-community/parse-server/issues/7931)) ([6b68593](https://github.com/parse-community/parse-server/commit/6b68593eaec17e8b183899d2b92699c9ede7625b))

# [5.3.0-alpha.4](https://github.com/parse-community/parse-server/compare/5.3.0-alpha.3...5.3.0-alpha.4) (2022-04-04)


### Bug Fixes

* custom database options are not passed to MongoDB GridFS ([#7911](https://github.com/parse-community/parse-server/issues/7911)) ([a72b384](https://github.com/parse-community/parse-server/commit/a72b384f76137a3d83ffb69f65cb25aff1bbab4f))

# [5.3.0-alpha.3](https://github.com/parse-community/parse-server/compare/5.3.0-alpha.2...5.3.0-alpha.3) (2022-03-27)


### Features

* add MongoDB 5.2 support ([#7894](https://github.com/parse-community/parse-server/issues/7894)) ([6b4b358](https://github.com/parse-community/parse-server/commit/6b4b358f0842ae920e45652f5e8b2afebc6caf3a))

# [5.3.0-alpha.2](https://github.com/parse-community/parse-server/compare/5.3.0-alpha.1...5.3.0-alpha.2) (2022-03-27)


### Bug Fixes

* security upgrade parse push adapter from 4.1.0 to 4.1.2 ([#7893](https://github.com/parse-community/parse-server/issues/7893)) ([ef56e98](https://github.com/parse-community/parse-server/commit/ef56e98ef65041b4d3b7b82cce3473269c27f6fd))

# [5.3.0-alpha.1](https://github.com/parse-community/parse-server/compare/5.2.1-alpha.2...5.3.0-alpha.1) (2022-03-27)


### Features

* add MongoDB 5.1 compatibility ([#7682](https://github.com/parse-community/parse-server/issues/7682)) ([90155cf](https://github.com/parse-community/parse-server/commit/90155cf1680e5e0499b0000e071c6cb0ce3aef96))

## [5.2.1-alpha.2](https://github.com/parse-community/parse-server/compare/5.2.1-alpha.1...5.2.1-alpha.2) (2022-03-26)


### Performance Improvements

* reduce database operations when using the constant parameter in Cloud Function validation ([#7892](https://github.com/parse-community/parse-server/issues/7892)) ([48bd512](https://github.com/parse-community/parse-server/commit/48bd512eeb47666967dff8c5e723ddc5b7801daa))

## [5.2.1-alpha.1](https://github.com/parse-community/parse-server/compare/5.2.0...5.2.1-alpha.1) (2022-03-26)


### Bug Fixes

* return correct response when revert is used in beforeSave ([#7839](https://github.com/parse-community/parse-server/issues/7839)) ([f63fb2b](https://github.com/parse-community/parse-server/commit/f63fb2b338c908f0e7a648d338c26b9daa50c8f2))

# [5.2.0-alpha.3](https://github.com/parse-community/parse-server/compare/5.2.0-alpha.2...5.2.0-alpha.3) (2022-03-24)


Expand Down
22 changes: 13 additions & 9 deletions ci/nodeEngineCheck.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,17 +75,21 @@ class NodeEngineCheck {

// For each file
for (const file of files) {

// Get node version
const contentString = await fs.readFile(file, 'utf-8');
const contentJson = JSON.parse(contentString);
const version = ((contentJson || {}).engines || {}).node;

// Add response
response.push({
file: file,
nodeVersion: version
});
try {
const contentJson = JSON.parse(contentString);
const version = ((contentJson || {}).engines || {}).node;

// Add response
response.push({
file: file,
nodeVersion: version
});
} catch(e) {
console.log(`Ignoring file because it is not valid JSON: ${file}`);
core.warning(`Ignoring file because it is not valid JSON: ${file}`);
}
}

// If results should be cleaned by removing undefined node versions
Expand Down
Loading