Skip to content

Commit 3a6a107

Browse files
committed
Merge branch 'main' into wb/ds/329
2 parents 6de0843 + 3c35e40 commit 3a6a107

File tree

4 files changed

+89
-71
lines changed

4 files changed

+89
-71
lines changed

experimental/apis/data/v0alpha1/conversions.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,6 @@ func toBackendDataQuery(q DataQuery, defaultTimeRange *backend.TimeRange) (backe
6969
if err != nil {
7070
return bq, err
7171
}
72-
if bq.RefID == "" {
73-
bq.RefID = "A"
74-
}
7572
if bq.MaxDataPoints == 0 {
7673
bq.MaxDataPoints = 100
7774
}
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
package v0alpha1
2+
3+
import (
4+
"testing"
5+
"time"
6+
7+
"github.com/stretchr/testify/require"
8+
)
9+
10+
func TestConversionsDefaults(t *testing.T) {
11+
res, err := toBackendDataQuery(DataQuery{}, nil)
12+
13+
require.NoError(t, err)
14+
15+
// we used to default the refId to "A",
16+
// we do not do that anymore,
17+
// we verify the new behavior
18+
require.Equal(t, "", res.RefID)
19+
20+
require.Equal(t, int64(100), res.MaxDataPoints)
21+
require.Equal(t, time.Second, res.Interval)
22+
}

go.mod

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ require (
1616
github.com/google/uuid v1.6.0
1717
github.com/grafana/otel-profiling-go v0.5.1
1818
github.com/grafana/pyroscope-go/godeltaprof v0.1.8
19-
github.com/grpc-ecosystem/go-grpc-middleware/providers/prometheus v1.0.1
19+
github.com/grpc-ecosystem/go-grpc-middleware/providers/prometheus v1.1.0
2020
github.com/grpc-ecosystem/go-grpc-middleware/v2 v2.3.2
2121
github.com/hashicorp/go-hclog v1.6.3
2222
github.com/hashicorp/go-plugin v1.6.3
@@ -31,41 +31,41 @@ require (
3131
github.com/prometheus/common v0.64.0
3232
github.com/stretchr/testify v1.10.0
3333
github.com/unknwon/bra v0.0.0-20200517080246-1e3013ecaff8
34-
github.com/urfave/cli v1.22.16
34+
github.com/urfave/cli v1.22.17
3535
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.60.0
36-
go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.60.0
37-
go.opentelemetry.io/contrib/propagators/jaeger v1.36.0
36+
go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.62.0
37+
go.opentelemetry.io/contrib/propagators/jaeger v1.37.0
3838
go.opentelemetry.io/contrib/samplers/jaegerremote v0.30.0
39-
go.opentelemetry.io/otel v1.36.0
40-
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.36.0
39+
go.opentelemetry.io/otel v1.37.0
40+
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.37.0
4141
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.36.0
42-
go.opentelemetry.io/otel/sdk v1.36.0
43-
go.opentelemetry.io/otel/trace v1.36.0
42+
go.opentelemetry.io/otel/sdk v1.37.0
43+
go.opentelemetry.io/otel/trace v1.37.0
4444
golang.org/x/exp v0.0.0-20240909161429-701f63a606c0
45-
golang.org/x/net v0.40.0
45+
golang.org/x/net v0.42.0
4646
golang.org/x/oauth2 v0.30.0
47-
golang.org/x/sync v0.14.0
48-
golang.org/x/sys v0.33.0
49-
golang.org/x/text v0.25.0
50-
google.golang.org/genproto/googleapis/rpc v0.0.0-20250519155744-55703ea1f237
47+
golang.org/x/sync v0.16.0
48+
golang.org/x/sys v0.34.0
49+
golang.org/x/text v0.27.0
50+
google.golang.org/genproto/googleapis/rpc v0.0.0-20250528174236-200df99c418a
5151
google.golang.org/grpc v1.73.0
5252
google.golang.org/protobuf v1.36.6
5353
k8s.io/kube-openapi v0.0.0-20250318190949-c8a335a9a2ff // @grafana/grafana-app-platform-squad
5454
)
5555

5656
require (
57-
github.com/BurntSushi/toml v1.4.0 // indirect
57+
github.com/BurntSushi/toml v1.5.0 // indirect
5858
github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 // indirect
5959
github.com/bahlo/generic-list-go v0.2.0 // indirect
6060
github.com/beorn7/perks v1.0.1 // indirect
6161
github.com/buger/jsonparser v1.1.1 // indirect
6262
github.com/cenkalti/backoff/v5 v5.0.2 // indirect
6363
github.com/cespare/xxhash/v2 v2.3.0 // indirect
64-
github.com/cpuguy83/go-md2man/v2 v2.0.5 // indirect
64+
github.com/cpuguy83/go-md2man/v2 v2.0.7 // indirect
6565
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
6666
github.com/emicklei/go-restful/v3 v3.11.0 // indirect
6767
github.com/fatih/color v1.15.0 // indirect
68-
github.com/go-logr/logr v1.4.2 // indirect
68+
github.com/go-logr/logr v1.4.3 // indirect
6969
github.com/go-logr/stdr v1.2.2 // indirect
7070
github.com/go-openapi/analysis v0.23.0 // indirect
7171
github.com/go-openapi/errors v0.22.0 // indirect
@@ -112,12 +112,12 @@ require (
112112
github.com/zeebo/xxh3 v1.0.2 // indirect
113113
go.mongodb.org/mongo-driver v1.14.0 // indirect
114114
go.opentelemetry.io/auto/sdk v1.1.0 // indirect
115-
go.opentelemetry.io/otel/metric v1.36.0 // indirect
116-
go.opentelemetry.io/proto/otlp v1.6.0 // indirect
117-
golang.org/x/mod v0.24.0 // indirect
118-
golang.org/x/tools v0.32.0 // indirect
115+
go.opentelemetry.io/otel/metric v1.37.0 // indirect
116+
go.opentelemetry.io/proto/otlp v1.7.0 // indirect
117+
golang.org/x/mod v0.25.0 // indirect
118+
golang.org/x/tools v0.34.0 // indirect
119119
golang.org/x/xerrors v0.0.0-20240903120638-7835f813f4da // indirect
120-
google.golang.org/genproto/googleapis/api v0.0.0-20250519155744-55703ea1f237 // indirect
120+
google.golang.org/genproto/googleapis/api v0.0.0-20250528174236-200df99c418a // indirect
121121
gopkg.in/fsnotify/fsnotify.v1 v1.4.7 // indirect
122122
gopkg.in/yaml.v3 v3.0.1 // indirect
123123
k8s.io/utils v0.0.0-20240711033017-18e509b52bc8 // indirect

0 commit comments

Comments
 (0)