Skip to content

Commit

Permalink
Merge branch 'opensearch-project:main' into saas-with-core-refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
san81 authored Oct 17, 2024
2 parents a9700cf + 2575db3 commit 3ecd1e4
Show file tree
Hide file tree
Showing 10 changed files with 25 additions and 10 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ subprojects {

configure(subprojects.findAll {it.name != 'data-prepper-api'}) {
dependencies {
implementation platform('software.amazon.awssdk:bom:2.21.23')
implementation platform('software.amazon.awssdk:bom:2.25.11')
implementation 'jakarta.validation:jakarta.validation-api:3.0.2'
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,9 @@ public AggregateProcessor(final AggregateProcessorConfig aggregateProcessorConfi
pluginMetrics.gauge(CURRENT_AGGREGATE_GROUPS, aggregateGroupManager, AggregateGroupManager::getAllGroupsSize);

if (aggregateProcessorConfig.getWhenCondition() != null && (!expressionEvaluator.isValidExpressionStatement(aggregateProcessorConfig.getWhenCondition()))) {
throw new InvalidPluginConfigurationException("aggregate_when {} is not a valid expression statement. See https://opensearch.org/docs/latest/data-prepper/pipelines/expression-syntax/ for valid expression syntax");
throw new InvalidPluginConfigurationException(
String.format("aggregate_when \"%s\" is not a valid expression statement. See https://opensearch.org/docs/latest/data-prepper/pipelines/expression-syntax/ for valid expression syntax",
aggregateProcessorConfig.getWhenCondition()));
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,9 @@ public DateProcessor(PluginMetrics pluginMetrics, final DateProcessorConfig date
extractKeyAndFormatters();

if (dateProcessorConfig.getDateWhen() != null && (!expressionEvaluator.isValidExpressionStatement(dateProcessorConfig.getDateWhen()))) {
throw new InvalidPluginConfigurationException("date_when {} is not a valid expression statement. See https://opensearch.org/docs/latest/data-prepper/pipelines/expression-syntax/ for valid expression syntax");
throw new InvalidPluginConfigurationException(
String.format("date_when \"%s\" is not a valid expression statement. See https://opensearch.org/docs/latest/data-prepper/pipelines/expression-syntax/ for valid expression syntax",
dateProcessorConfig.getDateWhen()));
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,9 @@ public DissectProcessor(PluginMetrics pluginMetrics, final DissectProcessorConfi

if (dissectConfig.getDissectWhen() != null &&
(!expressionEvaluator.isValidExpressionStatement(dissectConfig.getDissectWhen()))) {
throw new InvalidPluginConfigurationException("dissect_when {} is not a valid expression statement. See https://opensearch.org/docs/latest/data-prepper/pipelines/expression-syntax/ for valid expression syntax");
throw new InvalidPluginConfigurationException(
String.format("dissect_when \"%s\" is not a valid expression statement. See https://opensearch.org/docs/latest/data-prepper/pipelines/expression-syntax/ for valid expression syntax",
dissectConfig.getDissectWhen()));
}

}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,9 @@ public FlattenProcessor(final PluginMetrics pluginMetrics, final FlattenProcesso

if (config.getFlattenWhen() != null &&
(!expressionEvaluator.isValidExpressionStatement(config.getFlattenWhen()))) {
throw new InvalidPluginConfigurationException("flatten_when {} is not a valid expression statement. See https://opensearch.org/docs/latest/data-prepper/pipelines/expression-syntax/ for valid expression syntax");
throw new InvalidPluginConfigurationException(
String.format("flatten_when \"%s\" is not a valid expression statement. See https://opensearch.org/docs/latest/data-prepper/pipelines/expression-syntax/ for valid expression syntax",
config.getFlattenWhen()));
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,9 @@ public GeoIPProcessor(final PluginMetrics pluginMetrics,

if (geoIPProcessorConfig.getWhenCondition() != null &&
(!expressionEvaluator.isValidExpressionStatement(geoIPProcessorConfig.getWhenCondition()))) {
throw new InvalidPluginConfigurationException("geoip_when {} is not a valid expression statement. See https://opensearch.org/docs/latest/data-prepper/pipelines/expression-syntax/ for valid expression syntax");
throw new InvalidPluginConfigurationException(
String.format("geoip_when \"%s\" is not a valid expression statement. See https://opensearch.org/docs/latest/data-prepper/pipelines/expression-syntax/ for valid expression syntax",
geoIPProcessorConfig.getWhenCondition()));
}

this.geoIPProcessorService = geoIpConfigSupplier.getGeoIPProcessorService().orElseThrow(() ->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,9 @@ public GrokProcessor(final PluginMetrics pluginMetrics,

if (grokProcessorConfig.getGrokWhen() != null &&
(!expressionEvaluator.isValidExpressionStatement(grokProcessorConfig.getGrokWhen()))) {
throw new InvalidPluginConfigurationException("grok_when {} is not a valid expression statement. See https://opensearch.org/docs/latest/data-prepper/pipelines/expression-syntax/ for valid expression syntax");
throw new InvalidPluginConfigurationException(
String.format("grok_when \"%s\" is not a valid expression statement. See https://opensearch.org/docs/latest/data-prepper/pipelines/expression-syntax/ for valid expression syntax",
grokProcessorConfig.getGrokWhen()));
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@
import java.util.concurrent.TimeUnit;
import java.util.concurrent.TimeoutException;

import static org.opensearch.dataprepper.logging.DataPrepperMarkers.NOISY;

public class KinesisService {
private static final Logger LOG = LoggerFactory.getLogger(KinesisService.class);
private static final int GRACEFUL_SHUTDOWN_WAIT_INTERVAL_SECONDS = 20;
Expand Down Expand Up @@ -138,7 +140,7 @@ public Scheduler getScheduler(final Buffer<Record<Event>> buffer) {
try {
scheduler = createScheduler(buffer);
} catch (Exception ex) {
LOG.error("Caught exception when initializing KCL Scheduler. Will retry");
LOG.error(NOISY, "Caught exception when initializing KCL Scheduler. Will retry", ex);
}

if (scheduler == null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,8 @@ public static IndexConfiguration readIndexConfig(final PluginSetting pluginSetti

builder = builder.withVersionExpression(versionExpression);
if (versionExpression != null && (!expressionEvaluator.isValidFormatExpression(versionExpression))) {
throw new InvalidPluginConfigurationException("document_version {} is not a valid format expression.");
throw new InvalidPluginConfigurationException(
String.format("document_version \"%s\" is not a valid format expression.", versionExpression));
}

builder = builder.withVersionType(versionType);
Expand Down
2 changes: 1 addition & 1 deletion data-prepper-plugins/s3-sink/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ dependencies {
implementation 'software.amazon.awssdk:netty-nio-client'
implementation 'software.amazon.awssdk:s3'
implementation 'software.amazon.awssdk:sts'
implementation 'software.amazon.awssdk:securitylake:2.28.20'
implementation 'software.amazon.awssdk:securitylake'
implementation 'org.jetbrains.kotlin:kotlin-stdlib:1.9.22'
implementation project(':data-prepper-plugins:avro-codecs')
implementation libs.avro.core
Expand Down

0 comments on commit 3ecd1e4

Please sign in to comment.