ems-backend icon indicating copy to clipboard operation
ems-backend copied to clipboard

feat/AB#78819 improve environment configuration management in backend

Open GuilhermeGabriel opened this issue 2 years ago • 0 comments

Description

Currently, we have different configuration files for different environments, the idea would be to have three levels of overriding:

default.js (contains the default settings between all environments) who.js (contains the default settings between all who environments) who-XXX.js (contains the environment-specific settings for a who environment) (there will be who-uat.js, who-sit.js, who-dev.js, and who-prod.js)

  • Need to set ALLOW_CONFIG_MUTATIONS=true in the environment variables to allow the config to be mutated

Useful links

  • Please insert link to ticket: (I don't have access)

Type of change

  • [x] New feature (non-breaking change which adds functionality)
  • [x] Improvement (refactor or addition to existing functionality)

How Has This Been Tested?

Checked if the environments were overridden after the execution of mergeWhoConfigs()

Screenshots

Screenshot 2023-12-12 at 10 28 58

Checklist:

( * == Mandatory )

  • [x] * I have set myself as assignee of the pull request
  • [x] * My code follows the style guidelines of this project
  • [x] * Linting does not generate new warnings
  • [x] * I have performed a self-review of my own code
  • [x] * I have put the ticket for review, adding the oort-backend team to the list of reviewers
  • [x] * I have commented my code, particularly in hard-to-understand areas
  • [x] * I have put JSDoc comment in all required places
  • [x] * My changes generate no new warnings
  • [x] * I have included screenshots describing my changes if relevant
  • [x] * I have selected labels in the Pull Request, according to the changes with code brings
  • [ ] I have made corresponding changes to the documentation ( if required )
  • [ ] I have added tests that prove my fix is effective or that my feature works
  • [ ] New and existing unit tests pass locally with my changes
  • [ ] Any dependent changes have been merged and published in downstream modules

More explanation

https://www.loom.com/share/05a716d61b9744faaf51fb304c21d1e5?sid=f87cf896-582a-4f76-93ae-8ceed801b145

GuilhermeGabriel avatar Dec 12 '23 05:12 GuilhermeGabriel