feat:config:force existing users to opt into new defaults (#10488)
* Config default does not comment out EnableSplitstore * Loadability check * Remove test used for debugging * regexp for properly safe check that config is set * regexp for safely matching the EnableSpitstore field in the config * Add instructions for undeleting config and remind users to set splitstore false for full archive * UpdateConfig small docs and functional opts * make gen * Lint * Fix * nil pointer check on validate * Unit testing of EnableSplitstore cases * Address Review --------- Co-authored-by: zenground0 <ZenGround0@users.noreply.github.com>
This commit is contained in:
+9
-1
@@ -545,7 +545,15 @@ func (fsr *fsLockedRepo) Config() (interface{}, error) {
|
||||
}
|
||||
|
||||
func (fsr *fsLockedRepo) loadConfigFromDisk() (interface{}, error) {
|
||||
return config.FromFile(fsr.configPath, fsr.repoType.Config())
|
||||
var opts []config.LoadCfgOpt
|
||||
if fsr.repoType == FullNode {
|
||||
opts = append(opts, config.SetCanFallbackOnDefault(config.NoDefaultForSplitstoreTransition))
|
||||
opts = append(opts, config.SetValidate(config.ValidateSplitstoreSet))
|
||||
}
|
||||
opts = append(opts, config.SetDefault(func() (interface{}, error) {
|
||||
return fsr.repoType.Config(), nil
|
||||
}))
|
||||
return config.FromFile(fsr.configPath, opts...)
|
||||
}
|
||||
|
||||
func (fsr *fsLockedRepo) SetConfig(c func(interface{})) error {
|
||||
|
||||
Reference in New Issue
Block a user