Upgrade hv-ves, reactor, protobuf and sdk versions 46/116446/4
authorPawel <pawel.kasperkiewicz@nokia.com>
Thu, 17 Dec 2020 11:17:37 +0000 (12:17 +0100)
committerPawel Kasperkiewicz <pawel.kasperkiewicz@nokia.com>
Mon, 28 Dec 2020 12:21:36 +0000 (12:21 +0000)
Reactor from Dysprosium-SR11 to 2020.0.2
Protobuf from 3.6.1 to 3.14.0
SDK from 1.4.4 to 1.5.0

Issue-ID: DCAEGEN2-2537
Signed-off-by: Pawel <pawel.kasperkiewicz@nokia.com>
Change-Id: Ie3fc82c67ba096efcd0c584cf3f7f35128962efe

31 files changed:
Changelog.md
build/hv-collector-analysis/pom.xml
build/hv-collector-coverage/pom.xml
build/pom.xml
pom.xml
sources/hv-collector-commandline/pom.xml
sources/hv-collector-configuration/pom.xml
sources/hv-collector-configuration/src/main/kotlin/org/onap/dcae/collectors/veshv/config/impl/CbsClientAdapter.kt
sources/hv-collector-configuration/src/main/kotlin/org/onap/dcae/collectors/veshv/config/impl/CbsConfigurationProvider.kt
sources/hv-collector-configuration/src/test/kotlin/org/onap/dcae/collectors/veshv/config/impl/CbsClientAdapterTest.kt
sources/hv-collector-core/pom.xml
sources/hv-collector-core/src/main/kotlin/org/onap/dcae/collectors/veshv/impl/adapters/kafka/KafkaPublisher.kt
sources/hv-collector-ct/pom.xml
sources/hv-collector-dcae-app-simulator/pom.xml
sources/hv-collector-domain/pom.xml
sources/hv-collector-health-check/pom.xml
sources/hv-collector-health-check/src/main/kotlin/org/onap/dcae/collectors/veshv/healthcheck/factory/HealthCheckApiServer.kt
sources/hv-collector-kafka-consumer/pom.xml
sources/hv-collector-kafka-consumer/src/main/kotlin/org/onap/dcae/collectors/veshv/kafkaconsumer/metrics/http/PrometheusApiServer.kt
sources/hv-collector-kafka/pom.xml
sources/hv-collector-main/pom.xml
sources/hv-collector-server/pom.xml
sources/hv-collector-server/src/main/kotlin/org/onap/dcae/collectors/veshv/impl/NettyTcpServer.kt
sources/hv-collector-server/src/main/kotlin/org/onap/dcae/collectors/veshv/impl/networking.kt
sources/hv-collector-ssl/pom.xml
sources/hv-collector-test-utils/pom.xml
sources/hv-collector-utils/pom.xml
sources/hv-collector-ves-message-generator/pom.xml
sources/hv-collector-xnf-simulator/pom.xml
sources/pom.xml
version.properties

