-
Notifications
You must be signed in to change notification settings - Fork 9.8k
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
etcdutl: Implement migrate --force command #13220
Conversation
e9c9433
to
e7df6c0
Compare
0f26fe5
to
fdbeac5
Compare
Fixed all issues, PTAL. |
/lgtm |
4ea35fa
to
0ddc5b3
Compare
force: o.force, | ||
} | ||
var err error | ||
dotCount := strings.Count(o.targetVersion, ".") |
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.
Would the line 82 succeed if the version didn't contain "." ?
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.
No, semver parsing always requires "Major.Minor.Patch". Here we just hardcode patch to 0.
I think we should have a special struct just to represent "Major.Minor" instead of reusing semver
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 see: It's just about adding more human friendly error...
8becbbf
to
2f8532d
Compare
Co-authored-by: nic-chen <[email protected]> Co-authored-by: Heisenberg <[email protected]>
#13168
Part of #13168
This PR adds an
etcdutl migrate --force
command that is able to migrate schema of data located in etcd data dir. Implementing only force as we need an escape hatch for uses that depend on running etcd from older versions.Implementation of migrate will be added in next milestones when we will have full schema in place.
cc @lilic @ptabor