-
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
e2e test: add schema version verification in mix_version_test. #17881
base: main
Are you sure you want to change the base?
Conversation
/retest |
506450d
to
e899f7c
Compare
e899f7c
to
252d6d9
Compare
/retest |
252d6d9
to
e21756b
Compare
cc @ahrtr |
/retest |
b7f6a39
to
bad484f
Compare
The existing schemaChanges isn't flexible. Propose to add the following changes, and we can construct the the
|
bad484f
to
892abc2
Compare
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.
LGTM
Thanks
cc @serathius to take a look |
Signed-off-by: Siyuan Zhang <sizhang@google.com>
Signed-off-by: Siyuan Zhang <sizhang@google.com>
892abc2
to
56fab21
Compare
if newFields, found := newFieldsMapping[v]; found { | ||
return newFields | ||
} | ||
return nil |
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.
Should panic/error if user calls with invalid version.
}, | ||
} | ||
// schemaChanges list changes that were introduced in a particular version. | ||
// schema was introduced in v3.6 as so its changes were not tracked before. | ||
schemaChanges = newFieldMappingsToSchemaChanges(newFieldsMapping) |
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.
Don't like this change, it limits the possible schema changes to just adding new empty fields.
} | ||
lg.Info("verify no new storage schema field is present in the db file of last release process") | ||
nextEtcdVer := semver.Version{Major: currentEtcdVer.Major, Minor: currentEtcdVer.Minor + 1} | ||
newFields := schema.NewFieldsForVersion(nextEtcdVer) |
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.
Validating consistency of schema should be a feature of schema package. Same as bbolt consistency check, schema should be able to confirm that fields presents and their values are consistent with storage version value.
PR needs rebase. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
@siyuanfoundation: The following tests failed, say
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
#17361
#17752
Verify storage version is consistent with expected at the end of tests.
Since
storageVersion
is the only field added in 3.6, there is no need to check other buckets.Please read https://github.com/etcd-io/etcd/blob/main/CONTRIBUTING.md#contribution-flow.