-
Notifications
You must be signed in to change notification settings - Fork 42
Auto-Migration #406
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Auto-Migration #406
Conversation
MorquinDevlar
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think is a good idea, although I don't see any kind of backup being taken before migration is done. If migration fails, there is seemingly no way to get back to the previous version.
Also, I don't see any validation for loading zone config's, and potentially adding missing ones before migration. Just an observation.
| func (v Version) IsOlderThan(other Version) bool { | ||
| return v.Compare(other) <= Older | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wouldn't this consider equal versions as older than each other? I would think this should be just < Older
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This < in this case is technically doing a comparison vs. a constant taht's returned. It should really be =.
Fixed.
A full backup would probably be a decent idea, and then a revert on failure... I'll implement something simple for that. I'll add some logic to check for a zone-config as well. If it already exists, we can probably ignore the migration for that file... it's should be harmless to leave it in there. |
Description
This defines a basic process for including auto-correcting/updating of datafiles etc. when users upgrade to a new binary version.
Changes
--versioncan be used when running gomud to display version and quit0.9.1