From 7ee1cf566e60875978a6f329154c263e20765622 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20=C3=81ngel=20Ortu=C3=B1o?= Date: Fri, 11 Oct 2024 16:57:02 +0200 Subject: [PATCH] distributor: allow skipping label count validation (#9576) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This PR introduces a new feature that enables users to bypass label count validation via the `X-Mimir-SkipLabelCountValidation` header. A new configuration option, `-api.skip-label-count-validation-header-enabled` has been added to control this behavior. If enabled, users can set the header to true to skip label count validation. In principle, this feature is not intended to be used by Mimir itself, but rather by projects that depend on it. --------- Signed-off-by: Miguel Ángel Ortuño Co-authored-by: Mauro Stettler Co-authored-by: Taylor C <41653732+tacole02@users.noreply.github.com> --- CHANGELOG.md | 1 + cmd/mimir/config-descriptor.json | 11 + cmd/mimir/help-all.txt.tmpl | 2 + .../configuration-parameters/index.md | 8 + pkg/api/api.go | 6 +- pkg/distributor/distributor.go | 16 +- .../distributor_ingest_storage_test.go | 2 +- pkg/distributor/distributor_test.go | 4 +- pkg/distributor/push.go | 16 +- pkg/distributor/push_test.go | 131 +++++++- pkg/distributor/validate.go | 5 +- pkg/distributor/validate_test.go | 103 +++--- pkg/mimirpb/mimir.pb.go | 306 ++++++++++-------- pkg/mimirpb/mimir.pb.go.expdiff | 14 +- pkg/mimirpb/mimir.proto | 3 + pkg/mimirpb/split_test.go | 2 +- 16 files changed, 422 insertions(+), 208 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index acc3a3938f9..899c6190749 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -27,6 +27,7 @@ * [FEATURE] Alertmanager: limit added for maximum size of the Grafana state (`-alertmanager.max-grafana-state-size-bytes`). #9475 * [FEATURE] Alertmanager: limit added for maximum size of the Grafana configuration (`-alertmanager.max-config-size-bytes`). #9402 * [FEATURE] Ingester: Experimental support for ingesting out-of-order native histograms. This is disabled by default and can be enabled by setting `-ingester.ooo-native-histograms-ingestion-enabled` to `true`. #7175 +* [FEATURE] Distributor: Added `-api.skip-label-count-validation-header-enabled` option to allow skipping label count validation on the HTTP write path based on `X-Mimir-SkipLabelCountValidation` header being `true` or not. #9576 * [ENHANCEMENT] mimirtool: Adds bearer token support for mimirtool's analyze ruler/prometheus commands. #9587 * [ENHANCEMENT] Ruler: Support `exclude_alerts` parameter in `/api/v1/rules` endpoint. #9300 * [ENHANCEMENT] Distributor: add a metric to track tenants who are sending newlines in their label values called `cortex_distributor_label_values_with_newlines_total`. #9400 diff --git a/cmd/mimir/config-descriptor.json b/cmd/mimir/config-descriptor.json index a9837b5946b..b80c3b08b5c 100644 --- a/cmd/mimir/config-descriptor.json +++ b/cmd/mimir/config-descriptor.json @@ -85,6 +85,17 @@ "fieldType": "boolean", "fieldCategory": "advanced" }, + { + "kind": "field", + "name": "skip_label_count_validation_header_enabled", + "required": false, + "desc": "Allows to disable enforcement of the label count limit \"max_label_names_per_series\" via X-Mimir-SkipLabelCountValidation header on the http write path. Allowing this for external clients allows any client to send invalid label counts. After enabling it, requests with a specific HTTP header set to true will not have label counts validated.", + "fieldValue": null, + "fieldDefaultValue": false, + "fieldFlag": "api.skip-label-count-validation-header-enabled", + "fieldType": "boolean", + "fieldCategory": "advanced" + }, { "kind": "field", "name": "get_request_for_ingester_shutdown_enabled", diff --git a/cmd/mimir/help-all.txt.tmpl b/cmd/mimir/help-all.txt.tmpl index c71205fb07f..9b210d947bb 100644 --- a/cmd/mimir/help-all.txt.tmpl +++ b/cmd/mimir/help-all.txt.tmpl @@ -313,6 +313,8 @@ Usage of ./cmd/mimir/mimir: The URL under which Alertmanager is externally reachable (eg. could be different than -http.alertmanager-http-prefix in case Alertmanager is served via a reverse proxy). This setting is used both to configure the internal requests router and to generate links in alert templates. If the external URL has a path portion, it will be used to prefix all HTTP endpoints served by Alertmanager, both the UI and API. (default http://localhost:8080/alertmanager) -api.get-request-for-ingester-shutdown-enabled [deprecated] Enable GET requests to the /ingester/shutdown endpoint to trigger an ingester shutdown. This is a potentially dangerous operation and should only be enabled consciously. + -api.skip-label-count-validation-header-enabled + Allows to disable enforcement of the label count limit "max_label_names_per_series" via X-Mimir-SkipLabelCountValidation header on the http write path. Allowing this for external clients allows any client to send invalid label counts. After enabling it, requests with a specific HTTP header set to true will not have label counts validated. -api.skip-label-name-validation-header-enabled Allows to skip label name validation via X-Mimir-SkipLabelNameValidation header on the http write path. Use with caution as it breaks PromQL. Allowing this for external clients allows any client to send invalid label names. After enabling it, requests with a specific HTTP header set to true will not have label names validated. -auth.multitenancy-enabled diff --git a/docs/sources/mimir/configure/configuration-parameters/index.md b/docs/sources/mimir/configure/configuration-parameters/index.md index 4a1b7b6ba09..5db94ddba41 100644 --- a/docs/sources/mimir/configure/configuration-parameters/index.md +++ b/docs/sources/mimir/configure/configuration-parameters/index.md @@ -141,6 +141,14 @@ api: # CLI flag: -api.skip-label-name-validation-header-enabled [skip_label_name_validation_header_enabled: | default = false] + # (advanced) Allows to disable enforcement of the label count limit + # "max_label_names_per_series" via X-Mimir-SkipLabelCountValidation header on + # the http write path. Allowing this for external clients allows any client to + # send invalid label counts. After enabling it, requests with a specific HTTP + # header set to true will not have label counts validated. + # CLI flag: -api.skip-label-count-validation-header-enabled + [skip_label_count_validation_header_enabled: | default = false] + # (deprecated) Enable GET requests to the /ingester/shutdown endpoint to # trigger an ingester shutdown. This is a potentially dangerous operation and # should only be enabled consciously. diff --git a/pkg/api/api.go b/pkg/api/api.go index c6bf21a7b77..e5f6b68a8d5 100644 --- a/pkg/api/api.go +++ b/pkg/api/api.go @@ -48,7 +48,8 @@ import ( type ConfigHandler func(actualCfg interface{}, defaultCfg interface{}) http.HandlerFunc type Config struct { - SkipLabelNameValidationHeader bool `yaml:"skip_label_name_validation_header_enabled" category:"advanced"` + SkipLabelNameValidationHeader bool `yaml:"skip_label_name_validation_header_enabled" category:"advanced"` + SkipLabelCountValidationHeader bool `yaml:"skip_label_count_validation_header_enabled" category:"advanced"` // TODO: Remove option in Mimir 2.15. GETRequestForIngesterShutdownEnabled bool `yaml:"get_request_for_ingester_shutdown_enabled" category:"deprecated"` @@ -70,6 +71,7 @@ type Config struct { // RegisterFlags adds the flags required to config this to the given FlagSet. func (cfg *Config) RegisterFlags(f *flag.FlagSet) { f.BoolVar(&cfg.SkipLabelNameValidationHeader, "api.skip-label-name-validation-header-enabled", false, "Allows to skip label name validation via X-Mimir-SkipLabelNameValidation header on the http write path. Use with caution as it breaks PromQL. Allowing this for external clients allows any client to send invalid label names. After enabling it, requests with a specific HTTP header set to true will not have label names validated.") + f.BoolVar(&cfg.SkipLabelCountValidationHeader, "api.skip-label-count-validation-header-enabled", false, "Allows to disable enforcement of the label count limit \"max_label_names_per_series\" via X-Mimir-SkipLabelCountValidation header on the http write path. Allowing this for external clients allows any client to send invalid label counts. After enabling it, requests with a specific HTTP header set to true will not have label counts validated.") f.BoolVar(&cfg.GETRequestForIngesterShutdownEnabled, "api.get-request-for-ingester-shutdown-enabled", false, "Enable GET requests to the /ingester/shutdown endpoint to trigger an ingester shutdown. This is a potentially dangerous operation and should only be enabled consciously.") cfg.RegisterFlagsWithPrefix("", f) } @@ -262,7 +264,7 @@ const OTLPPushEndpoint = "/otlp/v1/metrics" func (a *API) RegisterDistributor(d *distributor.Distributor, pushConfig distributor.Config, reg prometheus.Registerer, limits *validation.Overrides) { distributorpb.RegisterDistributorServer(a.server.GRPC, d) - a.RegisterRoute(PrometheusPushEndpoint, distributor.Handler(pushConfig.MaxRecvMsgSize, d.RequestBufferPool, a.sourceIPs, a.cfg.SkipLabelNameValidationHeader, limits, pushConfig.RetryConfig, d.PushWithMiddlewares, d.PushMetrics, a.logger), true, false, "POST") + a.RegisterRoute(PrometheusPushEndpoint, distributor.Handler(pushConfig.MaxRecvMsgSize, d.RequestBufferPool, a.sourceIPs, a.cfg.SkipLabelNameValidationHeader, a.cfg.SkipLabelCountValidationHeader, limits, pushConfig.RetryConfig, d.PushWithMiddlewares, d.PushMetrics, a.logger), true, false, "POST") a.RegisterRoute(OTLPPushEndpoint, distributor.OTLPHandler(pushConfig.MaxOTLPRequestSize, d.RequestBufferPool, a.sourceIPs, limits, pushConfig.RetryConfig, d.PushWithMiddlewares, d.PushMetrics, reg, a.logger, pushConfig.DirectOTLPTranslationEnabled), true, false, "POST") a.indexPage.AddLinks(defaultWeight, "Distributor", []IndexPageLink{ diff --git a/pkg/distributor/distributor.go b/pkg/distributor/distributor.go index c10a29c21d8..67fab01c3f4 100644 --- a/pkg/distributor/distributor.go +++ b/pkg/distributor/distributor.go @@ -198,10 +198,14 @@ type Config struct { // for testing and for extending the ingester by adding calls to the client IngesterClientFactory ring_client.PoolFactory `yaml:"-"` - // when true the distributor does not validate the label name and value, Mimir doesn't directly use - // this (and should never use it) but this feature is used by other projects built on top of it + // When SkipLabelValidation is true the distributor does not validate the label name and value, Mimir doesn't directly use + // this (and should never use it) but this feature is used by other projects built on top of it. SkipLabelValidation bool `yaml:"-"` + // When SkipLabelCountValidation is true the distributor does not validate the number of labels, Mimir doesn't directly use + // this (and should never use it) but this feature is used by other projects built on top of it. + SkipLabelCountValidation bool `yaml:"-"` + // This config is dynamically injected because it is defined in the querier config. ShuffleShardingLookbackPeriod time.Duration `yaml:"-"` StreamingChunksPerIngesterSeriesBufferSize uint64 `yaml:"-"` @@ -713,8 +717,8 @@ func (d *Distributor) checkSample(ctx context.Context, userID, cluster, replica // May alter timeseries data in-place. // The returned error may retain the series labels. // It uses the passed nowt time to observe the delay of sample timestamps. -func (d *Distributor) validateSeries(nowt time.Time, ts *mimirpb.PreallocTimeseries, userID, group string, skipLabelValidation bool, minExemplarTS, maxExemplarTS int64) error { - if err := validateLabels(d.sampleValidationMetrics, d.limits, userID, group, ts.Labels, skipLabelValidation); err != nil { +func (d *Distributor) validateSeries(nowt time.Time, ts *mimirpb.PreallocTimeseries, userID, group string, skipLabelValidation, skipLabelCountValidation bool, minExemplarTS, maxExemplarTS int64) error { + if err := validateLabels(d.sampleValidationMetrics, d.limits, userID, group, ts.Labels, skipLabelValidation, skipLabelCountValidation); err != nil { return err } @@ -1051,8 +1055,10 @@ func (d *Distributor) prePushValidationMiddleware(next PushFunc) PushFunc { d.labelsHistogram.Observe(float64(len(ts.Labels))) skipLabelValidation := d.cfg.SkipLabelValidation || req.GetSkipLabelValidation() + skipLabelCountValidation := d.cfg.SkipLabelCountValidation || req.GetSkipLabelCountValidation() + // Note that validateSeries may drop some data in ts. - validationErr := d.validateSeries(now, &req.Timeseries[tsIdx], userID, group, skipLabelValidation, minExemplarTS, maxExemplarTS) + validationErr := d.validateSeries(now, &req.Timeseries[tsIdx], userID, group, skipLabelValidation, skipLabelCountValidation, minExemplarTS, maxExemplarTS) // Errors in validation are considered non-fatal, as one series in a request may contain // invalid data but all the remaining series could be perfectly valid. diff --git a/pkg/distributor/distributor_ingest_storage_test.go b/pkg/distributor/distributor_ingest_storage_test.go index e1c7e2be21f..3fb0274792f 100644 --- a/pkg/distributor/distributor_ingest_storage_test.go +++ b/pkg/distributor/distributor_ingest_storage_test.go @@ -301,7 +301,7 @@ func TestDistributor_Push_ShouldReturnErrorMappedTo4xxStatusCodeIfWriteRequestCo sourceIPs, _ := middleware.NewSourceIPs("SomeField", "(.*)", false) // Send write request through the HTTP handler. - h := Handler(maxRecvMsgSize, nil, sourceIPs, false, overrides, RetryConfig{}, distributors[0].PushWithMiddlewares, nil, log.NewNopLogger()) + h := Handler(maxRecvMsgSize, nil, sourceIPs, false, false, overrides, RetryConfig{}, distributors[0].PushWithMiddlewares, nil, log.NewNopLogger()) h.ServeHTTP(resp, createRequest(t, marshalledReq)) assert.Equal(t, http.StatusBadRequest, resp.Code) }) diff --git a/pkg/distributor/distributor_test.go b/pkg/distributor/distributor_test.go index b67a17c5734..72a5ad262c2 100644 --- a/pkg/distributor/distributor_test.go +++ b/pkg/distributor/distributor_test.go @@ -1661,7 +1661,7 @@ func TestDistributor_ExemplarValidation(t *testing.T) { require.Len(t, regs, 1) for _, ts := range tc.req.Timeseries { - err := ds[0].validateSeries(now, &ts, "user", "test-group", false, tc.minExemplarTS, tc.maxExemplarTS) + err := ds[0].validateSeries(now, &ts, "user", "test-group", false, false, tc.minExemplarTS, tc.maxExemplarTS) assert.NoError(t, err) } @@ -1768,7 +1768,7 @@ func TestDistributor_HistogramReduction(t *testing.T) { require.Len(t, regs, 1) for _, ts := range tc.req.Timeseries { - err := ds[0].validateSeries(now, &ts, "user", "test-group", false, 0, 0) + err := ds[0].validateSeries(now, &ts, "user", "test-group", false, false, 0, 0) if tc.expectedError != nil { require.ErrorAs(t, err, &tc.expectedError) } else { diff --git a/pkg/distributor/push.go b/pkg/distributor/push.go index 7a5ad9ad25d..5f1cb8c0c72 100644 --- a/pkg/distributor/push.go +++ b/pkg/distributor/push.go @@ -44,8 +44,10 @@ var ( ) const ( - SkipLabelNameValidationHeader = "X-Mimir-SkipLabelNameValidation" - statusClientClosedRequest = 499 + SkipLabelNameValidationHeader = "X-Mimir-SkipLabelNameValidation" + SkipLabelCountValidationHeader = "X-Mimir-SkipLabelCountValidation" + + statusClientClosedRequest = 499 ) type RetryConfig struct { @@ -77,13 +79,14 @@ func Handler( requestBufferPool util.Pool, sourceIPs *middleware.SourceIPExtractor, allowSkipLabelNameValidation bool, + allowSkipLabelCountValidation bool, limits *validation.Overrides, retryCfg RetryConfig, push PushFunc, pushMetrics *PushMetrics, logger log.Logger, ) http.Handler { - return handler(maxRecvMsgSize, requestBufferPool, sourceIPs, allowSkipLabelNameValidation, limits, retryCfg, push, logger, func(ctx context.Context, r *http.Request, maxRecvMsgSize int, buffers *util.RequestBuffers, req *mimirpb.PreallocWriteRequest, _ log.Logger) error { + return handler(maxRecvMsgSize, requestBufferPool, sourceIPs, allowSkipLabelNameValidation, allowSkipLabelCountValidation, limits, retryCfg, push, logger, func(ctx context.Context, r *http.Request, maxRecvMsgSize int, buffers *util.RequestBuffers, req *mimirpb.PreallocWriteRequest, _ log.Logger) error { protoBodySize, err := util.ParseProtoReader(ctx, r.Body, int(r.ContentLength), maxRecvMsgSize, buffers, req, util.RawSnappy) if errors.Is(err, util.MsgSizeTooLargeErr{}) { err = distributorMaxWriteMessageSizeErr{actual: int(r.ContentLength), limit: maxRecvMsgSize} @@ -130,6 +133,7 @@ func handler( requestBufferPool util.Pool, sourceIPs *middleware.SourceIPExtractor, allowSkipLabelNameValidation bool, + allowSkipLabelCountValidation bool, limits *validation.Overrides, retryCfg RetryConfig, push PushFunc, @@ -177,6 +181,12 @@ func handler( req.SkipLabelValidation = false } + if allowSkipLabelCountValidation { + req.SkipLabelCountValidation = req.SkipLabelCountValidation && r.Header.Get(SkipLabelCountValidationHeader) == "true" + } else { + req.SkipLabelCountValidation = false + } + cleanup := func() { mimirpb.ReuseSlice(req.Timeseries) rb.CleanUp() diff --git a/pkg/distributor/push_test.go b/pkg/distributor/push_test.go index 29c2161272f..116b3e000bb 100644 --- a/pkg/distributor/push_test.go +++ b/pkg/distributor/push_test.go @@ -49,7 +49,7 @@ import ( func TestHandler_remoteWrite(t *testing.T) { req := createRequest(t, createPrometheusRemoteWriteProtobuf(t)) resp := httptest.NewRecorder() - handler := Handler(100000, nil, nil, false, validation.MockDefaultOverrides(), RetryConfig{}, verifyWritePushFunc(t, mimirpb.API), nil, log.NewNopLogger()) + handler := Handler(100000, nil, nil, false, false, validation.MockDefaultOverrides(), RetryConfig{}, verifyWritePushFunc(t, mimirpb.API), nil, log.NewNopLogger()) handler.ServeHTTP(resp, req) assert.Equal(t, 200, resp.Code) } @@ -114,19 +114,19 @@ func TestOTelMetricsToMetadata(t *testing.T) { } func TestHandler_mimirWriteRequest(t *testing.T) { - req := createRequest(t, createMimirWriteRequestProtobuf(t, false)) + req := createRequest(t, createMimirWriteRequestProtobuf(t, false, false)) resp := httptest.NewRecorder() sourceIPs, _ := middleware.NewSourceIPs("SomeField", "(.*)", false) - handler := Handler(100000, nil, sourceIPs, false, validation.MockDefaultOverrides(), RetryConfig{}, verifyWritePushFunc(t, mimirpb.RULE), nil, log.NewNopLogger()) + handler := Handler(100000, nil, sourceIPs, false, false, validation.MockDefaultOverrides(), RetryConfig{}, verifyWritePushFunc(t, mimirpb.RULE), nil, log.NewNopLogger()) handler.ServeHTTP(resp, req) assert.Equal(t, 200, resp.Code) } func TestHandler_contextCanceledRequest(t *testing.T) { - req := createRequest(t, createMimirWriteRequestProtobuf(t, false)) + req := createRequest(t, createMimirWriteRequestProtobuf(t, false, false)) resp := httptest.NewRecorder() sourceIPs, _ := middleware.NewSourceIPs("SomeField", "(.*)", false) - handler := Handler(100000, nil, sourceIPs, false, validation.MockDefaultOverrides(), RetryConfig{}, func(_ context.Context, req *Request) error { + handler := Handler(100000, nil, sourceIPs, false, false, validation.MockDefaultOverrides(), RetryConfig{}, func(_ context.Context, req *Request) error { defer req.CleanUp() return fmt.Errorf("the request failed: %w", context.Canceled) }, nil, log.NewNopLogger()) @@ -235,7 +235,7 @@ func TestHandler_EnsureSkipLabelNameValidationBehaviour(t *testing.T) { for _, tc := range tests { t.Run(tc.name, func(t *testing.T) { resp := httptest.NewRecorder() - handler := Handler(100000, nil, nil, tc.allowSkipLabelNameValidation, validation.MockDefaultOverrides(), RetryConfig{}, tc.verifyReqHandler, nil, log.NewNopLogger()) + handler := Handler(100000, nil, nil, tc.allowSkipLabelNameValidation, false, validation.MockDefaultOverrides(), RetryConfig{}, tc.verifyReqHandler, nil, log.NewNopLogger()) if !tc.includeAllowSkiplabelNameValidationHeader { tc.req.Header.Set(SkipLabelNameValidationHeader, "true") } @@ -245,6 +245,108 @@ func TestHandler_EnsureSkipLabelNameValidationBehaviour(t *testing.T) { } } +func TestHandler_EnsureSkipLabelCountValidationBehaviour(t *testing.T) { + tests := []struct { + name string + allowSkipLabelCountValidation bool + includeAllowSkipLabelCountValidationHeader bool + req *http.Request + verifyReqHandler PushFunc + expectedStatusCode int + }{ + { + name: "config flag set to false means SkipLabelCountValidation is false", + allowSkipLabelCountValidation: false, + includeAllowSkipLabelCountValidationHeader: true, + req: createRequest(t, createMimirWriteRequestProtobuf(t, false, false)), + verifyReqHandler: func(_ context.Context, pushReq *Request) error { + request, err := pushReq.WriteRequest() + assert.NoError(t, err) + assert.Len(t, request.Timeseries, 1) + assert.Equal(t, mimirpb.RULE, request.Source) + assert.False(t, request.SkipLabelCountValidation) + pushReq.CleanUp() + return nil + }, + expectedStatusCode: http.StatusOK, + }, + { + name: "config flag set to false means SkipLabelCountValidation is always false even if write requests sets it to true", + allowSkipLabelCountValidation: false, + includeAllowSkipLabelCountValidationHeader: true, + req: createRequest(t, createMimirWriteRequestProtobuf(t, false, true)), + verifyReqHandler: func(_ context.Context, pushReq *Request) error { + request, err := pushReq.WriteRequest() + require.NoError(t, err) + t.Cleanup(pushReq.CleanUp) + assert.Len(t, request.Timeseries, 1) + assert.Equal(t, mimirpb.RULE, request.Source) + assert.False(t, request.SkipLabelCountValidation) + return nil + }, + expectedStatusCode: http.StatusOK, + }, + { + name: "config flag set to true but write request set to false means SkipLabelCountValidation is false", + allowSkipLabelCountValidation: true, + req: createRequest(t, createMimirWriteRequestProtobuf(t, false, false)), + verifyReqHandler: func(_ context.Context, pushReq *Request) error { + request, err := pushReq.WriteRequest() + assert.NoError(t, err) + assert.Len(t, request.Timeseries, 1) + assert.Equal(t, mimirpb.RULE, request.Source) + assert.False(t, request.SkipLabelCountValidation) + pushReq.CleanUp() + return nil + }, + expectedStatusCode: http.StatusOK, + }, + { + name: "config flag set to true and write request set to true means SkipLabelCountValidation is true", + allowSkipLabelCountValidation: true, + req: createRequest(t, createMimirWriteRequestProtobuf(t, false, true)), + verifyReqHandler: func(_ context.Context, pushReq *Request) error { + request, err := pushReq.WriteRequest() + assert.NoError(t, err) + assert.Len(t, request.Timeseries, 1) + assert.Equal(t, mimirpb.RULE, request.Source) + assert.True(t, request.SkipLabelCountValidation) + pushReq.CleanUp() + return nil + }, + expectedStatusCode: http.StatusOK, + }, + { + name: "config flag set to true and write request set to true but header not sent means SkipLabelCountValidation is false", + allowSkipLabelCountValidation: true, + includeAllowSkipLabelCountValidationHeader: true, + req: createRequest(t, createMimirWriteRequestProtobuf(t, false, true)), + verifyReqHandler: func(_ context.Context, pushReq *Request) error { + request, err := pushReq.WriteRequest() + assert.NoError(t, err) + assert.Len(t, request.Timeseries, 1) + assert.Equal(t, mimirpb.RULE, request.Source) + assert.False(t, request.SkipLabelCountValidation) + pushReq.CleanUp() + return nil + }, + expectedStatusCode: http.StatusOK, + }, + } + for _, tc := range tests { + t.Run(tc.name, func(t *testing.T) { + resp := httptest.NewRecorder() + limits := validation.MockDefaultOverrides() + handler := Handler(100000, nil, nil, false, tc.allowSkipLabelCountValidation, limits, RetryConfig{}, tc.verifyReqHandler, nil, log.NewNopLogger()) + if !tc.includeAllowSkipLabelCountValidationHeader { + tc.req.Header.Set(SkipLabelCountValidationHeader, "true") + } + handler.ServeHTTP(resp, tc.req) + assert.Equal(t, tc.expectedStatusCode, resp.Code) + }) + } +} + func TestHandler_SkipExemplarUnmarshalingBasedOnLimits(t *testing.T) { timestampMs := time.Now().UnixMilli() @@ -355,7 +457,7 @@ func TestHandler_SkipExemplarUnmarshalingBasedOnLimits(t *testing.T) { require.NoError(t, err) var gotReqEncoded *Request - handler := Handler(100000, nil, nil, true, limits, RetryConfig{}, func(_ context.Context, pushReq *Request) error { + handler := Handler(100000, nil, nil, true, false, limits, RetryConfig{}, func(_ context.Context, pushReq *Request) error { gotReqEncoded = pushReq return nil }, nil, log.NewNopLogger()) @@ -441,7 +543,7 @@ func createPrometheusRemoteWriteProtobuf(t testing.TB) []byte { return inputBytes } -func createMimirWriteRequestProtobuf(t *testing.T, skipLabelNameValidation bool) []byte { +func createMimirWriteRequestProtobuf(t *testing.T, skipLabelNameValidation, skipLabelCountValidation bool) []byte { t.Helper() h := prompb.FromIntHistogram(1337, test.GenerateTestHistogram(1)) ts := mimirpb.PreallocTimeseries{ @@ -456,9 +558,10 @@ func createMimirWriteRequestProtobuf(t *testing.T, skipLabelNameValidation bool) }, } input := mimirpb.WriteRequest{ - Timeseries: []mimirpb.PreallocTimeseries{ts}, - Source: mimirpb.RULE, - SkipLabelValidation: skipLabelNameValidation, + Timeseries: []mimirpb.PreallocTimeseries{ts}, + Source: mimirpb.RULE, + SkipLabelValidation: skipLabelNameValidation, + SkipLabelCountValidation: skipLabelCountValidation, } inoutBytes, err := input.Marshal() require.NoError(t, err) @@ -498,7 +601,7 @@ func BenchmarkPushHandler(b *testing.B) { pushReq.CleanUp() return nil } - handler := Handler(100000, nil, nil, false, validation.MockDefaultOverrides(), RetryConfig{}, pushFunc, nil, log.NewNopLogger()) + handler := Handler(100000, nil, nil, false, false, validation.MockDefaultOverrides(), RetryConfig{}, pushFunc, nil, log.NewNopLogger()) b.ResetTimer() for iter := 0; iter < b.N; iter++ { req.Body = bufCloser{Buffer: buf} // reset Body so it can be read each time round the loop @@ -558,7 +661,7 @@ func TestHandler_ErrorTranslation(t *testing.T) { } logs := &concurrency.SyncBuffer{} - h := handler(10, nil, nil, false, validation.MockDefaultOverrides(), RetryConfig{}, pushFunc, log.NewLogfmtLogger(logs), parserFunc) + h := handler(10, nil, nil, false, false, validation.MockDefaultOverrides(), RetryConfig{}, pushFunc, log.NewLogfmtLogger(logs), parserFunc) recorder := httptest.NewRecorder() ctxWithUser := user.InjectOrgID(context.Background(), "testuser") @@ -648,7 +751,7 @@ func TestHandler_ErrorTranslation(t *testing.T) { } logs := &concurrency.SyncBuffer{} - h := handler(10, nil, nil, false, validation.MockDefaultOverrides(), RetryConfig{}, pushFunc, log.NewLogfmtLogger(logs), parserFunc) + h := handler(10, nil, nil, false, false, validation.MockDefaultOverrides(), RetryConfig{}, pushFunc, log.NewLogfmtLogger(logs), parserFunc) recorder := httptest.NewRecorder() ctxWithUser := user.InjectOrgID(context.Background(), "testuser") h.ServeHTTP(recorder, httptest.NewRequest(http.MethodPost, "/push", bufCloser{&bytes.Buffer{}}).WithContext(ctxWithUser)) diff --git a/pkg/distributor/validate.go b/pkg/distributor/validate.go index 8e51207d83d..21ce5adc2c4 100644 --- a/pkg/distributor/validate.go +++ b/pkg/distributor/validate.go @@ -374,7 +374,7 @@ func removeNonASCIIChars(in string) (out string) { // validateLabels returns an err if the labels are invalid. // The returned error may retain the provided series labels. -func validateLabels(m *sampleValidationMetrics, cfg labelValidationConfig, userID, group string, ls []mimirpb.LabelAdapter, skipLabelValidation bool) error { +func validateLabels(m *sampleValidationMetrics, cfg labelValidationConfig, userID, group string, ls []mimirpb.LabelAdapter, skipLabelValidation, skipLabelCountValidation bool) error { unsafeMetricName, err := extract.UnsafeMetricNameFromLabelAdapters(ls) if err != nil { m.missingMetricName.WithLabelValues(userID, group).Inc() @@ -386,8 +386,7 @@ func validateLabels(m *sampleValidationMetrics, cfg labelValidationConfig, userI return fmt.Errorf(invalidMetricNameMsgFormat, removeNonASCIIChars(unsafeMetricName)) } - numLabelNames := len(ls) - if numLabelNames > cfg.MaxLabelNamesPerSeries(userID) { + if !skipLabelCountValidation && len(ls) > cfg.MaxLabelNamesPerSeries(userID) { m.maxLabelNamesPerSeries.WithLabelValues(userID, group).Inc() metric, ellipsis := getMetricAndEllipsis(ls) return fmt.Errorf(tooManyLabelsMsgFormat, len(ls), cfg.MaxLabelNamesPerSeries(userID), metric, ellipsis) diff --git a/pkg/distributor/validate_test.go b/pkg/distributor/validate_test.go index b545e6401a7..ffb91b9d626 100644 --- a/pkg/distributor/validate_test.go +++ b/pkg/distributor/validate_test.go @@ -66,29 +66,34 @@ func TestValidateLabels(t *testing.T) { cfg.maxLabelNamesPerSeries = 2 for _, c := range []struct { - metric model.Metric - skipLabelNameValidation bool - err error + metric model.Metric + skipLabelNameValidation bool + skipLabelCountValidation bool + err error }{ { - map[model.LabelName]model.LabelValue{}, - false, - errors.New(noMetricNameMsgFormat), + metric: map[model.LabelName]model.LabelValue{}, + skipLabelNameValidation: false, + skipLabelCountValidation: false, + err: errors.New(noMetricNameMsgFormat), }, { - map[model.LabelName]model.LabelValue{model.MetricNameLabel: " "}, - false, - fmt.Errorf(invalidMetricNameMsgFormat, " "), + metric: map[model.LabelName]model.LabelValue{model.MetricNameLabel: " "}, + skipLabelNameValidation: false, + skipLabelCountValidation: false, + err: fmt.Errorf(invalidMetricNameMsgFormat, " "), }, { - map[model.LabelName]model.LabelValue{model.MetricNameLabel: "metric_name_with_\xb0_invalid_utf8_\xb0"}, - false, - fmt.Errorf(invalidMetricNameMsgFormat, "metric_name_with__invalid_utf8_ (non-ascii characters removed)"), + metric: map[model.LabelName]model.LabelValue{model.MetricNameLabel: "metric_name_with_\xb0_invalid_utf8_\xb0"}, + skipLabelNameValidation: false, + skipLabelCountValidation: false, + err: fmt.Errorf(invalidMetricNameMsgFormat, "metric_name_with__invalid_utf8_ (non-ascii characters removed)"), }, { - map[model.LabelName]model.LabelValue{model.MetricNameLabel: "valid", "foo ": "bar"}, - false, - fmt.Errorf( + metric: map[model.LabelName]model.LabelValue{model.MetricNameLabel: "valid", "foo ": "bar"}, + skipLabelNameValidation: false, + skipLabelCountValidation: false, + err: fmt.Errorf( invalidLabelMsgFormat, "foo ", mimirpb.FromLabelAdaptersToString( @@ -100,14 +105,16 @@ func TestValidateLabels(t *testing.T) { ), }, { - map[model.LabelName]model.LabelValue{model.MetricNameLabel: "valid"}, - false, - nil, + metric: map[model.LabelName]model.LabelValue{model.MetricNameLabel: "valid"}, + skipLabelNameValidation: false, + skipLabelCountValidation: false, + err: nil, }, { - map[model.LabelName]model.LabelValue{model.MetricNameLabel: "badLabelName", "this_is_a_really_really_long_name_that_should_cause_an_error": "test_value_please_ignore"}, - false, - fmt.Errorf( + metric: map[model.LabelName]model.LabelValue{model.MetricNameLabel: "badLabelName", "this_is_a_really_really_long_name_that_should_cause_an_error": "test_value_please_ignore"}, + skipLabelNameValidation: false, + skipLabelCountValidation: false, + err: fmt.Errorf( labelNameTooLongMsgFormat, "this_is_a_really_really_long_name_that_should_cause_an_error", mimirpb.FromLabelAdaptersToString( @@ -119,9 +126,10 @@ func TestValidateLabels(t *testing.T) { ), }, { - map[model.LabelName]model.LabelValue{model.MetricNameLabel: "badLabelValue", "much_shorter_name": "test_value_please_ignore_no_really_nothing_to_see_here"}, - false, - fmt.Errorf( + metric: map[model.LabelName]model.LabelValue{model.MetricNameLabel: "badLabelValue", "much_shorter_name": "test_value_please_ignore_no_really_nothing_to_see_here"}, + skipLabelNameValidation: false, + skipLabelCountValidation: false, + err: fmt.Errorf( labelValueTooLongMsgFormat, "much_shorter_name", "test_value_please_ignore_no_really_nothing_to_see_here", @@ -134,9 +142,10 @@ func TestValidateLabels(t *testing.T) { ), }, { - map[model.LabelName]model.LabelValue{model.MetricNameLabel: "foo", "bar": "baz", "blip": "blop"}, - false, - fmt.Errorf( + metric: map[model.LabelName]model.LabelValue{model.MetricNameLabel: "foo", "bar": "baz", "blip": "blop"}, + skipLabelNameValidation: false, + skipLabelCountValidation: false, + err: fmt.Errorf( tooManyLabelsMsgFormat, tooManyLabelsArgs( []mimirpb.LabelAdapter{ @@ -149,19 +158,28 @@ func TestValidateLabels(t *testing.T) { ), }, { - map[model.LabelName]model.LabelValue{model.MetricNameLabel: "foo", "invalid%label&name": "bar"}, - true, - nil, + metric: map[model.LabelName]model.LabelValue{model.MetricNameLabel: "foo", "bar": "baz", "blip": "blop"}, + skipLabelNameValidation: false, + skipLabelCountValidation: true, + err: nil, }, { - map[model.LabelName]model.LabelValue{model.MetricNameLabel: "foo", "label1": "你好"}, - false, - nil, + metric: map[model.LabelName]model.LabelValue{model.MetricNameLabel: "foo", "invalid%label&name": "bar"}, + skipLabelNameValidation: true, + skipLabelCountValidation: false, + err: nil, }, { - map[model.LabelName]model.LabelValue{model.MetricNameLabel: "foo", "label1": "abc\xfe\xfddef"}, - false, - fmt.Errorf( + metric: map[model.LabelName]model.LabelValue{model.MetricNameLabel: "foo", "label1": "你好"}, + skipLabelNameValidation: false, + skipLabelCountValidation: false, + err: nil, + }, + { + metric: map[model.LabelName]model.LabelValue{model.MetricNameLabel: "foo", "label1": "abc\xfe\xfddef"}, + skipLabelNameValidation: false, + skipLabelCountValidation: false, + err: fmt.Errorf( invalidLabelValueMsgFormat, "label1", "abc\xfe\xfddef", mimirpb.FromLabelAdaptersToString( @@ -173,12 +191,13 @@ func TestValidateLabels(t *testing.T) { ), }, { - map[model.LabelName]model.LabelValue{model.MetricNameLabel: "foo", "label1": "abc\xfe\xfddef"}, - true, - nil, + metric: map[model.LabelName]model.LabelValue{model.MetricNameLabel: "foo", "label1": "abc\xfe\xfddef"}, + skipLabelNameValidation: true, + skipLabelCountValidation: false, + err: nil, }, } { - err := validateLabels(s, cfg, userID, "custom label", mimirpb.FromMetricsToLabelAdapters(c.metric), c.skipLabelNameValidation) + err := validateLabels(s, cfg, userID, "custom label", mimirpb.FromMetricsToLabelAdapters(c.metric), c.skipLabelNameValidation, c.skipLabelCountValidation) assert.Equal(t, c.err, err, "wrong error") } @@ -381,7 +400,7 @@ func TestValidateLabelDuplication(t *testing.T) { actual := validateLabels(newSampleValidationMetrics(nil), cfg, userID, "", []mimirpb.LabelAdapter{ {Name: model.MetricNameLabel, Value: "a"}, {Name: model.MetricNameLabel, Value: "b"}, - }, false) + }, false, false) expected := fmt.Errorf( duplicateLabelMsgFormat, model.MetricNameLabel, @@ -398,7 +417,7 @@ func TestValidateLabelDuplication(t *testing.T) { {Name: model.MetricNameLabel, Value: "a"}, {Name: "a", Value: "a"}, {Name: "a", Value: "a"}, - }, false) + }, false, false) expected = fmt.Errorf( duplicateLabelMsgFormat, "a", diff --git a/pkg/mimirpb/mimir.pb.go b/pkg/mimirpb/mimir.pb.go index 89fee4d71ea..2fcc5ccde13 100644 --- a/pkg/mimirpb/mimir.pb.go +++ b/pkg/mimirpb/mimir.pb.go @@ -241,6 +241,8 @@ type WriteRequest struct { Metadata []*MetricMetadata `protobuf:"bytes,3,rep,name=metadata,proto3" json:"metadata,omitempty"` // Skip validation of label names and values. SkipLabelValidation bool `protobuf:"varint,1000,opt,name=skip_label_validation,json=skipLabelValidation,proto3" json:"skip_label_validation,omitempty"` + // Skip label count validation. + SkipLabelCountValidation bool `protobuf:"varint,1001,opt,name=skip_label_count_validation,json=skipLabelCountValidation,proto3" json:"skip_label_count_validation,omitempty"` // Skip unmarshaling of exemplars. skipUnmarshalingExemplars bool @@ -299,6 +301,13 @@ func (m *WriteRequest) GetSkipLabelValidation() bool { return false } +func (m *WriteRequest) GetSkipLabelCountValidation() bool { + if m != nil { + return m.SkipLabelCountValidation + } + return false +} + type WriteResponse struct { } @@ -1916,133 +1925,134 @@ func init() { func init() { proto.RegisterFile("mimir.proto", fileDescriptor_86d4d7485f544059) } var fileDescriptor_86d4d7485f544059 = []byte{ - // 2008 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x58, 0xcd, 0x6f, 0xdb, 0xc8, - 0x15, 0x17, 0x25, 0xea, 0x83, 0xcf, 0x92, 0x3d, 0x99, 0x64, 0x5d, 0xad, 0xb1, 0x2b, 0x3b, 0x5c, - 0x74, 0xeb, 0x06, 0xad, 0x53, 0x6c, 0xda, 0x2c, 0x36, 0x48, 0xd1, 0x52, 0x12, 0x13, 0xcb, 0x91, - 0x28, 0xef, 0x90, 0x72, 0x9a, 0x5e, 0x08, 0x5a, 0x1e, 0xdb, 0xc4, 0x8a, 0xa2, 0x4a, 0x52, 0xd9, - 0xb8, 0xa7, 0x5e, 0x5a, 0x14, 0x3d, 0xf5, 0xd2, 0x4b, 0xd1, 0x5b, 0x2f, 0x05, 0x8a, 0xfe, 0x1f, - 0x01, 0x7a, 0xc9, 0x71, 0xdb, 0x43, 0xd0, 0x38, 0x97, 0x3d, 0x2e, 0x8a, 0x9e, 0x7a, 0x2a, 0x66, - 0x86, 0x1f, 0xa2, 0x6c, 0xb7, 0x69, 0x9b, 0x1b, 0xdf, 0x7b, 0xbf, 0x79, 0xfc, 0xcd, 0x9b, 0xf7, - 0x1e, 0xdf, 0x10, 0x56, 0x3c, 0xd7, 0x73, 0x83, 0x9d, 0x59, 0xe0, 0x47, 0x3e, 0xae, 0x8d, 0xfd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19, 0xdf, 0x80, 0xf2, 0x53, 0x67, - 0x32, 0x17, 0x09, 0x53, 0x27, 0x42, 0x50, 0x35, 0xa8, 0x88, 0x2d, 0xe0, 0x9b, 0x50, 0xe7, 0xf9, - 0x15, 0x39, 0xde, 0xcc, 0xf6, 0x42, 0x0e, 0x2b, 0x91, 0x95, 0x54, 0x37, 0x08, 0x33, 0x17, 0xcc, - 0xaf, 0x94, 0xb8, 0xf8, 0x6d, 0x11, 0x56, 0xf3, 0x69, 0x83, 0x3f, 0x06, 0x39, 0x3a, 0x9b, 0x25, - 0xc7, 0xf5, 0xc1, 0x55, 0xe9, 0x15, 0x8b, 0xd6, 0xd9, 0x8c, 0x12, 0xbe, 0x00, 0x7f, 0x0b, 0xb0, - 0xc7, 0x75, 0xf6, 0xb1, 0xe3, 0xb9, 0x93, 0x33, 0x9b, 0x6f, 0x83, 0x51, 0x51, 0x08, 0x12, 0x96, - 0x07, 0xdc, 0x60, 0xb0, 0x2d, 0x61, 0x90, 0x4f, 0xe9, 0x64, 0xd6, 0x94, 0xb9, 0x9d, 0x3f, 0x33, - 0xdd, 0x7c, 0xea, 0x46, 0xcd, 0xb2, 0xd0, 0xb1, 0x67, 0xf5, 0x0c, 0x20, 0x7b, 0x13, 0x5e, 0x81, - 0xea, 0xc8, 0x78, 0x64, 0x0c, 0x1f, 0x1b, 0xa8, 0xc0, 0x84, 0xce, 0x70, 0x64, 0x58, 0x3a, 0x41, - 0x12, 0x56, 0xa0, 0xfc, 0x50, 0x1b, 0x3d, 0xd4, 0x51, 0x11, 0x37, 0x40, 0xd9, 0xed, 0x99, 0xd6, - 0xf0, 0x21, 0xd1, 0x06, 0xa8, 0x84, 0x31, 0xac, 0x72, 0x4b, 0xa6, 0x93, 0xd9, 0x52, 0x73, 0x34, - 0x18, 0x68, 0xe4, 0x09, 0x2a, 0xb3, 0x64, 0xee, 0x19, 0x0f, 0x86, 0xa8, 0x82, 0xeb, 0x50, 0x33, - 0x2d, 0xcd, 0xd2, 0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b, 0x16, 0xa8, 0x53, 0x58, 0x13, 0xd3, 0x42, 0x56, - 0x29, 0x69, 0x5a, 0x49, 0x97, 0xa4, 0x55, 0x31, 0x4b, 0xab, 0x3b, 0x50, 0x4d, 0x0e, 0x47, 0x0c, - 0x44, 0xef, 0x5e, 0x36, 0xd7, 0x70, 0x04, 0x49, 0x90, 0x6a, 0x08, 0x6b, 0x4b, 0x36, 0xdc, 0x02, - 0x38, 0xf4, 0xe7, 0xd3, 0x23, 0x27, 0x1e, 0xa5, 0xa5, 0xed, 0x32, 0x59, 0xd0, 0x30, 0x3e, 0x13, - 0xff, 0x73, 0x1a, 0x24, 0x69, 0xce, 0x05, 0xa6, 0x9d, 0xcf, 0x66, 0x34, 0x88, 0x13, 0x5d, 0x08, - 0x19, 0x77, 0x79, 0x81, 0xbb, 0x3a, 0x81, 0xeb, 0x4b, 0x9b, 0xe4, 0xc1, 0xcd, 0xb5, 0xa5, 0xe2, - 0x52, 0x5b, 0xc2, 0x1f, 0x5f, 0x8c, 0xeb, 0xbb, 0xcb, 0x53, 0x62, 0xea, 0x6f, 0x31, 0xa4, 0x7f, - 0x91, 0xa1, 0xf1, 0xe9, 0x9c, 0x06, 0x67, 0xc9, 0xf0, 0x8b, 0xef, 0x42, 0x25, 0x8c, 0x9c, 0x68, - 0x1e, 0xc6, 0xe3, 0x53, 0x2b, 0xf3, 0x93, 0x03, 0xee, 0x98, 0x1c, 0x45, 0x62, 0x34, 0xfe, 0x21, - 0x00, 0x65, 0xd3, 0xb0, 0xcd, 0x47, 0xaf, 0x0b, 0xd7, 0x82, 0xfc, 0x5a, 0x3e, 0x37, 0xf3, 0xc1, - 0x4b, 0xa1, 0xc9, 0x23, 0x8b, 0x07, 0x17, 0x78, 0x94, 0x14, 0x22, 0x04, 0xbc, 0xc3, 0xf8, 0x04, - 0xee, 0xf4, 0x84, 0x87, 0x29, 0x57, 0xc5, 0x26, 0xd7, 0x77, 0x9d, 0xc8, 0xd9, 0x2d, 0x90, 0x18, - 0xc5, 0xf0, 0x4f, 0xe9, 0x38, 0xf2, 0x03, 0xde, 0xa6, 0x72, 0xf8, 0x03, 0xae, 0x4f, 0xf0, 0x02, - 0xc5, 0xfd, 0x8f, 0x9d, 0x89, 0x13, 0xf0, 0x6f, 0x74, 0xde, 0x3f, 0xd7, 0xa7, 0xfe, 0xb9, 0xc4, - 0xf0, 0x9e, 0x13, 0x05, 0xee, 0x33, 0xde, 0xe3, 0x72, 0xf8, 0x01, 0xd7, 0x27, 0x78, 0x81, 0xc2, - 0x1b, 0x50, 0xfb, 0xdc, 0x09, 0xa6, 0xee, 0xf4, 0x44, 0xf4, 0x21, 0x85, 0xa4, 0x32, 0xdb, 0xb1, - 0x3b, 0x3d, 0xf6, 0xc5, 0x67, 0x58, 0x21, 0x42, 0x50, 0x3f, 0x84, 0x8a, 0x88, 0x2d, 0xfb, 0x84, - 0xe8, 0x84, 0x0c, 0x89, 0x98, 0x14, 0xcd, 0x51, 0xa7, 0xa3, 0x9b, 0x26, 0x92, 0xc4, 0xf7, 0x44, - 0xfd, 0x8d, 0x04, 0x4a, 0x1a, 0x48, 0x36, 0x02, 0x1a, 0x43, 0x43, 0x17, 0x50, 0xab, 0x37, 0xd0, - 0x87, 0x23, 0x0b, 0x49, 0x6c, 0x1e, 0xec, 0x68, 0x46, 0x47, 0xef, 0xeb, 0x5d, 0x31, 0x57, 0xea, - 0x3f, 0xd2, 0x3b, 0x23, 0xab, 0x37, 0x34, 0x50, 0x89, 0x19, 0xdb, 0x5a, 0xd7, 0xee, 0x6a, 0x96, - 0x86, 0x64, 0x26, 0xf5, 0xd8, 0x28, 0x6a, 0x68, 0x7d, 0x54, 0xc6, 0x6b, 0xb0, 0x32, 0x32, 0xb4, - 0x03, 0xad, 0xd7, 0xd7, 0xda, 0x7d, 0x1d, 0x55, 0xd8, 0x5a, 0x63, 0x68, 0xd9, 0x0f, 0x86, 0x23, - 0xa3, 0x8b, 0xaa, 0x6c, 0x26, 0x65, 0xa2, 0xd6,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xf4, 0xe2, 0xbc, 0x25, 0xfd, 0xed, 0xbc, 0x25, 0x7d, 0x79, 0xde, 0x2a, 0x7c, 0x75, 0xde, - 0x92, 0x7e, 0xfd, 0xba, 0x55, 0x78, 0xf1, 0xba, 0x55, 0xf8, 0xe2, 0x75, 0xab, 0xf0, 0xe3, 0x2a, - 0xff, 0x31, 0x36, 0x3b, 0x3c, 0xac, 0xf0, 0x5f, 0x5c, 0x77, 0xfe, 0x15, 0x00, 0x00, 0xff, 0xff, - 0xc8, 0xf0, 0x66, 0xfb, 0x2a, 0x13, 0x00, 0x00, + // 2029 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x58, 0xcf, 0x93, 0xdb, 0x48, + 0xf5, 0xb7, 0x6c, 0xf9, 0x87, 0xde, 0xd8, 0x33, 0x9d, 0x4e, 0x36, 0x5f, 0x6f, 0xbe, 0x1b, 0x27, + 0xd1, 0x16, 0xcb, 0x90, 0x82, 0x09, 0xb5, 0x81, 0x6c, 0x6d, 0x2a, 0xfc, 0x90, 0x6d, 0x25, 0xe3, + 0xc4, 0x96, 0x67, 0x5b, 0xf2, 0x84, 0x70, 0x51, 0x69, 0x3c, 0x3d, 0x33, 0xaa, 0xb5, 0x2c, 0x23, + 0xc9, 0xd9, 0x0c, 0x27, 0x2e, 0x50, 0x14, 0x27, 0x2e, 0x5c, 0x28, 0x6e, 0x5c, 0xa8, 0xe2, 0x1f, + 0x49, 0x15, 0x97, 0x1c, 0x17, 0x0e, 0x29, 0x32, 0xb9, 0x2c, 0x07, 0xaa, 0xb6, 0x28, 0x4e, 0x9c, + 0xa8, 0xee, 0xd6, 0x4f, 0xcf, 0x0c, 0x04, 0xc8, 0x4d, 0xef, 0xbd, 0xcf, 0x7b, 0xfd, 0xba, 0xdf, + 0x8f, 0x7e, 0x2d, 0x58, 0xf3, 0x5c, 0xcf, 0x0d, 0xb6, 0x16, 0x81, 0x1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0x37, 0x34, 0xc3, 0x8a, 0x1d, 0x68, 0x76, 0xbf, 0xf3, 0xe2, + 0x55, 0xa7, 0xf4, 0xf9, 0xab, 0x4e, 0xe9, 0xcb, 0x57, 0x1d, 0xe9, 0x27, 0x27, 0x1d, 0xe9, 0x77, + 0x27, 0x1d, 0xe9, 0xf9, 0x49, 0x47, 0x7a, 0x71, 0xd2, 0x91, 0xfe, 0x7c, 0xd2, 0x91, 0xbe, 0x38, + 0xe9, 0x94, 0xbe, 0x3c, 0xe9, 0x48, 0xbf, 0x7c, 0xdd, 0x29, 0xbd, 0x78, 0xdd, 0x29, 0x7d, 0xfe, + 0xba, 0x53, 0xfa, 0x61, 0x9d, 0xff, 0x58, 0x5b, 0xec, 0xed, 0xd5, 0xf8, 0x2f, 0xb2, 0xdb, 0xff, + 0x0c, 0x00, 0x00, 0xff, 0xff, 0xc3, 0xd5, 0x81, 0xca, 0x6a, 0x13, 0x00, 0x00, } func (x ErrorCause) String() string { @@ -2128,6 +2138,9 @@ func (this *WriteRequest) Equal(that interface{}) bool { if this.SkipLabelValidation != that1.SkipLabelValidation { return false } + if this.SkipLabelCountValidation != that1.SkipLabelCountValidation { + return false + } return true } func (this *WriteResponse) Equal(that interface{}) bool { @@ -3195,7 +3208,7 @@ func (this *WriteRequest) GoString() string { if this == nil { return "nil" } - s := make([]string, 0, 8) + s := make([]string, 0, 9) s = append(s, "&mimirpb.WriteRequest{") s = append(s, "Timeseries: "+fmt.Sprintf("%#v", this.Timeseries)+",\n") s = append(s, "Source: "+fmt.Sprintf("%#v", this.Source)+",\n") @@ -3203,6 +3216,7 @@ func (this *WriteRequest) GoString() string { s = append(s, "Metadata: "+fmt.Sprintf("%#v", this.Metadata)+",\n") } s = append(s, "SkipLabelValidation: "+fmt.Sprintf("%#v", this.SkipLabelValidation)+",\n") + s = append(s, "SkipLabelCountValidation: "+fmt.Sprintf("%#v", this.SkipLabelCountValidation)+",\n") s = append(s, "}") return strings.Join(s, "") } @@ -3665,6 +3679,18 @@ func (m *WriteRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if m.SkipLabelCountValidation { + i-- + if m.SkipLabelCountValidation { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x3e + i-- + dAtA[i] = 0xc8 + } if m.SkipLabelValidation { i-- if m.SkipLabelValidation { @@ -5062,6 +5088,9 @@ func (m *WriteRequest) Size() (n int) { if m.SkipLabelValidation { n += 3 } + if m.SkipLabelCountValidation { + n += 3 + } return n } @@ -5683,6 +5712,7 @@ func (this *WriteRequest) String() string { `Source:` + fmt.Sprintf("%v", this.Source) + `,`, `Metadata:` + repeatedStringForMetadata + `,`, `SkipLabelValidation:` + fmt.Sprintf("%v", this.SkipLabelValidation) + `,`, + `SkipLabelCountValidation:` + fmt.Sprintf("%v", this.SkipLabelCountValidation) + `,`, `}`, }, "") return s @@ -6260,6 +6290,26 @@ func (m *WriteRequest) Unmarshal(dAtA []byte) error { } } m.SkipLabelValidation = bool(v != 0) + case 1001: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field SkipLabelCountValidation", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMimir + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.SkipLabelCountValidation = bool(v != 0) default: iNdEx = preIndex skippy, err := skipMimir(dAtA[iNdEx:]) diff --git a/pkg/mimirpb/mimir.pb.go.expdiff b/pkg/mimirpb/mimir.pb.go.expdiff index 8d0982e5c43..0ac49f36b50 100644 --- a/pkg/mimirpb/mimir.pb.go.expdiff +++ b/pkg/mimirpb/mimir.pb.go.expdiff @@ -1,18 +1,18 @@ diff --git a/pkg/mimirpb/mimir.pb.go b/pkg/mimirpb/mimir.pb.go -index 8e2109f8ae..1ec0a3ecf9 100644 +index 2fcc5ccde1..0688358568 100644 --- a/pkg/mimirpb/mimir.pb.go +++ b/pkg/mimirpb/mimir.pb.go -@@ -241,9 +241,6 @@ type WriteRequest struct { - Metadata []*MetricMetadata `protobuf:"bytes,3,rep,name=metadata,proto3" json:"metadata,omitempty"` - // Skip validation of label names and values. +@@ -243,9 +243,6 @@ type WriteRequest struct { SkipLabelValidation bool `protobuf:"varint,1000,opt,name=skip_label_validation,json=skipLabelValidation,proto3" json:"skip_label_validation,omitempty"` + // Skip label count validation. + SkipLabelCountValidation bool `protobuf:"varint,1001,opt,name=skip_label_count_validation,json=skipLabelCountValidation,proto3" json:"skip_label_count_validation,omitempty"` - - // Skip unmarshaling of exemplars. - skipUnmarshalingExemplars bool } func (m *WriteRequest) Reset() { *m = WriteRequest{} } -@@ -383,9 +380,6 @@ type TimeSeries struct { +@@ -392,9 +389,6 @@ type TimeSeries struct { Samples []Sample `protobuf:"bytes,2,rep,name=samples,proto3" json:"samples"` Exemplars []Exemplar `protobuf:"bytes,3,rep,name=exemplars,proto3" json:"exemplars"` Histograms []Histogram `protobuf:"bytes,4,rep,name=histograms,proto3" json:"histograms"` @@ -22,7 +22,7 @@ index 8e2109f8ae..1ec0a3ecf9 100644 } func (m *TimeSeries) Reset() { *m = TimeSeries{} } -@@ -6182,7 +6176,6 @@ func (m *WriteRequest) Unmarshal(dAtA []byte) error { +@@ -6212,7 +6206,6 @@ func (m *WriteRequest) Unmarshal(dAtA []byte) error { return io.ErrUnexpectedEOF } m.Timeseries = append(m.Timeseries, PreallocTimeseries{}) @@ -30,7 +30,7 @@ index 8e2109f8ae..1ec0a3ecf9 100644 if err := m.Timeseries[len(m.Timeseries)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } -@@ -6535,11 +6528,9 @@ func (m *TimeSeries) Unmarshal(dAtA []byte) error { +@@ -6585,11 +6578,9 @@ func (m *TimeSeries) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } diff --git a/pkg/mimirpb/mimir.proto b/pkg/mimirpb/mimir.proto index bd498791e0a..a22b619cdfe 100644 --- a/pkg/mimirpb/mimir.proto +++ b/pkg/mimirpb/mimir.proto @@ -30,6 +30,9 @@ message WriteRequest { // Skip validation of label names and values. bool skip_label_validation = 1000; + + // Skip label count validation. + bool skip_label_count_validation = 1001; } message WriteResponse {} diff --git a/pkg/mimirpb/split_test.go b/pkg/mimirpb/split_test.go index 18f36d2f685..5ddf7d0bd14 100644 --- a/pkg/mimirpb/split_test.go +++ b/pkg/mimirpb/split_test.go @@ -166,7 +166,7 @@ func TestSplitWriteRequestByMaxMarshalSize_WriteRequestHasChanged(t *testing.T) // If the fields of WriteRequest have changed, then you will probably need to modify // the SplitWriteRequestByMaxMarshalSize() implementation accordingly! - assert.ElementsMatch(t, []string{"Timeseries", "Source", "Metadata", "SkipLabelValidation", "skipUnmarshalingExemplars"}, fieldNames) + assert.ElementsMatch(t, []string{"Timeseries", "Source", "Metadata", "SkipLabelValidation", "SkipLabelCountValidation", "skipUnmarshalingExemplars"}, fieldNames) } func BenchmarkSplitWriteRequestByMaxMarshalSize(b *testing.B) {