Skip to content
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

Improve bazel http timeouts #59373

Closed
mjonss opened this issue Feb 10, 2025 · 1 comment · Fixed by #59374
Closed

Improve bazel http timeouts #59373

mjonss opened this issue Feb 10, 2025 · 1 comment · Fixed by #59374
Labels
type/enhancement The issue or PR belongs to an enhancement.

Comments

@mjonss
Copy link
Contributor

mjonss commented Feb 10, 2025

Enhancement

Currently when running bazel, it is using the default http timeouts, starting with 60 second.
And we have also configured to use caches, that are not public, to speed up local download, so the timeouts are mostly affecting external developers

We should make the impact of these caches smaller, by having better timeouts.

Currently it took ~9 minuts to run make bazel_prepare on empty local cache when it should probably be possible to do it under 2 minutes.

@mjonss mjonss added the type/enhancement The issue or PR belongs to an enhancement. label Feb 10, 2025
@mjonss
Copy link
Contributor Author

mjonss commented Feb 10, 2025

The better solution is probably to have a custom http_archive() function which would filter the urls like this:

for url in urls:
  if host(url) in AccessibleHosts
    use this url
  if host(url) in NonAccessibleHosts
    skip this url and use next
  # Unknown host, test if accessible or not
  # Either by ping the host or trying downloading the file with a timeout.
  # and populate AccessibleHosts/NonAccessibleHosts depending on result

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/enhancement The issue or PR belongs to an enhancement.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant