-
Notifications
You must be signed in to change notification settings - Fork 3.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
Ensure status codes are set correctly in the frontend. #1684
Conversation
Signed-off-by: Cyril Tovena <cyril.tovena@gmail.com>
Previously we had cases where 400 would endup as 500. We should use httpgrpc.Errorf when possible. Signed-off-by: Cyril Tovena <cyril.tovena@gmail.com>
@@ -169,7 +171,6 @@ func (h *splitByInterval) Do(ctx context.Context, r queryrange.Request) (queryra | |||
if err != nil { | |||
return nil, err | |||
} | |||
|
|||
return h.merger.MergeResponse(resps...) |
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.
Sorry I wanted to also tackle the fact that I've seen an empty list going there once. But then I realized I'm not sure why this has happened so I let it be a 500, because we should take care of it.
Codecov Report
@@ Coverage Diff @@
## master #1684 +/- ##
==========================================
- Coverage 62.56% 62.47% -0.09%
==========================================
Files 112 112
Lines 8615 8613 -2
==========================================
- Hits 5390 5381 -9
- Misses 2822 2826 +4
- Partials 403 406 +3
|
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.
lgtm
* 'extraPorts' of github.com:billimek/loki: (25 commits) Ensure status codes are set correctly in the frontend. (grafana#1684) --dry-run Promtail. (grafana#1652) Fix logcli --quiet parameter parsing issue (grafana#1682) This improves the log ouput for statistics in the logcli. (grafana#1644) Loki stack helm chart can deploy datasources without Grafana (grafana#1688) Automatically prune metrics from the /metrics output of the promtail metrics pipeline stage after an idle period. Allow a metric defined as a counter to match all lines, useful for creating line count metrics which include all your labels. Found a bug in the the test runner where it didn't fail if the actual error was nil but the test expected an error Added some tests to the counters to test valid configs maintainer links & usernames (grafana#1675) Binary operators in LogQL (grafana#1662) Pipe data to Promtail (grafana#1649) Add Owen to the maintainer team. (grafana#1673) Update tanka.md so that promtail.yml is in the correct format (grafana#1671) Correcte syntax of rate example (grafana#1641) Frontend & Querier query statistics instrumentation. (grafana#1661) loki-canary: fix indent of DaemonSet manifest written in .md file (grafana#1648) Query frontend service should be headless. (grafana#1665) Support custom prefix name in metrics stage (grafana#1664) pkg/promtail/positions: handle empty positions file (grafana#1660) Convert second(Integer class) to nanosecond precision (grafana#1656) Unite docs for fluentd plugin (grafana#1634) ...
Previously we had cases where 400 would end up as 500.
We should use
httpgrpc.Errorf
when possible.