mirror of https://github.com/linkerd/linkerd2.git
## Problem When an object has no previous route metrics, we do not generate a table for that object. The reasoning behind this was for reducing output of the following command: ``` $ linkerd routes deploy --to deploy/foo ``` For each deployment object, if it has no previous traffic to `deploy/foo`, then a table would not be generated for it. However, the behavior we see with that indicates there is an error even when a Service Profile is installed: ``` $ linkerd routes deploy deploy/foo Error: No Service Profiles found for selected resources ``` ## Solution Always generate a stat table for the queried resource object. ## Validation I deployed [booksapp](https://github.com/buoyantIO/booksapp) with the `traffic` deployment removed and Service Profiles installed. Without the fix, `linkerd routes deploy/webapp` displays an error because there has been no traffic to `deploy/webapp` without the `traffic` deployment. With the fix, the following output is generated: ``` ROUTE SERVICE SUCCESS RPS LATENCY_P50 LATENCY_P95 LATENCY_P99 GET / webapp 0.00% 0.0rps 0ms 0ms 0ms GET /authors/{id} webapp 0.00% 0.0rps 0ms 0ms 0ms GET /books/{id} webapp 0.00% 0.0rps 0ms 0ms 0ms POST /authors webapp 0.00% 0.0rps 0ms 0ms 0ms POST /authors/{id}/delete webapp 0.00% 0.0rps 0ms 0ms 0ms POST /authors/{id}/edit webapp 0.00% 0.0rps 0ms 0ms 0ms POST /books webapp 0.00% 0.0rps 0ms 0ms 0ms POST /books/{id}/delete webapp 0.00% 0.0rps 0ms 0ms 0ms POST /books/{id}/edit webapp 0.00% 0.0rps 0ms 0ms 0ms [DEFAULT] webapp 0.00% 0.0rps 0ms 0ms 0ms ``` Closes #2328 Signed-off-by: Kevin Leimkuhler <kevinl@buoyant.io> |
||
---|---|---|
.. | ||
testdata | ||
client.go | ||
client_test.go | ||
grpc_server.go | ||
grpc_server_test.go | ||
http_server.go | ||
http_server_test.go | ||
prometheus.go | ||
proto_over_http.go | ||
proto_over_http_test.go | ||
stat_summary.go | ||
stat_summary_test.go | ||
test_helper.go | ||
top_routes.go | ||
top_routes_test.go |