-
Notifications
You must be signed in to change notification settings - Fork 9.7k
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
tests/common/lease: Wait for correct lease list response #13868
Conversation
Shouldn't |
@serathius not as implemented in v3 afaict - etcd/server/etcdserver/v3_server.go Lines 364 to 371 in 0d5c1dc
|
I think we should make the |
I assume it wasn't in the first place because it's a mostly informational api that's easy to overlook, but I can't find more discussion around it in the initial PR than this (#8358 (comment)). As for how to make this Linearizable, it looks like that should be fairly easy, just a little bit weird because the LeaseHTTP package has a couple of different ways of doing things. I can open a PR if that's what we'd rather do instead (but that might have to wait for 3.6) |
Agree that intuitively I think it's pretty serious change to make it as part of stable v3.* line and violating formal backward compatibility guarantees to change the default. I would:
This way we would cleanup also the naming mistake (I assume) and have safe default going forward. |
@ptabor Sounds good - I can open a PR for that soon. Do we wanna merge this to stabilize CI in the meantime (given that I assume a feature PR will take longer to land, and this is currently the flakiest etcd test) |
I think it makes more sense to skip the test case for now instead of delivering a fix for an unexpected behavior. Once the formal fix/enhancement is ready, we can enable it again. |
@ptabor Does adding @endocrimes @ahrtr For now we are only deprecating |
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.
Please use revision in eventually check
9142db1
to
32a5b39
Compare
We don't consistently reach the same etcd server during the lifetime of a test and in some cases, this means that this test will flake if an etcd server was slow to update its state and the test hits the outdated server. Here we switch to using an `Eventually` case which will wait upto a second for the expected result before failing - with a 10ms gap between invocations. ``` [tests(dani/leasefix)] $ gotestsum -- ./common -tags integration -count 100 -timeout 15m -run TestLeaseGrantAndList ✓ common (2m26.71s) DONE 1600 tests in 147.258s ```
32a5b39
to
f71196d
Compare
Codecov Report
@@ Coverage Diff @@
## main #13868 +/- ##
==========================================
+ Coverage 72.51% 72.56% +0.05%
==========================================
Files 468 468
Lines 38255 38255
==========================================
+ Hits 27739 27760 +21
+ Misses 8734 8718 -16
+ Partials 1782 1777 -5
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
Seems good.
|
We don't consistently reach the same etcd server during the lifetime of
a test and in some cases, this means that this test will flake if an
etcd server was slow to update its state and the test hits the outdated
server.
Here we switch to using an
Eventually
case which will wait upto asecond for the expected result before failing - with a 10ms gap between
invocations.