Skip to content
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

Inject version info into index.html #2547

Merged

Conversation

yurishkuro
Copy link
Member

@yurishkuro yurishkuro requested a review from a team as a code owner October 9, 2020 03:41
Signed-off-by: Yuri Shkuro <github@ysh.us>
Signed-off-by: Yuri Shkuro <github@ysh.us>
Signed-off-by: Yuri Shkuro <github@ysh.us>
@codecov
Copy link

codecov bot commented Oct 9, 2020

Codecov Report

Merging #2547 into master will increase coverage by 0.04%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2547      +/-   ##
==========================================
+ Coverage   95.32%   95.37%   +0.04%     
==========================================
  Files         208      208              
  Lines        9248     9251       +3     
==========================================
+ Hits         8816     8823       +7     
+ Misses        355      352       -3     
+ Partials       77       76       -1     
Impacted Files Coverage Δ
cmd/query/app/static_handler.go 83.03% <100.00%> (+0.46%) ⬆️
plugin/storage/badger/spanstore/reader.go 96.08% <0.00%> (+0.71%) ⬆️
...lugin/sampling/strategystore/adaptive/processor.go 100.00% <0.00%> (+0.92%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 600d023...05df5b8. Read the comment docs.

GitVersion string `json:"GitVersion"`
BuildDate string `json:"BuildDate"`
GitVersion string `json:"gitVersion"`
BuildDate string `json:"buildDate"`
}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This could be considered a minor breaking change, I don't know why there was a mismatch in the name casing.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This JSON output is used in version command and /version endpoint:

$ curl http://localhost:14269/version
{"gitCommit":"","gitVersion":"","buildDate":""}

Hard to imaging there would be dependencies on the exact string output of these.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I really wouldn't worry about it...

if options.BasePath == "" {
options.BasePath = "/"
}
if options.BasePath != "/" {
if !strings.HasPrefix(options.BasePath, "/") || strings.HasSuffix(options.BasePath, "/") {
return nil, fmt.Errorf(errBadBasePath, options.BasePath)
return nil, fmt.Errorf("invalid base path '%s'. Must start but not end with a slash '/', e.g. '/jaeger/ui'", options.BasePath)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about replacing '%s' with %q ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it only makes the logs uglier because JSON logger will have to escape quotes, etc.

GitVersion string `json:"GitVersion"`
BuildDate string `json:"BuildDate"`
GitVersion string `json:"gitVersion"`
BuildDate string `json:"buildDate"`
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I really wouldn't worry about it...

Copy link
Member

@joe-elliott joe-elliott left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

@yurishkuro yurishkuro merged commit 0f88343 into jaegertracing:master Oct 9, 2020
@yurishkuro yurishkuro deleted the include-version-in-index.html branch October 9, 2020 15:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants