Skip to content

Avoid unnecessary HTTP requests for latest/last_rc#641

Merged
meteorcloudy merged 2 commits intobazelbuild:masterfrom
fweikert:master
Nov 25, 2024
Merged

Avoid unnecessary HTTP requests for latest/last_rc#641
meteorcloudy merged 2 commits intobazelbuild:masterfrom
fweikert:master

Conversation

@fweikert
Copy link
Member

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.

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.
Copy link
Member

@meteorcloudy meteorcloudy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@meteorcloudy meteorcloudy merged commit 801dd34 into bazelbuild:master Nov 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bazelisk 1.24 downloads over and over again

3 participants