Hi, just a disclaimer, I’m very new to the remote config package.
I’m wondering, what is the best practices for managing settings on multiple environments?
I see a couple options:
- Manually making sure that the keys are all present in both environments
- Using default values with ConfigManager.appConfig.GetX(key, defaultValue)
- Using HasKey and only getting the value if the key is there
Now obviously 2 and 3 are conceptually similar, so I’ll collapse them together. However I’m not sure what the best approach is though. On the one hand, using the first option is tedious, and can seem a bit error prone.
But the other solution can sort of silently fail, if I expect a key to be there, but I forgot to assign it.
I think the ideal solution here would be to sort of sync the keys between all environments, perhaps with some default value. This way it feels much less error prone when adding them, and you don’t silently fail if a key is missing as well.
However if that last thing is not possible, what are the best practices here?