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

Fix base path in grpc gateway for api_v3 #3139

Merged
merged 2 commits into from
Jul 14, 2021

Conversation

pavolloffay
Copy link
Member

@pavolloffay pavolloffay commented Jul 14, 2021

Signed-off-by: Pavol Loffay p.loffay@gmail.com

Changes:

  • fix base path in grpc-gateway
  • add itest to get services from api_v3

Signed-off-by: Pavol Loffay <p.loffay@gmail.com>
@pavolloffay pavolloffay requested a review from a team as a code owner July 14, 2021 11:09
@@ -34,7 +34,11 @@ func RegisterGRPCGateway(ctx context.Context, logger *zap.Logger, r *mux.Router,
grpcGatewayMux := runtime.NewServeMux(
runtime.WithMarshalerOption(runtime.MIMEWildcard, jsonpb),
)
r.PathPrefix("/v3/").Handler(http.StripPrefix(basePath, grpcGatewayMux))
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 was causing the issue. The default base path is passed as /. The StripPrefix is noop only when the base path is empty and the old tests were testing only empty base path.

@codecov
Copy link

codecov bot commented Jul 14, 2021

Codecov Report

Merging #3139 (b3fdb89) into master (c7b409b) will decrease coverage by 0.05%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3139      +/-   ##
==========================================
- Coverage   95.93%   95.87%   -0.06%     
==========================================
  Files         239      239              
  Lines       10525    10528       +3     
==========================================
- Hits        10097    10094       -3     
- Misses        352      357       +5     
- Partials       76       77       +1     
Impacted Files Coverage Δ
cmd/query/app/apiv3/grpc_gateway.go 88.88% <100.00%> (+2.22%) ⬆️
pkg/config/tlscfg/cert_watcher.go 92.20% <0.00%> (-2.60%) ⬇️
cmd/query/app/server.go 94.07% <0.00%> (-1.32%) ⬇️
...lugin/sampling/strategystore/adaptive/processor.go 99.07% <0.00%> (-0.93%) ⬇️
cmd/query/app/static_handler.go 96.77% <0.00%> (ø)

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 c7b409b...b3fdb89. Read the comment docs.

@yurishkuro yurishkuro enabled auto-merge (squash) July 14, 2021 13:46
@yurishkuro yurishkuro merged commit 6ee42d0 into jaegertracing:master Jul 14, 2021
@vprithvi vprithvi added this to the Release 1.25.0 milestone Aug 5, 2021
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.

4 participants