Skip to content

Simplify _CONFIG object structure #3895

Open
Open
@acuarica

Description

@acuarica

The _CONFIG object that holds the environment variables configuration requires each entry to have an envName property. This property is actually equal to its outer key, for example

  BATCH_REQUESTS_ENABLED: {
    envName: 'BATCH_REQUESTS_ENABLED',
    type: 'boolean',
    required: false,
    defaultValue: true,
  },

This is redundant, and may confuse newcomers wanting to contribute to the Relay.

Moreover, it seems this property is not used anywhere besides the loggerService. However, this can be easily replaced by either using the key directly (and making it type safe), or by including an optional field that declares if the entry should be masked or not.

Once envName had been replaced in loggerService, we should remove it from _CONFIG object.

Additionally, in the same loggerService, the KNOWN_SECRET_PREFIXES field is not used and it should be removed as well.

Metadata

Metadata

Assignees

No one assigned

    Labels

    internalFor changes that affect the project's internal workings but not its outward-facing functionality.

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions