parse-community / parse-community/parse-server
database options enableSchemaHooks true not setting when using parse-server docker image 5.5.3
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 21.4k
- Forks
- 4.8k
- Avg merge
- 7h 45m
- Merged PRs (30d)
- 11
Description
New Issue Checklist
- [ x] I am not disclosing a vulnerability.
- [ x] I am not just asking a question.
- [ x] I have searched through existing issues.
- [ x] I can reproduce the issue with the latest version of Parse Server.
Issue Description
I'm unsure if enableSchemaHooks is being enabled when running parse server through published docker container.
my environment variables are as follows:
PARSE_SERVER_DATABASE_OPTIONS: '{"maxPoolSize":10,"compressors":"zlib","useNewUrlParser":true,"useUnifiedTopology":true,"enableSchemaHooks":true}'
when parse server boots up, I get the following in my database options
databaseOptions: {"maxPoolSize":10,"compressors":"zlib","useNewUrlParser":true,"useUnifiedTopology":true}
also attempted to use PARSE_SERVER_DATABASE_ENABLE_SCHEMA_HOOKS: true which was in defintiions.js
module.exports.DatabaseOptions = {
enableSchemaHooks: {
env: 'PARSE_SERVER_DATABASE_ENABLE_SCHEMA_HOOKS',
help:
'Enables database real-time hooks to update single schema cache. Set to true if using multiple Parse Servers instances connected to the same database. Failing to do so will cause a schema change to not propagate to all instances and re-syncing will only happen when the instances restart. To use this feature with MongoDB, a replica set cluster with change stream support is required.',
action: parsers.booleanParser,
default: false,
},
};
Steps to reproduce
docker run parseplatform/parse-server:5.5.3 -e PARSE_SERVER_DATABASE_OPTIONS: '{"maxPoolSize":10,"compressors":"zlib","useNewUrlParser":true,"useUnifiedTopology":true,"enableSchemaHooks":true}'
Actual Outcome
enableSchemaHooks is missing from output of database options, so unsure if it's enabled.
Expected Outcome
enableSchemaHooks shows in database debug options
Environment
5.5.3
Server
- Parse Server version:
5.5.3 - Operating system:
ubuntu - Local or remote host (AWS, Azure, Google Cloud, Heroku, Digital Ocean, etc):
local
Database
- System (MongoDB or Postgres):
MongoDB - Database version:
5 - Local or remote host (MongoDB Atlas, mLab, AWS, Azure, Google Cloud, etc):
local
Client
- SDK (iOS, Android, JavaScript, PHP, Unity, etc):
node - SDK version:
node 16
Logs
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the reported configuration with the parseplatform/parse-server:5.5.3 Docker command and compare the resulting databaseOptions output. Start with definitions.js and trace how PARSE_SERVER_DATABASE_OPTIONS and PARSE_SERVER_DATABASE_ENABLE_SCHEMA_HOOKS are parsed; done means the documented setting is applied and its behavior or debug output is covered by a regression test.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, javascript, mongodb, nodejs
- Domain
- backend, databases, devops
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100