Enable requests for a specific config version |
||
Issue descriptionThis is to make the release process smoother in situations when there is a breaking config change. Example: https://chromium-review.googlesource.com/c/infra/infra/+/822418 When we want to switch to a new app version supporting a new version of the config, we end up in a broken state when we only read the latest config. In that situation we have the AppOld, AppNew, ConfigOld, and ConfigNew. We start with AppOld/ConfigOld and want to get to AppNew/ConfigNew. Both AppOld/ConfigNew and AppNew/ConfigOld breaks the service, but if we can instead have App(Config) we can pick the config and do a direct switch from AppOld/ConfigOld to AppNew/ConfigNew.
,
Dec 13 2017
The way I did it before a bunch of times: 1. Add ConfigNew structures to _existing_ config, perhaps duplicating old config. AppOld keeps using old configs, ignoring new stuff. 2. Update OldApp to NewApp, so it start reading new config structures (ignoring old ones). 3. Delete old config structures, leaving only the new ones. 4. Cleanup code to not mention old config structures at all.
,
Dec 13 2017
That seems like a good way to do it when the config change introduces new structures. Although, in some cases, the config may not introduce new structures, but instead different possible values for some fields. (Example: Recently there was a change of a "host" field from "https://<domain>" to "<domain>".)
,
Dec 14 2017
I agree. That seems like a good way to do it. For the case qyearsley mentions, we did sort of do it that way - it currently accept both values due to some extra code in the App. I think I'll force out the new config format with some babysitting this time around, but I'll add a section to the playbook about this for future changes. This becomes more important after dogfooding has started.
,
Dec 14 2017
|
||
►
Sign in to add a comment |
||
Comment 1 by emso@chromium.org
, Dec 13 2017