bazelbuild / bazelisk

A user-friendly launcher for Bazel.
Apache License 2.0
2.05k stars 316 forks source link

Exponential Backoff Test Intermittency #496

Closed thebeanogamer closed 8 months ago

thebeanogamer commented 1 year ago

I'm currently working on packaging Bazelisk for Fedora, which means that I'm currently re-running the tests a lot on Bazelisk 1.18.0.

I've been seeing some intermittency on the below test, approximately 1/5 builds will fail because of this.

go test -buildmode pie -compiler gc -ldflags " -X github.com/bazelbuild/bazelisk/version=1.18.0 -extldflags '-Wl,-z,relro -Wl,--as-needed  -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1  -Wl,--build-id=sha1 -specs=/usr/lib/rpm/redhat/redhat-package-notes  '"

...

github.com/bazelbuild/bazelisk/httputil
--- FAIL: TestShouldUseExponentialBackoffIfNoRetryHeader (0.00s)
    httputil_test.go:182: Expected a total sleep time between 32s and 34.5s (5 retries, exponential backoff with fuzzing), but waited 31.562s instead
FAIL
exit status 1

I'm not really familiar enough with the Bazelisk codebase to fix this myself, but am happy to help with troubleshooting.

fweikert commented 8 months ago

Thanks for the report - the issue should have been fixed by https://github.com/bazelbuild/bazelisk/pull/530