-
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
Add downgrade cancellation e2e tests #19244
Add downgrade cancellation e2e tests #19244
Conversation
547c87e
to
e1cbb11
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted filessee 21 files with indirect coverage changes @@ Coverage Diff @@
## main #19244 +/- ##
==========================================
- Coverage 68.88% 68.78% -0.11%
==========================================
Files 420 420
Lines 35689 35689
==========================================
- Hits 24585 24548 -37
- Misses 9683 9716 +33
- Partials 1421 1425 +4 Continue to review full report in Codecov by Sentry.
|
e1cbb11
to
f1ff53e
Compare
d5d064b
to
4b25f0f
Compare
bb4669c
to
b795e73
Compare
/retest |
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
if triggerCancellation == cancelRightBeforeEnable { | ||
t.Logf("Cancelling downgrade before enabling") | ||
e2e.DowngradeCancel(t, epc, generateIdenticalVersions(clusterSize, currentVersionStr)) | ||
return // No need to perform downgrading, end the test here |
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 the test should have some validation, like check if cluster version of all members. For cancellation before and right after enable we the cluster version should stay the same. Also would be good to confirm the state of downgrade.
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.
Maybe I am missing something.
The generateIdenticalVersions function generates the versions for the nodes that should be checked against already, no?
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.
Oh, I didn't noticed that e2e.DowngradeCancel
is also doing validation. Any reason to combine it? I would recommend to either split it or make it clear from function name that you are validating.
Like
epc.Etcdutl().DowngradeCancel(context.TODO())
e2e.ValidateMemberVersions(epc, currentVersionStr)
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.
Like
epc.Etcdutl().DowngradeCancel(context.TODO()) e2e.ValidateMemberVersions(epc, currentVersionStr)
+1. It's OK to do it in a separate PR.
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.
+1 to add a util function of ValidateMemberVersions
to verify versions based on the binary path of each process.
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.
Doing it here now since all reviewers have consensus on abstracting this out
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.
@serathius the reason was that I looked at how DowngradeEnable
is doing it, and thus combined it!
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.
@siyuanfoundation should we use binary path
? Or like what I currently do is by constructing node version array from known information (as we know which nodes are downgraded)
if triggerCancellation == cancelRightBeforeEnable { | ||
t.Logf("Cancelling downgrade before enabling") | ||
e2e.DowngradeCancel(t, epc, generateIdenticalVersions(clusterSize, currentVersionStr)) | ||
return // No need to perform downgrading, end the test here |
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.
+1 to add a util function of ValidateMemberVersions
to verify versions based on the binary path of each process.
b795e73
to
2df6942
Compare
pls fix the DCO failure. |
2df6942
to
82f30d1
Compare
Please rebase & squash the commits and resolve the DCO failure |
Note that we resolve a test regression this week, rebasing this PR should be able resolve the workflow failures. |
82f30d1
to
88a70c8
Compare
Signed-off-by: Chun-Hung Tseng <henrytseng@google.com> Co-authored-by: Benjamin Wang <benjamin.wang@broadcom.com> Signed-off-by: Chun-Hung Tseng <henrybear327@users.noreply.github.com>
Signed-off-by: Chun-Hung Tseng <henrytseng@google.com> Signed-off-by: Chun-Hung Tseng <henrybear327@users.noreply.github.com>
88a70c8
to
a3c072c
Compare
|
Signed-off-by: Chun-Hung Tseng <henrybear327@users.noreply.github.com>
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
Thank you.
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: ahrtr, henrybear327 The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Part 1 of the e2e test - downgrade cancellation is called before any of the node is actually downgraded
A README fix was also associated with this PR, as downgrade command doesn't seem to take version as a parameter.
Reference: #17976
Please read https://github.com/etcd-io/etcd/blob/main/CONTRIBUTING.md#contribution-flow.