-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Update static UI assets path in contrib doc #2548
Update static UI assets path in contrib doc #2548
Conversation
Signed-off-by: albertteoh <albert.teoh@logz.io>
CONTRIBUTING.md
Outdated
@@ -45,7 +45,7 @@ $ go run -tags ui ./cmd/all-in-one/main.go | |||
Alternatively, the path to the built UI assets can be provided via `--query.static-files` flag: | |||
|
|||
``` | |||
$ go run ./cmd/all-in-one/main.go --query.static-files jaeger-ui/build | |||
$ go run ./cmd/all-in-one/main.go --query.static-files jaeger-ui/packages/jaeger-ui/build |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We actually have a make target now that can be used instead: make run-all-in-one
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah okay, glad you pointed this out. Do you think we should delete this section of the contrib file then (i.e. "Alternatively, ..." + code block)?
Moreover, given we already have the make build-ui
instruction in the previous section, could we just have a one-liner for this "Running local build with the UI" section of:
make run-all-in-one
Unless if we feel the first two sentences (i.e. "The jaeger-ui... .gitignored-ed.") are useful information.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think so, the whole section here could be replaced with this one make target.
Signed-off-by: albertteoh <albert.teoh@logz.io>
Codecov Report
@@ Coverage Diff @@
## master #2548 +/- ##
==========================================
+ Coverage 95.32% 95.36% +0.03%
==========================================
Files 208 208
Lines 9248 9248
==========================================
+ Hits 8816 8819 +3
+ Misses 355 352 -3
Partials 77 77
Continue to review full report at Codecov.
|
make build-ui | ||
``` | ||
|
||
### Running local build with the UI | ||
|
||
The `jaeger-ui` submodule contains the source code for the UI assets (requires Node.js 6+). The assets must be compiled first with `make build-ui`, which runs Node.js build and then packages the assets into a Go file that is `.gitignore`-ed. The packaged assets can be enabled by providing a build tag `ui`, e.g.: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The make target is great, but why remove the explanation? It's valuable information that now someone needs to dig out by reading source code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not to mention that this section is about the UI, not all-in-one, i.e the same approach is used with query-service.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a valid point, @yurishkuro; how the UI assets are created and used deserves a more detailed explanation as it's not straightforward (at least to me) to understand from just looking at code and Makefiles.
I think though, that this instruction should belong in the Pre-requisites section as an explanation to what make build-ui
does. So my proposal is (what do you think?):
Pre-requisites
Then install dependencies and run the tests:
git submodule update --init --recursive
make install-tools
make test
The jaeger-ui
submodule contains the source code for the UI assets (requires Node.js 6+). The assets must be compiled first with make build-ui
, which runs Node.js build and then packages the assets into a Go file that is .gitignore
-ed:
# if you wish to build platform binaries locally - the step below is needed.
make build-ui
Running local build with the UI
The packaged assets (created by the make build-ui
step above) can be enabled by providing a build tag ui
. The following command will start Jaeger all-in-one with this ui
tag.
make run-all-in-one
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I prefer UI-related explanations to be together under one section.
Signed-off-by: albertteoh albert.teoh@logz.io
Which problem is this PR solving?
Following the instruction from the CONTRIBUTING.md file results in a "no such file or directory" error when trying to fetch static UI assets:
Short description of the changes
The
Makefile
appears to copy the static UI assets intojaeger-ui/packages/jaeger-ui/build
instead. See: https://github.com/jaegertracing/jaeger/blob/master/Makefile#L234Changing the command to the correct path as specified in the
build-ui
Makefile
target results in the all-in-one running successfully: