You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Both the Config and State types have a Version int field in them so that when decoding a config or state object, I can know if they were encoded first with an older version of the config.
This is a stop-gap solution to make it merely possible to handle a breaking change in the layout of these types, but it doesn't provide a solution for doing breaking changes to these types and writing migrations/remedies for upgrading old Config/State values to new versions.
So we need to make a mechanism to (for both State and Config, using only Config as an example here):
make it possible to decode Config values from any previous version
migrate a Config version v-1 to a version v (à la go fix), prompting for user input if necessary (see the huh package)
create a pipeline that can take any Config at version v-n and bring it to version v (prompting for user input if necessary)
this should all be testable and tested
it should be easy to write new migrations for breaking changes
The text was updated successfully, but these errors were encountered:
Both the
Config
andState
types have aVersion int
field in them so that when decoding a config or state object, I can know if they were encoded first with an older version of the config.This is a stop-gap solution to make it merely possible to handle a breaking change in the layout of these types, but it doesn't provide a solution for doing breaking changes to these types and writing migrations/remedies for upgrading old Config/State values to new versions.
So we need to make a mechanism to (for both
State
andConfig
, using onlyConfig
as an example here):Config
values from any previous versionConfig
versionv-1
to a versionv
(à lago fix
), prompting for user input if necessary (see thehuh
package)Config
at versionv-n
and bring it to versionv
(prompting for user input if necessary)The text was updated successfully, but these errors were encountered: