-
Notifications
You must be signed in to change notification settings - Fork 322
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
Bazelisk 1.24 downloads over and over again #640
Comments
I also noticed the same issue, @fweikert |
meteorcloudy
added
type:bug
Something isn't working
P1
I'll work on this now. (Assignee required)
labels
Nov 25, 2024
fweikert
added a commit
to fweikert/bazelisk
that referenced
this issue
Nov 25, 2024
The refactoring in bazelbuild#631 introduced a performance regression: With latest and last_rc the code traversed *all* GCS buckets for *every* Bazel track. This commit restores the previous, correct behavior: Traversal will be stopped as soon as a matching version as been found. Moreover, this commit adds a test to prevent similar problems in the future. Fixes bazelbuild#640 Drive-by fix: Replaced \"%s\" with %q.
fweikert
added a commit
to fweikert/bazelisk
that referenced
this issue
Nov 25, 2024
The refactoring in bazelbuild#631 introduced a performance regression: With latest and last_rc the code traversed *all* GCS buckets for *every* Bazel track. This commit restores the previous, correct behavior: Traversal will be stopped as soon as a matching version has been found. Moreover, this commit adds a test to prevent similar problems in the future. Fixes bazelbuild#640 Drive-by fix: Replaced \"%s\" with %q.
fweikert
added a commit
to fweikert/bazelisk
that referenced
this issue
Nov 25, 2024
The refactoring in bazelbuild#631 introduced a severe performance regression: With latest and last_rc the code traversed *all* GCS buckets for *every* Bazel track. Since we send one HTTP request per bucket, this behavior led to a significant increase in HTTP requests ( >140 instead of 2-3 requests). This commit restores the previous, correct behavior: Traversal will be stopped as soon as a matching version has been found. Moreover, this commit adds a test to prevent similar regressions in the future. Fixes bazelbuild#640 Drive-by fix: Replaced \"%s\" with %q.
fweikert
added a commit
to fweikert/bazelisk
that referenced
this issue
Nov 25, 2024
The refactoring in bazelbuild#631 introduced a severe performance regression: With latest and last_rc the code traversed *all* GCS buckets for *every* existing Bazel version. Since we send one HTTP request per bucket, this behavior led to a significant increase in HTTP requests ( >140 instead of 2-3 requests). This commit restores the previous, correct behavior: Traversal will be stopped as soon as a matching version has been found. Moreover, this commit adds a test to prevent similar regressions in the future. Fixes bazelbuild#640 Drive-by fix: Replaced \"%s\" with %q.
The culprit is the refactoring in #631. The binary is actually downloaded only once, but the code sends way too many HTTP requests to GCS in order to determine the actual version. |
meteorcloudy
pushed a commit
that referenced
this issue
Nov 25, 2024
* Avoid unnecessary HTTP requests for latest/last_rc The refactoring in #631 introduced a severe performance regression: With latest and last_rc the code traversed *all* GCS buckets for *every* existing Bazel version. Since we send one HTTP request per bucket, this behavior led to a significant increase in HTTP requests ( >140 instead of 2-3 requests). This commit restores the previous, correct behavior: Traversal will be stopped as soon as a matching version has been found. Moreover, this commit adds a test to prevent similar regressions in the future. Fixes #640 Drive-by fix: Replaced \"%s\" with %q. * Apply minimal indentation principle
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi,
I just updated to bazelisk 1.24. When no specific version is defined it downloads the latest version over and over again with every invocation.
It can be reproduced the following way under Linux (note, that there is no USE_BAZEL_VERSION in ~/.bazeliskrc:
There is a significant delay when no version is provided with 1.24. When running it via strace one can see quite some amount of network traffic.
Could it be that #636 introduced this behaviour?
The text was updated successfully, but these errors were encountered: