parse-server icon indicating copy to clipboard operation
parse-server copied to clipboard

Run test suite against enableSchemaHooks

Open dplewis opened this issue 2 years ago • 8 comments

New Feature / Enhancement Checklist

Feature / Enhancement Description

There is a post on discourse about enableSchemaHooks not being supported https://community.parseplatform.org/t/parseerror-130-option-enableschemahooks-is-not-supported-since-5-3-0/3041

Running the test suite will allow us to catch errors as the code base improves or Mongo updates.

I did it on my fork and only found 1 issue https://github.com/dplewis/parse-server/pull/2

dplewis avatar Dec 19 '22 19:12 dplewis

Thanks for opening this issue!

  • ❌ Please edit your post and use the provided template when creating a new issue. This helps everyone to understand your post better and asks for essential information to quicker review the issue.

You mean running all tests with and without schema hooks enabled?

mtrezza avatar Dec 20 '22 16:12 mtrezza

the issue is that enableSchemaHooks is being passed to GridFSBucketAdapter

and enableSchemaHooks is not a valid mongo db connection option.

it'd be better to split this out into it's own option instead of mixing it with mongo db connection options.

const filesControllerAdapter = loadAdapter(filesAdapter, () => { // this line of code fixes it delete databaseOptions.enableSchemaHooks;
return new GridFSBucketAdapter(databaseURI, databaseOptions, fileKey);
});

image

tomgrowflow avatar Sep 28 '23 14:09 tomgrowflow

I'm running into this issue now and it's preventing us from upgrading from v 4.x to 5.5.3, any way we can get this pr merged?

note: we are using parse docker image

image: parseplatform/parse-server:5.5.3

and setting environment variables..

  • name: PARSE_SERVER_DATABASE_OPTIONS value: '{"enableSchemaHooks":true,"maxPoolSize":10,"compressors":"zlib","useNewUrlParser":true,"useUnifiedTopology":true}'

tomgrowflow avatar Sep 28 '23 14:09 tomgrowflow

this pr looks to fix it but it's not back ported to version 5

https://github.com/parse-community/parse-server/pull/8467/files

tomgrowflow avatar Sep 28 '23 17:09 tomgrowflow

@tomwilsond1 The PR you mentioned is not backported to 5.x because only security vulnerabilities are backported to LTS versions. The PR looks pretty simple though, if you would like to open a PR against the 5.x branch with the same changes we'll gladly review it. This would need to be done soon though, because Parse Server 5 will be out of LTS in 3 months, and from then on it won't receive any maintenance anymore and will be archived. Due to that it may make more sense for you to upgrade to Parse Server 6 directly, which will already be in LTS from Jan 2024.

mtrezza avatar Oct 01 '23 16:10 mtrezza

we are pretty deep into migrating from 4->5 and this is the last blocking issue for us, would it be possible to merge this fix into 5.x and complete a hotfix?

https://github.com/parse-community/parse-server/pull/8773/files

tomgrowflow avatar Oct 10 '23 15:10 tomgrowflow

Sure, we'll be happy to review and merge your PR within the LTS time frame.

mtrezza avatar Oct 10 '23 19:10 mtrezza