From bf5ce0d3a2a8027916e52509cfd32ef6f3493f42 Mon Sep 17 00:00:00 2001 From: bryan-aguilar <46550959+bryan-aguilar@users.noreply.github.com> Date: Wed, 11 Oct 2023 09:27:47 -0700 Subject: [PATCH] [chore] [exporter/awscloudwatchlogs] Remove duplicate consumer check (#27625) **Description:** v0.87.0 `exporterhelper.queue_settings.validate()` verifies the consumer setting for us. We no longer need to duplicate that validation. **Link to tracking Issue:** #27624 --- exporter/awscloudwatchlogsexporter/config.go | 7 ------- exporter/awscloudwatchlogsexporter/config_test.go | 2 +- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/exporter/awscloudwatchlogsexporter/config.go b/exporter/awscloudwatchlogsexporter/config.go index 76ac501e6d22..dfaa851ee34a 100644 --- a/exporter/awscloudwatchlogsexporter/config.go +++ b/exporter/awscloudwatchlogsexporter/config.go @@ -68,13 +68,6 @@ func (config *Config) Validate() error { return err } - // TODO: once QueueSettings.Validate validate the number of consumers remove the next - // verification - - if config.QueueSettings.NumConsumers < 1 { - return errors.New("'sending_queue.num_consumers' must be 1 or greater") - } - if retErr := cwlogs.ValidateRetentionValue(config.LogRetention); retErr != nil { return retErr } diff --git a/exporter/awscloudwatchlogsexporter/config_test.go b/exporter/awscloudwatchlogsexporter/config_test.go index b372e8032666..baa3c6df4596 100644 --- a/exporter/awscloudwatchlogsexporter/config_test.go +++ b/exporter/awscloudwatchlogsexporter/config_test.go @@ -76,7 +76,7 @@ func TestLoadConfig(t *testing.T) { }, { id: component.NewIDWithName(metadata.Type, "invalid_num_consumers"), - errorMessage: "'sending_queue.num_consumers' must be 1 or greater", + errorMessage: "number of queue consumers must be positive", }, { id: component.NewIDWithName(metadata.Type, "invalid_required_field_stream"),