parse-community / parse-community/parse-server

database options enableSchemaHooks true not setting when using parse-server docker image 5.5.3

Open
#8,751 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

type:bug
Dominant language
JavaScript
Stars
21.4k
Forks
4.8k
Avg merge
7h 45m
Merged PRs (30d)
11

Description

New Issue Checklist
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.