Skip to content

Ignore invalid gitlab.rb config, and instead just print a warning

DJ Mountney requested to merge ingore-invalid-config into master

MixLib Config already dynamically sets config when you set it, which is how our Mash's are being set. But errors out with NilClass errors when you try to access something that hasn't been set.

With this change, when you try to access a config method that has never been set, you will be given a reference to a Mash that is meant to represent unsupported config. This Mash is forcibly flat, which allows you to enlessly try and set nested config, yet only end up with a flat Mash.

I haven't decided yet if this change is good, or REALLY bad.

If you set some valid config to an invalid value like: gitlab_rails['time_zone'] = UTC

(which is invalid because UTC is supposed to be a string) UTC will instead hit method missing, become our Mash, and not error out. It will print the warning though.

Edited by GitLab Release Tools Bot

Merge request reports