You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@couchdb.apache.org by "big-r81 (via GitHub)" <gi...@apache.org> on 2024/01/01 13:57:38 UTC

[PR] rfc(SSOT): Add Single Source of Truth (SSOT) configuration system [couchdb]

big-r81 opened a new pull request, #4935:
URL: https://github.com/apache/couchdb/pull/4935

   Initial ideas of a Single Source Of Truth config system for CouchDB.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@couchdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] rfc(SSOT): Add Single Source of Truth (SSOT) configuration system [couchdb]

Posted by "rnewson (via GitHub)" <gi...@apache.org>.
rnewson commented on PR #4935:
URL: https://github.com/apache/couchdb/pull/4935#issuecomment-1876059778

   Before we get too deep into this I'd like to see us tidy up what we currently have Specifically;
   
   move code defaults to priv config files:
   
   Like `stats_descriptions.cfg`, for each application create a file called `config_defaults.cfg`. This file could look like;
   
   ```
   #{
     couchdb => #{
       max_dbs_open => #{
         default => 500,
         description => <<"Maximum number of .couch files to open at once. ...">>
       }
     }
   }
   ```
   
   These files would _replace_ the commented out items in `default.ini`. An endpoint could be added to return this data (but not allow them to be modified).
   
   `config:get/2` would be enhanced to retrieve the default from these config files (if present, `undefined` if not) and all uses of `config:get/3` would be removed, so that the only copy of the default value for a given config item is in the `config_defaults.cfg`.
   
   This means `default.ini` is empty except for things like `database_dir` with an actual install-specific value (whether from dev/run or a package install. Arguably it could be eliminated entirely and all of those settings could be in `local.ini`.
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@couchdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org