Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Logging retrieved db config values before using default values
With reference to this commit: #975 (comment) So we have two key things to solve: - Unnecessary variables like PATH, that may vary for each user to be removed (helps avoid "apple security" values). - Need to see ENV vars values before being modified by default values in config.get() lines. Two approaches: 1. Delete PATH, PYTHONPATH from the retrieved config. - This wouldn't help much since we still need to handle the scenario when db config environment values haven't been set. 2. Using another config dictionary before modifying with default values - If db config related keys exist, set it to the value from the retrieved config. - Else if key does not exist in retrieved config, which means config file not present AND environment variables not set, then set it to None. Note: - This is not the same as changing the retrieved config value as the original dictionary is still intact. - Additionally, in the case where config file not present AND environment variables not set, there are no values to before modifying with default values. So manually setting to None should be okay.
- Loading branch information