Live: check schema equality between push messages (#34548) (#34801)

(cherry picked from commit 67028af99e)

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
This commit is contained in:
Grot (@grafanabot)
2021-05-27 12:20:39 +02:00
committed by GitHub
co-authored by Ryan McKinley
parent d41bfec2f8
commit dc27360a89
11 changed files with 54 additions and 100 deletions
+1 -3
View File
@@ -57,7 +57,6 @@ func (g *Gateway) Handle(ctx *models.ReqContext) {
// TODO Grafana 8: decide which formats to use or keep all.
urlValues := ctx.Req.URL.Query()
frameFormat := pushurl.FrameFormatFromValues(urlValues)
unstableSchema := pushurl.UnstableSchemaFromValues(urlValues)
body, err := ctx.Req.Body().Bytes()
if err != nil {
@@ -69,7 +68,6 @@ func (g *Gateway) Handle(ctx *models.ReqContext) {
"protocol", "http",
"streamId", streamID,
"bodyLength", len(body),
"unstableSchema", unstableSchema,
"frameFormat", frameFormat,
)
@@ -88,7 +86,7 @@ func (g *Gateway) Handle(ctx *models.ReqContext) {
// interval = "1s" vs flush_interval = "5s"
for _, mf := range metricFrames {
err := stream.Push(ctx.SignedInUser.OrgId, mf.Key(), mf.Frame(), unstableSchema)
err := stream.Push(ctx.SignedInUser.OrgId, mf.Key(), mf.Frame())
if err != nil {
ctx.Resp.WriteHeader(http.StatusInternalServerError)
return