Skip to content

Commit c278ab7

Browse files
authored
experimental: apis: do not default to refid=A (#1336)
1 parent 209d18a commit c278ab7

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
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
}

experimental/apis/data/v0alpha1/conversions_test.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,11 @@ func TestConversionsDefaults(t *testing.T) {
1212

1313
require.NoError(t, err)
1414

15-
require.Equal(t, "A", res.RefID)
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+
1620
require.Equal(t, int64(100), res.MaxDataPoints)
1721
require.Equal(t, time.Second, res.Interval)
1822
}

0 commit comments

Comments
 (0)