You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A Parse Server option cannot be set via environment variable if it is part of an interface. The reason seems to be that buildConfigDefinitions.js generates Definitions.js and adds the definitions for each interface into a separate module export. These definitions are then not part of module.exports.ParseServerOptions which seems to be the only export the Parse Server CLI considers.
Side note, that logic seems to be the reason why older Parse Server are all on the same root level and not grouped in nested objects, which is to consider for #7069.
Steps to reproduce
For example, idempotencyOptions has these sub keys:
idempotencyOptions: {paths: ...,ttl: ...,}
The Definitions.js file only contains the root key PARSE_SERVER_EXPERIMENTAL_IDEMPOTENCY_OPTIONS in module.exports.ParseServerOptions. The CLI runner only imports module.exports.ParseServerOptions therefore, setting environment variable PARSE_SERVER_EXPERIMENTAL_IDEMPOTENCY_PATHS has no effect when initializing Parse Server.
Actual Outcome
All interfaces should be configurable via environment variables.
Expected Outcome
Only root key is configurable via environment variable.
Workaround
E.g. for idempotencyOptions the root key value can be set to an encoded object:
New Issue Checklist
Issue Description
A Parse Server option cannot be set via environment variable if it is part of an interface. The reason seems to be that
buildConfigDefinitions.js
generatesDefinitions.js
and adds the definitions for each interface into a separate module export. These definitions are then not part ofmodule.exports.ParseServerOptions
which seems to be the only export the Parse Server CLI considers.Side note, that logic seems to be the reason why older Parse Server are all on the same root level and not grouped in nested objects, which is to consider for #7069.
Steps to reproduce
For example,
idempotencyOptions
has these sub keys:The
Definitions.js
file only contains the root keyPARSE_SERVER_EXPERIMENTAL_IDEMPOTENCY_OPTIONS
inmodule.exports.ParseServerOptions
. The CLI runner only importsmodule.exports.ParseServerOptions
therefore, setting environment variablePARSE_SERVER_EXPERIMENTAL_IDEMPOTENCY_PATHS
has no effect when initializing Parse Server.Actual Outcome
All interfaces should be configurable via environment variables.
Expected Outcome
Only root key is configurable via environment variable.
Workaround
E.g. for
idempotencyOptions
the root key value can be set to an encoded object:Failing Test Case / Pull Request
Environment
Server
4.5.0
irrelevant
irrelevant
Database
irrelevant
irrelevant
irrelevant
Client
irrelevant
irrelevant
Logs
The text was updated successfully, but these errors were encountered: