Any way to make Bazel print the invocation ID in the form of a link on startup?

597 views
Skip to first unread message

Ed Schouten

unread,
Feb 26, 2019, 5:46:25 PM2/26/19
to bazel-discuss, Jakob Buchgraber
Hi there,

I'm currently working on adding decent support for the Build Event
Protocol to Buildbarn. I've written a gRPC service that saves up build
events and stores them, so that Buildbarn's web UI (bb-browser) can
display them in a nice way.

Now I've noticed that during startup, Bazel prints this:

$ bazel build --config=local-debian8 //...
INFO: Invocation ID: f8b75639-9a3a-49ad-80d7-499f86980a3b
INFO: Streaming Build Event Protocol to localhost:8983
build_request_id: fbc49aaa-cb40-443a-b338-04831a77c5b9 invocation_id:
f8b75639-9a3a-49ad-80d7-499f86980a3b
...

My question is, would it somehow be possible to let Bazel print a
message in the form of a server-provided link? It looks like
PublishLifecycleEvent and PublishBuildToolEventStream[1] have no
proper way of returning that kind of information.

Thanks!

[1] https://github.com/googleapis/googleapis/blob/master/google/devtools/build/v1/publish_build_event.proto

--
Ed Schouten <e...@nuxi.nl>

Austin Schuh

unread,
Feb 26, 2019, 6:05:48 PM2/26/19
to Ed Schouten, bazel-discuss, Jakob Buchgraber
Look at --bes_results_url.  I think it does what you want!

Austin

--
You received this message because you are subscribed to the Google Groups "bazel-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bazel-discus...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/bazel-discuss/CABh_MKna1ZjYVK_NJMOeKscnWx4CM%3D1XzwJicq_fOReR6eoowQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Ed Schouten

unread,
Feb 27, 2019, 2:51:49 AM2/27/19
to Austin Schuh, bazel-discuss, Jakob Buchgraber
Hey Austin,

Op wo 27 feb. 2019 om 00:05 schreef Austin Schuh <austin...@gmail.com>:
> Look at --bes_results_url. I think it does what you want!

Oh, that's awesome. Just tried it and it works perfectly. I guess I
overlooked it, because I only considered the command line flags listed
on this page:

https://docs.bazel.build/versions/master/build-event-protocol.html#build-event-service-flags

I think --bes_results_url is important enough for most setups that we
should document it there as well. I'll see if I can get that added.

Thanks,
--
Ed Schouten <e...@nuxi.nl>

Jakob Buchgraber

unread,
Feb 28, 2019, 5:40:02 AM2/28/19
to Ed Schouten, Austin Schuh, bazel-discuss
thanks for sending us a patch Ed!

Jakob Buchgraber

Software Engineer


Google Germany GmbH

Erika-Mann-Straße 33

80636 München


Geschäftsführer: Paul Manicle, Halimah DeLaine Prado

Registergericht und -nummer: Hamburg, HRB 86891

Sitz der Gesellschaft: Hamburg


Diese E-Mail ist vertraulich. Falls sie diese fälschlicherweise erhalten haben sollten, leiten Sie diese bitte nicht an jemand anderes weiter, löschen Sie alle Kopien und Anhänge davon und lassen Sie mich bitte wissen, dass die E-Mail an die falsche Person gesendet wurde.

    

This e-mail is confidential. If you received this communication by mistake, please don't forward it to anyone else, please erase all copies and attachments, and please let me know that it has gone to the wrong person.



Reply all
Reply to author
Forward
0 new messages