diff --git a/NOTICE b/NOTICE index b7c85d5e4837d017f616a150f3bbc318ef6a3999..fa6a65505b6076778fa76e8bb6f254154964e8fc 100644 --- a/NOTICE +++ b/NOTICE @@ -284,7 +284,6 @@ The following software have components provided under the terms of this license: - io.grpc:grpc-services (from https://github.com/grpc/grpc-java) - io.grpc:grpc-stub (from https://github.com/grpc/grpc-java) - io.grpc:grpc-xds (from https://github.com/grpc/grpc-java) -- ion-java (from https://github.com/amzn/ion-java/, https://github.com/amznlabs/ion-java/) - jackson-databind (from http://github.com/FasterXML/jackson, http://wiki.fasterxml.com/JacksonHome, https://github.com/FasterXML/jackson) - java-cloudant (from https://cloudant.com) - javatuples (from http://www.javatuples.org) @@ -306,6 +305,7 @@ The following software have components provided under the terms of this license: - proto-google-common-protos (from https://github.com/googleapis/api-client-staging, https://github.com/googleapis/googleapis, https://github.com/googleapis/java-iam/proto-google-common-protos, https://github.com/googleapis/sdk-platform-java) - proto-google-iam-v1 (from https://github.com/googleapis/googleapis, https://github.com/googleapis/java-iam/proto-google-iam-v1, https://github.com/googleapis/sdk-platform-java) - resilience4j (from https://github.com/resilience4j/resilience4j, https://resilience4j.readme.io, ttps://resilience4j.readme.io) +- software.amazon.ion:ion-java (from https://github.com/amzn/ion-java/) - spring-boot-starter-undertow (from <https://spring.io/projects/spring-boot>, https://spring.io/projects/spring-boot) - springdoc-openapi-common (from <https://repo1.maven.org/maven2/org/springdoc/springdoc-openapi-common>, https://repo1.maven.org/maven2/org/springdoc/springdoc-openapi-common) - springdoc-openapi-ui (from https://github.com/springdoc/springdoc-openapi, https://repo1.maven.org/maven2/org/springdoc/springdoc-openapi-ui) @@ -463,14 +463,10 @@ EPL-1.0 The following software have components provided under the terms of this license: - AspectJ Weaver (from http://www.aspectj.org, https://www.eclipse.org/aspectj/) -- JUnit Jupiter (Aggregator) (from https://junit.org/junit5/) - JUnit Jupiter API (from http://junit.org/junit5/, https://junit.org/junit5/) - JUnit Jupiter Engine (from http://junit.org/junit5/, https://junit.org/junit5/) - JUnit Jupiter Params (from http://junit.org/junit5/, https://junit.org/junit5/) -- JUnit Platform Engine API (from http://junit.org/junit5/, https://junit.org/junit5/) - JUnit Vintage Engine (from http://junit.org/junit5/, https://junit.org/junit5/) -- Jakarta Annotations API (from https://projects.eclipse.org/projects/ee4j.ca) -- Jakarta Validation API (from https://beanvalidation.org) - Jakarta WebSocket - Server API (from https://projects.eclipse.org/projects/ee4j.websocket, https://repo1.maven.org/maven2/org/jboss/spec/javax/websocket/jboss-websocket-api_1.1_spec) - Java Servlet 4.0 API - Logback Contrib :: JSON :: Classic (from https://repo1.maven.org/maven2/ch/qos/logback/contrib/logback-json-classic) @@ -512,7 +508,6 @@ GPL-2.0-only The following software have components provided under the terms of this license: - JBoss Jakarta Annotations API (from <https://github.com/jboss/jboss-jakarta-annotations-api_spec>, https://github.com/jboss/jboss-jakarta-annotations-api_spec) -- Jakarta Annotations API (from https://projects.eclipse.org/projects/ee4j.ca) - Jakarta WebSocket - Server API (from https://projects.eclipse.org/projects/ee4j.websocket, https://repo1.maven.org/maven2/org/jboss/spec/javax/websocket/jboss-websocket-api_1.1_spec) ======================================================================== @@ -539,7 +534,6 @@ GPL-3.0-only ======================================================================== The following software have components provided under the terms of this license: -- Jakarta Annotations API (from https://projects.eclipse.org/projects/ee4j.ca) - Java Servlet 4.0 API ======================================================================== @@ -680,6 +674,14 @@ The following software have components provided under the terms of this license: - Netty/Codec (from https://repo1.maven.org/maven2/io/netty/netty-codec) +======================================================================== +gpl-2.0-classpath +======================================================================== +The following software have components provided under the terms of this license: + +- Jakarta Annotations API (from https://projects.eclipse.org/projects/ee4j.ca) +- Jakarta Validation API (from https://beanvalidation.org) + ======================================================================== public-domain ======================================================================== @@ -692,10 +694,3 @@ The following software have components provided under the terms of this license: - Undertow Core (from <https://repo1.maven.org/maven2/io/undertow/undertow-core>, https://repo1.maven.org/maven2/io/undertow/undertow-core) - Undertow WebSockets JSR356 implementations (from <https://repo1.maven.org/maven2/io/undertow/undertow-websockets-jsr>, https://repo1.maven.org/maven2/io/undertow/undertow-websockets-jsr) - XNIO API (from <http://www.jboss.org/xnio>, http://www.jboss.org/xnio) - -======================================================================== -unknown -======================================================================== -The following software have components provided under the terms of this license: - -- JUnit Jupiter (Aggregator) (from https://junit.org/junit5/) diff --git a/devops/gc/deploy/templates/deploy-redis.yaml b/devops/gc/deploy/templates/deploy-redis.yaml index ddafa905ba6858b47654883ecceffd7c49c7030c..40a6716ec37f98417c805f0b7e5fa6d218c5a354 100644 --- a/devops/gc/deploy/templates/deploy-redis.yaml +++ b/devops/gc/deploy/templates/deploy-redis.yaml @@ -4,6 +4,8 @@ kind: Deployment metadata: name: {{ printf "redis-%s" .Values.conf.appName | quote }} namespace: {{ .Release.Namespace | quote }} + labels: + type: infra spec: replicas: 1 selector: diff --git a/devops/gc/deploy/templates/deployment.yaml b/devops/gc/deploy/templates/deployment.yaml index 998f9ea80897cadbba3a78d6cc7f7e97591207b8..d5187b34f82ae6e48ca972f8116605a1b60221f2 100644 --- a/devops/gc/deploy/templates/deployment.yaml +++ b/devops/gc/deploy/templates/deployment.yaml @@ -3,6 +3,8 @@ kind: Deployment metadata: labels: app: {{ .Values.conf.appName | quote}} + type: core + source: java name: {{ .Values.conf.appName | quote}} namespace: {{ .Release.Namespace | quote}} spec: diff --git a/provider/notification-aws/src/main/java/org/opengroup/osdu/notification/provider/aws/queue/NotificationRetrySQSHandler.java b/provider/notification-aws/src/main/java/org/opengroup/osdu/notification/provider/aws/queue/NotificationRetrySQSHandler.java index 6aaf28899a29493cd26b26a3f33b00085509d437..20163fb57dc4ecfce97bf4056142f2e9a8386c5d 100644 --- a/provider/notification-aws/src/main/java/org/opengroup/osdu/notification/provider/aws/queue/NotificationRetrySQSHandler.java +++ b/provider/notification-aws/src/main/java/org/opengroup/osdu/notification/provider/aws/queue/NotificationRetrySQSHandler.java @@ -70,7 +70,8 @@ public class NotificationRetrySQSHandler { private void processNotifications() throws InterruptedException { List<Message> messages; logger.info("Running notification Retry SQS processor"); - while (true) { + boolean loopVariable = true; + while (loopVariable) { try { AmazonSQSConfig sqsConfig = new AmazonSQSConfig(region); AmazonSQS sqsClient = sqsConfig.AmazonSQS(); diff --git a/provider/notification-aws/src/main/java/org/opengroup/osdu/notification/provider/aws/queue/NotificationSQSHandler.java b/provider/notification-aws/src/main/java/org/opengroup/osdu/notification/provider/aws/queue/NotificationSQSHandler.java index d4e7fe89e8588fcfa709a7990d3d430f6ce5c6d3..13ed80767d8133282fdfd009c9ceee09049b9403 100644 --- a/provider/notification-aws/src/main/java/org/opengroup/osdu/notification/provider/aws/queue/NotificationSQSHandler.java +++ b/provider/notification-aws/src/main/java/org/opengroup/osdu/notification/provider/aws/queue/NotificationSQSHandler.java @@ -70,7 +70,8 @@ public class NotificationSQSHandler { private void processNotifications() throws InterruptedException { List<Message> messages; logger.info("Running notification SQS processor"); - while (true) { + boolean loopVariable = true; + while (loopVariable) { try { AmazonSQSConfig sqsConfig = new AmazonSQSConfig(region); AmazonSQS sqsClient = sqsConfig.AmazonSQS(); diff --git a/provider/notification-aws/src/main/java/org/opengroup/osdu/notification/provider/aws/queue/impl/NotificationQueueServiceImpl.java b/provider/notification-aws/src/main/java/org/opengroup/osdu/notification/provider/aws/queue/impl/NotificationQueueServiceImpl.java index 6cc80cb349ff13bf36820e747ae467d4f0090eb6..81089907f2529c81bac58e53ee84b6a29a92ba90 100644 --- a/provider/notification-aws/src/main/java/org/opengroup/osdu/notification/provider/aws/queue/impl/NotificationQueueServiceImpl.java +++ b/provider/notification-aws/src/main/java/org/opengroup/osdu/notification/provider/aws/queue/impl/NotificationQueueServiceImpl.java @@ -42,6 +42,7 @@ import jakarta.annotation.PostConstruct; import java.sql.Timestamp; import java.util.ArrayList; import java.util.Base64; +import java.util.Collection; import java.util.HashMap; import java.util.List; import java.util.Map; @@ -96,7 +97,7 @@ public class NotificationQueueServiceImpl implements NotificationQueueService { return messagesByDataPartition.entrySet().parallelStream() .map(entry -> processMessagesByDataPartition(entry.getKey(), entry.getValue())) - .filter(Objects::nonNull).flatMap(list -> list.stream()).collect(Collectors.toList()); + .filter(Objects::nonNull).flatMap(Collection::stream).collect(Collectors.toList()); } catch (Exception e) { logger.error("Exception processing messages :", e); return new ArrayList<>(); diff --git a/provider/notification-aws/src/main/java/org/opengroup/osdu/notification/provider/aws/queue/impl/NotificationRetryQueueServiceImpl.java b/provider/notification-aws/src/main/java/org/opengroup/osdu/notification/provider/aws/queue/impl/NotificationRetryQueueServiceImpl.java index de55ca71ce6487d40469fbe3ebae69116d53ff0b..b45eebac00c0c180b94fbc16d1df4396af2f1c23 100644 --- a/provider/notification-aws/src/main/java/org/opengroup/osdu/notification/provider/aws/queue/impl/NotificationRetryQueueServiceImpl.java +++ b/provider/notification-aws/src/main/java/org/opengroup/osdu/notification/provider/aws/queue/impl/NotificationRetryQueueServiceImpl.java @@ -75,18 +75,22 @@ public class NotificationRetryQueueServiceImpl implements NotificationRetryQueue @Override public List<RetryProcessResult> processNotificationMessages(List<Message> messages) { + final String dataPartitionId = "data-partition-id"; + final String subscriptionId = "subscriptionId"; + Map<String, List<Message>> messagesBySubscription = messages.stream().collect(Collectors.groupingBy( - msg -> String.join(":", msg.getMessageAttributes().get("data-partition-id").getStringValue(), msg.getMessageAttributes().get("subscriptionId").getStringValue()), + msg -> String.join(":", msg.getMessageAttributes().get(dataPartitionId).getStringValue(), msg.getMessageAttributes().get(subscriptionId).getStringValue()), HashMap::new, Collectors.toCollection(ArrayList::new))); + return messagesBySubscription.entrySet().parallelStream().map(entry -> { try { - Optional<Subscription> subscription = subscriptionRepository.getSubscriptionById(entry.getValue().get(0).getMessageAttributes().get("subscriptionId").getStringValue(), - entry.getValue().get(0).getMessageAttributes().get("data-partition-id").getStringValue()); + Optional<Subscription> subscription = subscriptionRepository.getSubscriptionById(entry.getValue().get(0).getMessageAttributes().get(subscriptionId).getStringValue(), + entry.getValue().get(0).getMessageAttributes().get(dataPartitionId).getStringValue()); if (!subscription.isPresent()) { logger.info("Subscription with id {} not found for dataPartitionId {}", - entry.getValue().get(0).getMessageAttributes().get("subscriptionId").getStringValue(), - entry.getValue().get(0).getMessageAttributes().get("data-partition-id").getStringValue()); + entry.getValue().get(0).getMessageAttributes().get(subscriptionId).getStringValue(), + entry.getValue().get(0).getMessageAttributes().get(dataPartitionId).getStringValue()); deleteDbRecords(entry.getValue()); return entry.getValue().stream().map(msg -> new RetryProcessResult(msg, NotificationResult.ACK)).collect(Collectors.toList()); } diff --git a/testing/notification-test-azure/pom.xml b/testing/notification-test-azure/pom.xml index 4d86a3ee2bfd2889f3b5fb0f8bccc82e92da5a0f..2ecba9067c70679b6f93d5b9e006562091f64afb 100644 --- a/testing/notification-test-azure/pom.xml +++ b/testing/notification-test-azure/pom.xml @@ -48,7 +48,7 @@ <dependency> <groupId>org.opengroup.osdu</groupId> <artifactId>core-lib-azure</artifactId> - <version>0.25.0-rc1</version> + <version>0.26.0-rc5</version> <exclusions> <exclusion>