Unable to use "local" application config files for database.json with user specified config environments #22
Labels
No labels
bug
confirmed
critical
discussion
documentation
Doing
enhancement
suggestion
support
To Do
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: hazaar/hazaar-dbi#22
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The
DBI::Adapter
class has a feature where it is possible to specify the config environment when instantiating the object. This allows us to have multiple configurations stored in thedatabase.json
file that can be used anywhere in the application.This may turn out to not be the right way to do this. Previously, this was working fine until I introduced the concept of local configuration overrides. The overrides allow configurations to be specified for the local machine and not stored in the actual application. A prime example of their use is for storing IP addresses for services as the same application may be distributed but want to connect to different things, for say, caching.
The problem I have is with an application
database.json
file that has multiple config environments specified, one of which is a user-specified. This user environment is then referred to specifically when instantiating the Adapter object to load a concurrent database connection to the default one. In this case, this will be localhost. However, in the local development environment this needs to be another server.Normally it would be possible to just specify a local override config, however these local overrides are loaded regardless of the application environment, so therefore the config environments are not specified in the override files themselves. Which means there is no way to reference a specific database config in a local override file.
added ~160 label
created merge request !7 to address this issue
mentioned in merge request !7
closed via merge request !7
closed via commit
efc816ddde
mentioned in commit
efc816ddde