bazel icon indicating copy to clipboard operation
bazel copied to clipboard

Allow for multiple endpoints for Bazel Event Service

Open konste opened this issue 5 years ago • 7 comments

Description of the problem / feature request:

Bazel allows configuring endpoint for the Bazel Event Service through --bes_backend command line option. We need it to allow for multiple endpoints, so that events stream is sent to all of them.

Feature requests: what underlying problem are you trying to solve with this feature?

While in the past BES was underutilized now there are more and more services that use it to provide some kind of visibility into the build process. Examples:

  • TeamCity plugin for Bazel
  • https://github.com/buildbuddy-io/buildbuddy
  • https://build.bzl.io/

Unfortunately at this time only one endpoint can be configured for BES, which (probably) means we only can use one of those tools at the time, while we would definitely prefer for several of them to work at the same time. Unless there is a workaround I don't know about it would be great if Bazel would allow configuring multiple BES endpoints, so that all interested listeners could be plugged in simultaneously.

What's the output of bazel info release?

2.2.0

konste avatar Mar 05 '20 17:03 konste

Thank you for contributing to the Bazel repository! This issue has been marked as stale since it has not had any activity in the last 2+ years. It will be closed in the next 14 days unless any other activity occurs or one of the following labels is added: "not stale", "awaiting-bazeler". Please reach out to the triage team (@bazelbuild/triage) if you think this issue is still relevant or you are interested in getting the issue resolved.

github-actions[bot] avatar Apr 19 '23 01:04 github-actions[bot]

@bazelbuild/triage Not stale.

brentleyjones avatar Apr 19 '23 16:04 brentleyjones

cc @michaeledgar

coeuvre avatar Oct 20 '23 12:10 coeuvre

This seems feasible enough - we already stream events to an arbitrary number of BuildEventTransports. Bazel has complicated rules for blocking on these transports to ensure BES streams are completely uploaded. The net effect would be waiting for the slowest BES server to complete between Bazel commands.

The workaround would be reading the BEP stream from one BES server and writing it to the others.

michaeledgar avatar Oct 24 '23 18:10 michaeledgar

I have a prototype of this here: https://bazel-review.googlesource.com/c/bazel/+/231672. No OSS tests yet but it does appear to work.

michaeledgar avatar Oct 25 '23 21:10 michaeledgar

I have a use case that could leverage this functionality - providing BES to the RBE + sending events to internal system for post-build processing of outputs. When it will be available I'm glad to help with testing it out.

pauliusjwix avatar Jan 24 '24 14:01 pauliusjwix

I have a use case that could leverage this functionality - providing BES to the RBE + sending events to internal system for post-build processing of outputs. When it will be available I'm glad to help with testing it out.

The support of multiple BES endpoints would be very helpful. One small remark would be the support of multiple credentials e.g. --tls_client_certificate and --tls_client_key) for the different endpoints.

fitzner avatar May 03 '24 10:05 fitzner

Any updates on this?

sanav33 avatar Jul 08 '24 21:07 sanav33

@michaeledgar what does it mean that there are no OSS tests yet?

Any chance of this being opened as a PR here? or is that link you provided a preferred internal thing?

asomerville-latai avatar Aug 12 '24 17:08 asomerville-latai