index c85e655..294ead0 100644 (file)
@@ -4,4 +4,5 @@ All notable changes to this project will be documented in this file.
 The format is based on [Keep a Changelog](http://keepachangelog.com/)
 and this project adheres to [Semantic Versioning](http://semver.org/).
 
-## [1.5.1] - 15/12/2020      
\ No newline at end of file
+## [1.6.0] - 17/12/2020
+    - [DCAEGEN2-2537](https://jira.onap.org/browse/DCAEGEN2-2537) - Upgrade Reactor and SpringBoot in DFC, PM-Mapper, BBS    
\ No newline at end of file
index e6d42db..4517ba6 100644 (file)
@@ -33,7 +33,7 @@
     <parent>
         <groupId>org.onap.dcaegen2.collectors.hv-ves</groupId>
         <artifactId>hv-collector-build</artifactId>
-        <version>1.5.1-SNAPSHOT</version>
+        <version>1.6.0-SNAPSHOT</version>
         <relativePath>..</relativePath>
     </parent>
 
index d7321f6..0de95e9 100644 (file)
@@ -33,7 +33,7 @@
     <parent>
         <groupId>org.onap.dcaegen2.collectors.hv-ves</groupId>
         <artifactId>hv-collector-build</artifactId>
-        <version>1.5.1-SNAPSHOT</version>
+        <version>1.6.0-SNAPSHOT</version>
         <relativePath>..</relativePath>
     </parent>
 
index f5cb12c..f324833 100644 (file)
@@ -32,7 +32,7 @@
     <parent>
         <groupId>org.onap.dcaegen2.collectors.hv-ves</groupId>
         <artifactId>ves-hv-collector</artifactId>
-        <version>1.5.1-SNAPSHOT</version>
+        <version>1.6.0-SNAPSHOT</version>
         <relativePath>..</relativePath>
     </parent>
 
diff --git a/pom.xml b/pom.xml
index 12b2ae4..6b4bb6f 100644 (file)
--- a/pom.xml
+++ b/pom.xml
@@ -39,7 +39,7 @@
 
     <groupId>org.onap.dcaegen2.collectors.hv-ves</groupId>
     <artifactId>ves-hv-collector</artifactId>
-    <version>1.5.1-SNAPSHOT</version>
+    <version>1.6.0-SNAPSHOT</version>
     <name>dcaegen2-collectors-veshv</name>
     <description>VES HighVolume Collector</description>
     <packaging>pom</packaging>
         <build-helper-maven-plugin.version>1.7</build-helper-maven-plugin.version>
         <jacoco.version>0.8.3</jacoco.version>
         <detekt.version>1.0.0-RC14</detekt.version>
-        <sdk.version>1.4.4</sdk.version>
+        <sdk.version>1.5.0</sdk.version>
 
         <!-- Protocol buffers -->
-        <protobuf.version>3.6.1</protobuf.version>
+        <protobuf.version>3.14.0</protobuf.version>
 
         <!-- Testing and code analysis -->
         <junit-platform.version>1.2.0-RC1</junit-platform.version>
                 <groupId>io.projectreactor</groupId>
                 <artifactId>reactor-bom</artifactId>
                 <!-- remember to update netty native bindings versions -->
-                <version>Dysprosium-SR11</version>
+                <version>2020.0.2</version>
                 <type>pom</type>
                 <scope>import</scope>
             </dependency>
                 <version>${kotlin.version}</version>
                 <scope>test</scope>
             </dependency>
-            <dependency>
-                <groupId>io.projectreactor</groupId>
-                <artifactId>reactor-test</artifactId>
-                <version>3.1.7.RELEASE</version>
-                <scope>test</scope>
-            </dependency>
             <dependency>
                 <groupId>org.jetbrains.kotlinx</groupId>
                 <artifactId>kotlinx-coroutines-test</artifactId>
index 6762e89..ceb1de4 100644 (file)
@@ -7,7 +7,7 @@
   <parent>
     <artifactId>hv-collector-sources</artifactId>
     <groupId>org.onap.dcaegen2.collectors.hv-ves</groupId>
-    <version>1.5.1-SNAPSHOT</version>
+    <version>1.6.0-SNAPSHOT</version>
   </parent>
 
   <artifactId>hv-collector-commandline</artifactId>
index 3e83919..be74a0e 100644 (file)
@@ -33,7 +33,7 @@
     <parent>
         <groupId>org.onap.dcaegen2.collectors.hv-ves</groupId>
         <artifactId>hv-collector-sources</artifactId>
-        <version>1.5.1-SNAPSHOT</version>
+        <version>1.6.0-SNAPSHOT</version>
     </parent>
 
     <artifactId>hv-collector-configuration</artifactId>
index 905c737..1f5c0c2 100644 (file)
@@ -2,7 +2,7 @@
  * ============LICENSE_START=======================================================
  * dcaegen2-collectors-veshv
  * ================================================================================
- * Copyright (C) 2019 NOKIA
+ * Copyright (C) 2019-2020 NOKIA
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -29,6 +29,7 @@ import org.onap.dcaegen2.services.sdk.rest.services.cbs.client.model.CbsRequest
 import org.onap.dcaegen2.services.sdk.rest.services.model.logging.RequestDiagnosticContext
 import reactor.core.publisher.Mono
 import reactor.retry.Retry
+import reactor.util.retry.Retry.withThrowable
 import java.time.Duration
 import java.util.concurrent.atomic.AtomicReference
 
@@ -53,7 +54,7 @@ internal class CbsClientAdapter(private val cbsClientMono: Mono<CbsClient>,
                     "CBS client successfully created, first request will be sent in ${firstRequestDelay.seconds} s"
                 }
             }
-            .retryWhen(retry)
+            .retryWhen(withThrowable(retry))
             .delayElement(firstRequestDelay)
             .flatMapMany(::toPeriodicalConfigurations)
             .distinctUntilChanged()
index 6f16b3d..8e774f9 100644 (file)
@@ -2,7 +2,7 @@
  * ============LICENSE_START=======================================================
  * dcaegen2-collectors-veshv
  * ================================================================================
- * Copyright (C) 2018-2019 NOKIA
+ * Copyright (C) 2018-2020 NOKIA
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -34,6 +34,7 @@ import org.onap.dcaegen2.services.sdk.rest.services.cbs.client.api.streams.Strea
 import org.onap.dcaegen2.services.sdk.rest.services.cbs.client.api.streams.StreamPredicates.streamOfType
 import reactor.core.publisher.Flux
 import reactor.retry.Retry
+import reactor.util.retry.Retry.withThrowable
 
 /**
  * @author Jakub Dudycz <jakub.dudycz@nokia.com>
@@ -60,7 +61,7 @@ internal class CbsConfigurationProvider(private val cbsClientAdapter: CbsClientA
                     .map(::parseConfiguration)
                     .doOnNext { logger.info(mdc) { "Successfully parsed configuration json to:\n$it" } }
                     .onErrorLog(logger, mdc) { "Error while creating configuration" }
-                    .retryWhen(retry)
+                    .retryWhen(withThrowable(retry))
 
     private fun parseConfiguration(json: JsonObject) =
             configParser
index 1f6a253..42d1a11 100644 (file)
@@ -2,7 +2,7 @@
  * ============LICENSE_START=======================================================
  * dcaegen2-collectors-veshv
  * ================================================================================
- * Copyright (C) 2018-2019 NOKIA
+ * Copyright (C) 2018-2020 NOKIA
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -106,6 +106,7 @@ internal object CbsClientAdapterTest : Spek({
                             .withVirtualTime { cut.configurationUpdates().take(1) }
                             .expectSubscription()
                             .expectNoEvent(firstRequestDelay)
+                            .thenAwait(firstRequestDelay)
                             .expectNext(configuration())
                             .verifyComplete()
                 }
index 37be067..50c8918 100644 (file)
@@ -33,7 +33,7 @@
     <parent>
         <groupId>org.onap.dcaegen2.collectors.hv-ves</groupId>
         <artifactId>hv-collector-sources</artifactId>
-        <version>1.5.1-SNAPSHOT</version>
+        <version>1.6.0-SNAPSHOT</version>
         <relativePath>..</relativePath>
     </parent>
 
index 91e6fde..663fbb1 100644 (file)
@@ -2,7 +2,7 @@
  * ============LICENSE_START=======================================================
  * dcaegen2-collectors-veshv
  * ================================================================================
- * Copyright (C) 2018-2019 NOKIA
+ * Copyright (C) 2018-2020 NOKIA
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -46,7 +46,7 @@ internal class KafkaPublisher(private val sender: KafkaSender<CommonEventHeader,
 
     override fun send(messages: Flux<RoutedMessage>): Flux<ConsumedMessage> =
             messages.map(::vesToKafkaRecord)
-                    .compose { sender.send(it) }
+                    .`as` { sender.send(it) }
                     .map {
                         val msg = it.correlationMetadata()
                         if (it.exception() == null) {
index ba163a8..a17055d 100644 (file)
@@ -33,7 +33,7 @@
     <parent>
         <groupId>org.onap.dcaegen2.collectors.hv-ves</groupId>
         <artifactId>hv-collector-sources</artifactId>
-        <version>1.5.1-SNAPSHOT</version>
+        <version>1.6.0-SNAPSHOT</version>
         <relativePath>..</relativePath>
     </parent>
 
index 9bcc972..932ac73 100644 (file)
@@ -33,7 +33,7 @@
     <parent>
         <groupId>org.onap.dcaegen2.collectors.hv-ves</groupId>
         <artifactId>hv-collector-sources</artifactId>
-        <version>1.5.1-SNAPSHOT</version>
+        <version>1.6.0-SNAPSHOT</version>
         <relativePath>..</relativePath>
     </parent>
 
index 3d9e9c6..55a6fb6 100644 (file)
@@ -33,7 +33,7 @@
     <parent>
         <groupId>org.onap.dcaegen2.collectors.hv-ves</groupId>
         <artifactId>hv-collector-sources</artifactId>
-        <version>1.5.1-SNAPSHOT</version>
+        <version>1.6.0-SNAPSHOT</version>
     </parent>
 
     <artifactId>hv-collector-domain</artifactId>
index 14a3535..d420316 100644 (file)
@@ -15,7 +15,7 @@
     <parent>
         <groupId>org.onap.dcaegen2.collectors.hv-ves</groupId>
         <artifactId>hv-collector-sources</artifactId>
-        <version>1.5.1-SNAPSHOT</version>
+        <version>1.6.0-SNAPSHOT</version>
     </parent>
 
     <artifactId>hv-collector-health-check</artifactId>
index cff8160..c2f5e79 100644 (file)
@@ -2,7 +2,7 @@
  * ============LICENSE_START=======================================================
  * dcaegen2-collectors-veshv
  * ================================================================================
- * Copyright (C) 2018-2019 NOKIA
+ * Copyright (C) 2018-2020 NOKIA
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -48,7 +48,7 @@ class HealthCheckApiServer(private val healthState: HealthState,
         healthState().subscribe(healthDescription::set)
         HttpServer.create()
                 .tcpConfiguration {
-                    it.addressSupplier { listenAddress }
+                    it.bindAddress { listenAddress }
                             .doOnUnbound { logClose() }
                 }
                 .route { routes ->
index 57b301c..8cb3478 100644 (file)
@@ -15,7 +15,7 @@
   <parent>
     <groupId>org.onap.dcaegen2.collectors.hv-ves</groupId>
     <artifactId>hv-collector-sources</artifactId>
-    <version>1.5.1-SNAPSHOT</version>
+    <version>1.6.0-SNAPSHOT</version>
     <relativePath>..</relativePath>
   </parent>
 
index 29a17fc..f772727 100644 (file)
@@ -2,7 +2,7 @@
  * ============LICENSE_START=======================================================
  * dcaegen2-collectors-veshv
  * ================================================================================
- * Copyright (C) 2019 NOKIA
+ * Copyright (C) 2019-2020 NOKIA
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -36,7 +36,7 @@ internal class PrometheusApiServer(private val listenAddress: InetSocketAddress,
 
     fun start(): Mono<NettyServerHandle> =
             HttpServer.create()
-                    .tcpConfiguration { it.addressSupplier { listenAddress } }
+                    .tcpConfiguration { it.bindAddress { listenAddress } }
                     .route { it.get("/monitoring/prometheus", ::metricsHandler) }
                     .bind()
                     .map { NettyServerHandle(it) }
index ddd9423..a738bd1 100644 (file)
@@ -15,7 +15,7 @@
     <parent>
         <groupId>org.onap.dcaegen2.collectors.hv-ves</groupId>
         <artifactId>hv-collector-sources</artifactId>
-        <version>1.5.1-SNAPSHOT</version>
+        <version>1.6.0-SNAPSHOT</version>
         <relativePath>..</relativePath>
     </parent>
 
index a39fc7b..f9d74c6 100644 (file)
@@ -33,7 +33,7 @@
     <parent>
         <groupId>org.onap.dcaegen2.collectors.hv-ves</groupId>
         <artifactId>hv-collector-sources</artifactId>
-        <version>1.5.1-SNAPSHOT</version>
+        <version>1.6.0-SNAPSHOT</version>
     </parent>
 
     <artifactId>hv-collector-main</artifactId>
index cce03f1..6a4c60c 100644 (file)
@@ -33,7 +33,7 @@
     <parent>
         <groupId>org.onap.dcaegen2.collectors.hv-ves</groupId>
         <artifactId>hv-collector-sources</artifactId>
-        <version>1.5.1-SNAPSHOT</version>
+        <version>1.6.0-SNAPSHOT</version>
         <relativePath>..</relativePath>
     </parent>
 
index d19b7f4..7f6ad65 100644 (file)
@@ -2,7 +2,7 @@
  * ============LICENSE_START=======================================================
  * dcaegen2-collectors-veshv
  * ================================================================================
- * Copyright (C) 2018-2019 NOKIA
+ * Copyright (C) 2018-2020 NOKIA
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -60,7 +60,7 @@ internal class NettyTcpServer(private val serverConfiguration: ServerConfigurati
     override fun start(): Mono<ServerHandle> =
             Mono.defer {
                 TcpServer.create()
-                        .addressSupplier { InetSocketAddress(serverConfiguration.listenPort) }
+                        .bindAddress { InetSocketAddress(serverConfiguration.listenPort) }
                         .configureSsl()
                         .handle(this::handleConnection)
                         .bind()
index eb51cf4..6bbe08f 100644 (file)
@@ -2,7 +2,7 @@
  * ============LICENSE_START=======================================================
  * dcaegen2-collectors-veshv
  * ================================================================================
- * Copyright (C) 2019 NOKIA
+ * Copyright (C) 2019-2020 NOKIA
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -31,6 +31,7 @@ import reactor.netty.Connection
 import reactor.netty.NettyInbound
 import reactor.netty.NettyOutbound
 import java.net.InetAddress
+import java.net.InetSocketAddress
 import java.security.cert.X509Certificate
 import javax.net.ssl.SSLSession
 
@@ -76,6 +77,6 @@ internal inline fun withNewClientContextFrom(nettyInbound: NettyInbound,
 
 internal fun populateClientContextFromInbound(clientContext: ClientContext, nettyInbound: NettyInbound) =
         withConnectionFrom(nettyInbound) { connection ->
-            clientContext.clientAddress = Try { connection.address().address }.toOption()
+            clientContext.clientAddress = Try { (connection.address() as InetSocketAddress).address }.toOption()
             clientContext.clientCert = connection.getSslSession().flatMap { it.findClientCert() }
         }
index f73d3cf..0212c8d 100644 (file)
@@ -33,7 +33,7 @@
     <parent>
         <groupId>org.onap.dcaegen2.collectors.hv-ves</groupId>
         <artifactId>hv-collector-sources</artifactId>
-        <version>1.5.1-SNAPSHOT</version>
+        <version>1.6.0-SNAPSHOT</version>
         <relativePath>..</relativePath>
     </parent>
 
index 8b2a6d7..8e6a2fa 100644 (file)
@@ -14,7 +14,7 @@
     <parent>
         <groupId>org.onap.dcaegen2.collectors.hv-ves</groupId>
         <artifactId>hv-collector-sources</artifactId>
-        <version>1.5.1-SNAPSHOT</version>
+        <version>1.6.0-SNAPSHOT</version>
         <relativePath>..</relativePath>
     </parent>
 
index a236a43..fcef0bf 100644 (file)
@@ -33,7 +33,7 @@
     <parent>
         <groupId>org.onap.dcaegen2.collectors.hv-ves</groupId>
         <artifactId>hv-collector-sources</artifactId>
-        <version>1.5.1-SNAPSHOT</version>
+        <version>1.6.0-SNAPSHOT</version>
         <relativePath>..</relativePath>
     </parent>
 
index b3eec0e..7cbc2d1 100644 (file)
@@ -33,7 +33,7 @@
     <parent>
         <groupId>org.onap.dcaegen2.collectors.hv-ves</groupId>
         <artifactId>hv-collector-sources</artifactId>
-        <version>1.5.1-SNAPSHOT</version>
+        <version>1.6.0-SNAPSHOT</version>
         <relativePath>..</relativePath>
     </parent>
 
index 49ceab9..0de7f3d 100644 (file)
@@ -33,7 +33,7 @@
     <parent>
         <groupId>org.onap.dcaegen2.collectors.hv-ves</groupId>
         <artifactId>hv-collector-sources</artifactId>
-        <version>1.5.1-SNAPSHOT</version>
+        <version>1.6.0-SNAPSHOT</version>
         <relativePath>..</relativePath>
     </parent>
 
index be03114..6914682 100644 (file)
@@ -33,7 +33,7 @@
     <parent>
         <groupId>org.onap.dcaegen2.collectors.hv-ves</groupId>
         <artifactId>ves-hv-collector</artifactId>
-        <version>1.5.1-SNAPSHOT</version>
+        <version>1.6.0-SNAPSHOT</version>
         <relativePath>..</relativePath>
     </parent>
 
                             <dependency>
                                 <groupId>${project.groupId}</groupId>
                                 <artifactId>hv-collector-analysis</artifactId>
-                                <version>1.5.1-SNAPSHOT</version>
+                                <version>1.6.0-SNAPSHOT</version>
                             </dependency>
                         </dependencies>
                     </plugin>
index 303a703..eabef1f 100644 (file)
@@ -1,6 +1,6 @@
 major=1
-minor=5
-patch=1
+minor=6
+patch=0
 base_version=${major}.${minor}.${patch}
 release_version=${base_version}
 snapshot_version=${base_version}-SNAPSHOT