diff --git a/src/metrics/rules/mapping.go b/src/metrics/rules/mapping.go index a8238907d9..45b1d0c1c8 100644 --- a/src/metrics/rules/mapping.go +++ b/src/metrics/rules/mapping.go @@ -478,5 +478,6 @@ func (mc *mappingRule) mappingRuleView(snapshotIdx int) (view.MappingRule, error StoragePolicies: mrs.storagePolicies, LastUpdatedBy: mrs.lastUpdatedBy, LastUpdatedAtMillis: mrs.lastUpdatedAtNanos / nanosPerMilli, + Tags: mrs.tags, }, nil } diff --git a/src/metrics/rules/mapping_test.go b/src/metrics/rules/mapping_test.go index fb4e6620c2..79c4d7e044 100644 --- a/src/metrics/rules/mapping_test.go +++ b/src/metrics/rules/mapping_test.go @@ -669,6 +669,7 @@ func TestMappingRuleMappingRuleView(t *testing.T) { LastUpdatedAtMillis: 67890, LastUpdatedBy: "someone-else", DropPolicy: res.DropPolicy, + Tags: []models.Tag{}, } require.Equal(t, expected, res) } @@ -698,6 +699,7 @@ func TestNewMappingRuleHistory(t *testing.T) { }, LastUpdatedAtMillis: 67890, LastUpdatedBy: "someone-else", + Tags: []models.Tag{}, }, { ID: "12669817-13ae-40e6-ba2f-33087b262c68", @@ -713,6 +715,7 @@ func TestNewMappingRuleHistory(t *testing.T) { }, LastUpdatedAtMillis: 12345, LastUpdatedBy: "someone", + Tags: []models.Tag{}, }, } require.Equal(t, expected, history) diff --git a/src/metrics/rules/ruleset_test.go b/src/metrics/rules/ruleset_test.go index a1f55f1a92..b1339ccebe 100644 --- a/src/metrics/rules/ruleset_test.go +++ b/src/metrics/rules/ruleset_test.go @@ -42,6 +42,7 @@ import ( "github.com/m3db/m3/src/metrics/rules/view" "github.com/m3db/m3/src/metrics/rules/view/changes" xbytes "github.com/m3db/m3/src/metrics/x/bytes" + "github.com/m3db/m3/src/query/models" xerrors "github.com/m3db/m3/src/x/errors" xtime "github.com/m3db/m3/src/x/time" @@ -288,6 +289,7 @@ func TestRuleSetLatest(t *testing.T) { StoragePolicies: policy.StoragePolicies{ policy.NewStoragePolicy(30*time.Second, xtime.Second, 6*time.Hour), }, + Tags: []models.Tag{}, }, { ID: "mappingRule3", @@ -299,6 +301,7 @@ func TestRuleSetLatest(t *testing.T) { policy.NewStoragePolicy(10*time.Second, xtime.Second, 2*time.Hour), policy.NewStoragePolicy(time.Minute, xtime.Minute, time.Hour), }, + Tags: []models.Tag{}, }, { ID: "mappingRule4", @@ -309,6 +312,7 @@ func TestRuleSetLatest(t *testing.T) { StoragePolicies: policy.StoragePolicies{ policy.NewStoragePolicy(10*time.Second, xtime.Second, 24*time.Hour), }, + Tags: []models.Tag{}, }, { ID: "mappingRule5", @@ -320,6 +324,7 @@ func TestRuleSetLatest(t *testing.T) { StoragePolicies: policy.StoragePolicies{ policy.NewStoragePolicy(10*time.Second, xtime.Second, 24*time.Hour), }, + Tags: []models.Tag{}, }, }, RollupRules: []view.RollupRule{