go build generated prometheus binary doesn't include frontend assets

123 views
Skip to first unread message

Guanpeng Gao

unread,
Jul 5, 2020, 12:22:53 PM7/5/20
to Prometheus Developers
I use go build under cmd/prometheus to generate prometheus binary
but looks like it doesn't include frontend assets, different from the binary directly build from "make build"
error message: error reading base template: open web/ui/templates/_base.html: no such file or directory

Julius Volz

unread,
Jul 5, 2020, 3:26:23 PM7/5/20
to Guanpeng Gao, Prometheus Developers
Hi Guanpeng,

Yes, this is intended. The reason is that the new React UI requires some separate build steps that are not Go-based, and the result of that is not checked in (because it's hard to make completely reproducible builds that wouldn't create diffs every time the React UI is built).

See https://github.com/prometheus/prometheus/blob/master/web/ui/react-app/README.md for more details on the React UI build and dev stuff.

--
You received this message because you are subscribed to the Google Groups "Prometheus Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to prometheus-devel...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-developers/c731c457-f9c8-44da-b8f1-3253dab6cbffo%40googlegroups.com.


--
Julius Volz
PromLabs - promlabs.com

ggp...@gmail.com

unread,
Jul 6, 2020, 10:51:12 AM7/6/20
to Prometheus Developers
Hi Julius,
Thanks for the reply, can you share the step to build frontend assets with me?
thanks
Guanpeng

Julius Volz

unread,
Jul 6, 2020, 1:30:22 PM7/6/20
to ggp...@gmail.com, Prometheus Developers
Hi Guanpeng,


The actual building of the app (after modules download etc.) is done in the https://github.com/prometheus/prometheus/blob/master/scripts/build_react_app.sh script referenced from those Makefile steps.

Reply all
Reply to author
Forward
0 new messages