etcd: use testcontainers to run etcd in tests - #4244
Open
sri-adarsh-kumar wants to merge 2 commits into
Open
Conversation
Signed-off-by: Sri Adarsh Kumar <sri.adarsh.kumar+gh@zalando.de>
sri-adarsh-kumar
force-pushed
the
sri-adarsh-kumar/issue-2451
branch
from
September 4, 2026 06:01
464a0f2 to
a001ba3
Compare
Contributor
Author
|
There seem to be flaky TestTracingProxySpanWithTeeLoopbackFilter test. So closing and reopening. |
sri-adarsh-kumar
marked this pull request as ready for review
September 4, 2026 07:24
szuecs
reviewed
Sep 4, 2026
| return (1 << 15) + rand.Intn(1<<15) // #nosec | ||
| } | ||
| const ( | ||
| etcdImage = "gcr.io/etcd-development/etcd:v3.5.18" |
Member
There was a problem hiding this comment.
does it work if we would switch to "latest"?
Contributor
Author
There was a problem hiding this comment.
Checked with my agent.
- The registry has no :latest tag.
- In etcd 3.6+, upstream completely removed the v2 storage engine and --enable-v2 flag.
- Because skipper/etcd is an HTTP v2 client (/v2/keys), it requires etcd <= 3.5.x until Skipper migrates the client to etcd v3 gRPC API in a separate initiative.
If you wish, I can make a separate issue to do the migration.
szuecs
reviewed
Sep 4, 2026
|
|
||
| Urls = makeLocalUrls(randPort(), randPort()) | ||
| clientUrlsString := strings.Join(Urls, ",") | ||
| ctx, cancel := context.WithTimeout(context.Background(), 40*time.Second) |
Member
There was a problem hiding this comment.
we depend on external docker registries that are throttled if you have a lot of runs a day. I would suggest to have at least 2 minutes as timeout
szuecs
reviewed
Sep 4, 2026
| if binary == "" { | ||
| binary = "etcd" | ||
| } | ||
| endpointCtx, endpointCancel := context.WithTimeout(context.Background(), 5*time.Second) |
Member
There was a problem hiding this comment.
please refactor and use a const endpointTimeout = time.Minute instead of fixed 5*time.Second.
Signed-off-by: Sri Adarsh Kumar <sri.adarsh.kumar+gh@zalando.de>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Replaces host etcd process management in
etcd/etcdtestwithtestcontainers-goand removes host binary download scripts.Updates test suites to cleanly skip etcd container startup under
-test.short.Fixes #2451
Please add a gen-ai label if present.