fix(pkger): update yaml dep and trim space for all queries exported by pkger
attempt at fixing an issue that is hard to reproduce. the dep library says it is fixed but we are still seeing issues. closes: #16632pull/16648/head
parent
b0097217ee
commit
f22201f5a8
2
go.mod
2
go.mod
|
@ -103,7 +103,7 @@ require (
|
|||
google.golang.org/api v0.7.0
|
||||
google.golang.org/grpc v1.21.1
|
||||
gopkg.in/vmihailenco/msgpack.v2 v2.9.1 // indirect
|
||||
gopkg.in/yaml.v3 v3.0.0-20191010095647-fc94e3f71652
|
||||
gopkg.in/yaml.v3 v3.0.0-20200121175148-a6ecf24a6d71
|
||||
honnef.co/go/tools v0.0.1-2019.2.3.0.20190904154718-afd67930eec2
|
||||
labix.org/v2/mgo v0.0.0-20140701140051-000000000287 // indirect
|
||||
launchpad.net/gocheck v0.0.0-20140225173054-000000000087 // indirect
|
||||
|
|
4
go.sum
4
go.sum
|
@ -638,8 +638,8 @@ gopkg.in/yaml.v2 v2.2.1 h1:mUhvW9EsL+naU5Q3cakzfE91YhliOondGd6ZrsDBHQE=
|
|||
gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw=
|
||||
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v3 v3.0.0-20191010095647-fc94e3f71652 h1:VKvJ/mQ4BgCjZUDggYFxTe0qv9jPMHsZPD4Xt91Y5H4=
|
||||
gopkg.in/yaml.v3 v3.0.0-20191010095647-fc94e3f71652/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||
gopkg.in/yaml.v3 v3.0.0-20200121175148-a6ecf24a6d71 h1:Xe2gvTZUJpsvOWUnvmL/tmhVBZUmHSvLbMjRj6NUUKo=
|
||||
gopkg.in/yaml.v3 v3.0.0-20200121175148-a6ecf24a6d71/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||
gotest.tools v2.2.0+incompatible h1:VsBPFP1AI068pPrMxtb/S8Zkgf9xEmTLJjfM+P5UIEo=
|
||||
gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw=
|
||||
honnef.co/go/tools v0.0.0-20180728063816-88497007e858 h1:wN+eVZ7U+gqdqkec6C6VXR1OFf9a5Ul9ETzeYsYv20g=
|
||||
|
|
|
@ -88,7 +88,7 @@ func checkToObject(ch influxdb.Check, name string) Object {
|
|||
assignNonZeroStrings(k.Spec, map[string]string{fieldDescription: ch.GetDescription()})
|
||||
|
||||
assignBase := func(base icheck.Base) {
|
||||
k.Spec[fieldQuery] = base.Query.Text
|
||||
k.Spec[fieldQuery] = strings.TrimSpace(base.Query.Text)
|
||||
k.Spec[fieldCheckStatusMessageTemplate] = base.StatusMessageTemplate
|
||||
assignNonZeroFluxDurs(k.Spec, map[string]*notification.Duration{
|
||||
fieldEvery: base.Every,
|
||||
|
@ -357,7 +357,7 @@ func convertColors(iColors []influxdb.ViewColor) colors {
|
|||
func convertQueries(iQueries []influxdb.DashboardQuery) queries {
|
||||
out := make(queries, 0, len(iQueries))
|
||||
for _, iq := range iQueries {
|
||||
out = append(out, query{Query: iq.Text})
|
||||
out = append(out, query{Query: strings.TrimSpace(iq.Text)})
|
||||
}
|
||||
return out
|
||||
}
|
||||
|
@ -538,7 +538,7 @@ func taskToObject(t influxdb.Task, name string) Object {
|
|||
Type: KindTask,
|
||||
Metadata: Metadata{Name: name},
|
||||
Spec: Resource{
|
||||
fieldQuery: query,
|
||||
fieldQuery: strings.TrimSpace(query),
|
||||
},
|
||||
}
|
||||
assignNonZeroStrings(k.Spec, map[string]string{
|
||||
|
@ -603,7 +603,7 @@ func VariableToObject(v influxdb.Variable, name string) Object {
|
|||
vals, ok := args.Values.(influxdb.VariableQueryValues)
|
||||
if ok {
|
||||
k.Spec[fieldLanguage] = vals.Language
|
||||
k.Spec[fieldQuery] = vals.Query
|
||||
k.Spec[fieldQuery] = strings.TrimSpace(vals.Query)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue