Gazelle is a Bazel build file generator for Bazel projects. It natively supports Go and protobuf, and it may be extended to support new languages and custom rule sets.
Does this issue reproduce with the latest releases of all the above?
Yes
What operating system and processor architecture are you using?
MacOS ARM64
What did you do?
bazel fetch //...
# wait a long time
# timeout error
What did you expect to see?
In special CI environment where dependencies are cached in GOPROXY,
slow network connection is a sign of failure. Having a high timeout value
does not allow CI worker to fail fast.
In a high traffic monorepo CI pipeline, this translates to CI worker spending more
time waiting for bazel action to timeout. Thus the pipelines take longer to complete
and job get queued up, leading to worker starvation.
Being able to configure custom timeout on go_repository targets would be an ideal solution
What version of gazelle are you using?
latest
What version of rules_go are you using?
latest
What version of Bazel are you using?
4.2.1
Does this issue reproduce with the latest releases of all the above?
Yes
What operating system and processor architecture are you using?
MacOS ARM64
What did you do?
What did you expect to see?
In special CI environment where dependencies are cached in GOPROXY, slow network connection is a sign of failure. Having a high timeout value does not allow CI worker to fail fast.
In a high traffic monorepo CI pipeline, this translates to CI worker spending more time waiting for bazel action to timeout. Thus the pipelines take longer to complete and job get queued up, leading to worker starvation.
Being able to configure custom timeout on go_repository targets would be an ideal solution
What did you see instead?
Timeout is hard coded right now in go_repository starlark rule https://github.com/bazelbuild/bazel-gazelle/blob/6ce3318b09d545b0f4fb689e715a5fdb237abf26/internal/go_repository.bzl
There are workarounds which is either:
--experimental_scale_timeouts
value which affect all rules used in the repo.