From f282dc63f560fe3fc3f885097f43142bfc2f9824 Mon Sep 17 00:00:00 2001 From: Pawel Date: Thu, 17 Dec 2020 12:17:37 +0100 Subject: Upgrade hv-ves, reactor, protobuf and sdk versions 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 Change-Id: Ie3fc82c67ba096efcd0c584cf3f7f35128962efe --- sources/hv-collector-commandline/pom.xml | 2 +- sources/hv-collector-configuration/pom.xml | 2 +- .../org/onap/dcae/collectors/veshv/config/impl/CbsClientAdapter.kt | 5 +++-- .../dcae/collectors/veshv/config/impl/CbsConfigurationProvider.kt | 5 +++-- .../onap/dcae/collectors/veshv/config/impl/CbsClientAdapterTest.kt | 3 ++- sources/hv-collector-core/pom.xml | 2 +- .../onap/dcae/collectors/veshv/impl/adapters/kafka/KafkaPublisher.kt | 4 ++-- sources/hv-collector-ct/pom.xml | 2 +- sources/hv-collector-dcae-app-simulator/pom.xml | 2 +- sources/hv-collector-domain/pom.xml | 2 +- sources/hv-collector-health-check/pom.xml | 2 +- .../collectors/veshv/healthcheck/factory/HealthCheckApiServer.kt | 4 ++-- sources/hv-collector-kafka-consumer/pom.xml | 2 +- .../veshv/kafkaconsumer/metrics/http/PrometheusApiServer.kt | 4 ++-- sources/hv-collector-kafka/pom.xml | 2 +- sources/hv-collector-main/pom.xml | 2 +- sources/hv-collector-server/pom.xml | 2 +- .../kotlin/org/onap/dcae/collectors/veshv/impl/NettyTcpServer.kt | 4 ++-- .../main/kotlin/org/onap/dcae/collectors/veshv/impl/networking.kt | 5 +++-- sources/hv-collector-ssl/pom.xml | 2 +- sources/hv-collector-test-utils/pom.xml | 2 +- sources/hv-collector-utils/pom.xml | 2 +- sources/hv-collector-ves-message-generator/pom.xml | 2 +- sources/hv-collector-xnf-simulator/pom.xml | 2 +- sources/pom.xml | 4 ++-- 25 files changed, 37 insertions(+), 33 deletions(-) (limited to 'sources') diff --git a/sources/hv-collector-commandline/pom.xml b/sources/hv-collector-commandline/pom.xml index 6762e896..ceb1de48 100644 --- a/sources/hv-collector-commandline/pom.xml +++ b/sources/hv-collector-commandline/pom.xml @@ -7,7 +7,7 @@ hv-collector-sources org.onap.dcaegen2.collectors.hv-ves - 1.5.1-SNAPSHOT + 1.6.0-SNAPSHOT hv-collector-commandline diff --git a/sources/hv-collector-configuration/pom.xml b/sources/hv-collector-configuration/pom.xml index 3e839195..be74a0ed 100644 --- a/sources/hv-collector-configuration/pom.xml +++ b/sources/hv-collector-configuration/pom.xml @@ -33,7 +33,7 @@ org.onap.dcaegen2.collectors.hv-ves hv-collector-sources - 1.5.1-SNAPSHOT + 1.6.0-SNAPSHOT hv-collector-configuration diff --git a/sources/hv-collector-configuration/src/main/kotlin/org/onap/dcae/collectors/veshv/config/impl/CbsClientAdapter.kt b/sources/hv-collector-configuration/src/main/kotlin/org/onap/dcae/collectors/veshv/config/impl/CbsClientAdapter.kt index 905c737e..1f5c0c23 100644 --- a/sources/hv-collector-configuration/src/main/kotlin/org/onap/dcae/collectors/veshv/config/impl/CbsClientAdapter.kt +++ b/sources/hv-collector-configuration/src/main/kotlin/org/onap/dcae/collectors/veshv/config/impl/CbsClientAdapter.kt @@ -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, "CBS client successfully created, first request will be sent in ${firstRequestDelay.seconds} s" } } - .retryWhen(retry) + .retryWhen(withThrowable(retry)) .delayElement(firstRequestDelay) .flatMapMany(::toPeriodicalConfigurations) .distinctUntilChanged() diff --git a/sources/hv-collector-configuration/src/main/kotlin/org/onap/dcae/collectors/veshv/config/impl/CbsConfigurationProvider.kt b/sources/hv-collector-configuration/src/main/kotlin/org/onap/dcae/collectors/veshv/config/impl/CbsConfigurationProvider.kt index 6f16b3d1..8e774f9d 100644 --- a/sources/hv-collector-configuration/src/main/kotlin/org/onap/dcae/collectors/veshv/config/impl/CbsConfigurationProvider.kt +++ b/sources/hv-collector-configuration/src/main/kotlin/org/onap/dcae/collectors/veshv/config/impl/CbsConfigurationProvider.kt @@ -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 @@ -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 diff --git a/sources/hv-collector-configuration/src/test/kotlin/org/onap/dcae/collectors/veshv/config/impl/CbsClientAdapterTest.kt b/sources/hv-collector-configuration/src/test/kotlin/org/onap/dcae/collectors/veshv/config/impl/CbsClientAdapterTest.kt index 1f6a2538..42d1a111 100644 --- a/sources/hv-collector-configuration/src/test/kotlin/org/onap/dcae/collectors/veshv/config/impl/CbsClientAdapterTest.kt +++ b/sources/hv-collector-configuration/src/test/kotlin/org/onap/dcae/collectors/veshv/config/impl/CbsClientAdapterTest.kt @@ -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() } diff --git a/sources/hv-collector-core/pom.xml b/sources/hv-collector-core/pom.xml index 37be0670..50c89182 100644 --- a/sources/hv-collector-core/pom.xml +++ b/sources/hv-collector-core/pom.xml @@ -33,7 +33,7 @@ org.onap.dcaegen2.collectors.hv-ves hv-collector-sources - 1.5.1-SNAPSHOT + 1.6.0-SNAPSHOT .. diff --git a/sources/hv-collector-core/src/main/kotlin/org/onap/dcae/collectors/veshv/impl/adapters/kafka/KafkaPublisher.kt b/sources/hv-collector-core/src/main/kotlin/org/onap/dcae/collectors/veshv/impl/adapters/kafka/KafkaPublisher.kt index 91e6fde5..663fbb12 100644 --- a/sources/hv-collector-core/src/main/kotlin/org/onap/dcae/collectors/veshv/impl/adapters/kafka/KafkaPublisher.kt +++ b/sources/hv-collector-core/src/main/kotlin/org/onap/dcae/collectors/veshv/impl/adapters/kafka/KafkaPublisher.kt @@ -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): Flux = messages.map(::vesToKafkaRecord) - .compose { sender.send(it) } + .`as` { sender.send(it) } .map { val msg = it.correlationMetadata() if (it.exception() == null) { diff --git a/sources/hv-collector-ct/pom.xml b/sources/hv-collector-ct/pom.xml index ba163a87..a17055df 100644 --- a/sources/hv-collector-ct/pom.xml +++ b/sources/hv-collector-ct/pom.xml @@ -33,7 +33,7 @@ org.onap.dcaegen2.collectors.hv-ves hv-collector-sources - 1.5.1-SNAPSHOT + 1.6.0-SNAPSHOT .. diff --git a/sources/hv-collector-dcae-app-simulator/pom.xml b/sources/hv-collector-dcae-app-simulator/pom.xml index 9bcc9724..932ac73c 100644 --- a/sources/hv-collector-dcae-app-simulator/pom.xml +++ b/sources/hv-collector-dcae-app-simulator/pom.xml @@ -33,7 +33,7 @@ org.onap.dcaegen2.collectors.hv-ves hv-collector-sources - 1.5.1-SNAPSHOT + 1.6.0-SNAPSHOT .. diff --git a/sources/hv-collector-domain/pom.xml b/sources/hv-collector-domain/pom.xml index 3d9e9c6e..55a6fb6f 100644 --- a/sources/hv-collector-domain/pom.xml +++ b/sources/hv-collector-domain/pom.xml @@ -33,7 +33,7 @@ org.onap.dcaegen2.collectors.hv-ves hv-collector-sources - 1.5.1-SNAPSHOT + 1.6.0-SNAPSHOT hv-collector-domain diff --git a/sources/hv-collector-health-check/pom.xml b/sources/hv-collector-health-check/pom.xml index 14a3535b..d420316e 100644 --- a/sources/hv-collector-health-check/pom.xml +++ b/sources/hv-collector-health-check/pom.xml @@ -15,7 +15,7 @@ org.onap.dcaegen2.collectors.hv-ves hv-collector-sources - 1.5.1-SNAPSHOT + 1.6.0-SNAPSHOT hv-collector-health-check diff --git a/sources/hv-collector-health-check/src/main/kotlin/org/onap/dcae/collectors/veshv/healthcheck/factory/HealthCheckApiServer.kt b/sources/hv-collector-health-check/src/main/kotlin/org/onap/dcae/collectors/veshv/healthcheck/factory/HealthCheckApiServer.kt index cff8160c..c2f5e798 100644 --- a/sources/hv-collector-health-check/src/main/kotlin/org/onap/dcae/collectors/veshv/healthcheck/factory/HealthCheckApiServer.kt +++ b/sources/hv-collector-health-check/src/main/kotlin/org/onap/dcae/collectors/veshv/healthcheck/factory/HealthCheckApiServer.kt @@ -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 -> diff --git a/sources/hv-collector-kafka-consumer/pom.xml b/sources/hv-collector-kafka-consumer/pom.xml index 57b301c8..8cb34784 100644 --- a/sources/hv-collector-kafka-consumer/pom.xml +++ b/sources/hv-collector-kafka-consumer/pom.xml @@ -15,7 +15,7 @@ org.onap.dcaegen2.collectors.hv-ves hv-collector-sources - 1.5.1-SNAPSHOT + 1.6.0-SNAPSHOT .. diff --git a/sources/hv-collector-kafka-consumer/src/main/kotlin/org/onap/dcae/collectors/veshv/kafkaconsumer/metrics/http/PrometheusApiServer.kt b/sources/hv-collector-kafka-consumer/src/main/kotlin/org/onap/dcae/collectors/veshv/kafkaconsumer/metrics/http/PrometheusApiServer.kt index 29a17fc1..f772727e 100644 --- a/sources/hv-collector-kafka-consumer/src/main/kotlin/org/onap/dcae/collectors/veshv/kafkaconsumer/metrics/http/PrometheusApiServer.kt +++ b/sources/hv-collector-kafka-consumer/src/main/kotlin/org/onap/dcae/collectors/veshv/kafkaconsumer/metrics/http/PrometheusApiServer.kt @@ -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 = HttpServer.create() - .tcpConfiguration { it.addressSupplier { listenAddress } } + .tcpConfiguration { it.bindAddress { listenAddress } } .route { it.get("/monitoring/prometheus", ::metricsHandler) } .bind() .map { NettyServerHandle(it) } diff --git a/sources/hv-collector-kafka/pom.xml b/sources/hv-collector-kafka/pom.xml index ddd94238..a738bd16 100644 --- a/sources/hv-collector-kafka/pom.xml +++ b/sources/hv-collector-kafka/pom.xml @@ -15,7 +15,7 @@ org.onap.dcaegen2.collectors.hv-ves hv-collector-sources - 1.5.1-SNAPSHOT + 1.6.0-SNAPSHOT .. diff --git a/sources/hv-collector-main/pom.xml b/sources/hv-collector-main/pom.xml index a39fc7b9..f9d74c67 100644 --- a/sources/hv-collector-main/pom.xml +++ b/sources/hv-collector-main/pom.xml @@ -33,7 +33,7 @@ org.onap.dcaegen2.collectors.hv-ves hv-collector-sources - 1.5.1-SNAPSHOT + 1.6.0-SNAPSHOT hv-collector-main diff --git a/sources/hv-collector-server/pom.xml b/sources/hv-collector-server/pom.xml index cce03f12..6a4c60cb 100644 --- a/sources/hv-collector-server/pom.xml +++ b/sources/hv-collector-server/pom.xml @@ -33,7 +33,7 @@ org.onap.dcaegen2.collectors.hv-ves hv-collector-sources - 1.5.1-SNAPSHOT + 1.6.0-SNAPSHOT .. diff --git a/sources/hv-collector-server/src/main/kotlin/org/onap/dcae/collectors/veshv/impl/NettyTcpServer.kt b/sources/hv-collector-server/src/main/kotlin/org/onap/dcae/collectors/veshv/impl/NettyTcpServer.kt index d19b7f49..7f6ad658 100644 --- a/sources/hv-collector-server/src/main/kotlin/org/onap/dcae/collectors/veshv/impl/NettyTcpServer.kt +++ b/sources/hv-collector-server/src/main/kotlin/org/onap/dcae/collectors/veshv/impl/NettyTcpServer.kt @@ -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 = Mono.defer { TcpServer.create() - .addressSupplier { InetSocketAddress(serverConfiguration.listenPort) } + .bindAddress { InetSocketAddress(serverConfiguration.listenPort) } .configureSsl() .handle(this::handleConnection) .bind() diff --git a/sources/hv-collector-server/src/main/kotlin/org/onap/dcae/collectors/veshv/impl/networking.kt b/sources/hv-collector-server/src/main/kotlin/org/onap/dcae/collectors/veshv/impl/networking.kt index eb51cf4b..6bbe08f0 100644 --- a/sources/hv-collector-server/src/main/kotlin/org/onap/dcae/collectors/veshv/impl/networking.kt +++ b/sources/hv-collector-server/src/main/kotlin/org/onap/dcae/collectors/veshv/impl/networking.kt @@ -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() } } diff --git a/sources/hv-collector-ssl/pom.xml b/sources/hv-collector-ssl/pom.xml index f73d3cfb..0212c8d7 100644 --- a/sources/hv-collector-ssl/pom.xml +++ b/sources/hv-collector-ssl/pom.xml @@ -33,7 +33,7 @@ org.onap.dcaegen2.collectors.hv-ves hv-collector-sources - 1.5.1-SNAPSHOT + 1.6.0-SNAPSHOT .. diff --git a/sources/hv-collector-test-utils/pom.xml b/sources/hv-collector-test-utils/pom.xml index 8b2a6d74..8e6a2fad 100644 --- a/sources/hv-collector-test-utils/pom.xml +++ b/sources/hv-collector-test-utils/pom.xml @@ -14,7 +14,7 @@ org.onap.dcaegen2.collectors.hv-ves hv-collector-sources - 1.5.1-SNAPSHOT + 1.6.0-SNAPSHOT .. diff --git a/sources/hv-collector-utils/pom.xml b/sources/hv-collector-utils/pom.xml index a236a43a..fcef0bfc 100644 --- a/sources/hv-collector-utils/pom.xml +++ b/sources/hv-collector-utils/pom.xml @@ -33,7 +33,7 @@ org.onap.dcaegen2.collectors.hv-ves hv-collector-sources - 1.5.1-SNAPSHOT + 1.6.0-SNAPSHOT .. diff --git a/sources/hv-collector-ves-message-generator/pom.xml b/sources/hv-collector-ves-message-generator/pom.xml index b3eec0e4..7cbc2d16 100644 --- a/sources/hv-collector-ves-message-generator/pom.xml +++ b/sources/hv-collector-ves-message-generator/pom.xml @@ -33,7 +33,7 @@ org.onap.dcaegen2.collectors.hv-ves hv-collector-sources - 1.5.1-SNAPSHOT + 1.6.0-SNAPSHOT .. diff --git a/sources/hv-collector-xnf-simulator/pom.xml b/sources/hv-collector-xnf-simulator/pom.xml index 49ceab9d..0de7f3d7 100644 --- a/sources/hv-collector-xnf-simulator/pom.xml +++ b/sources/hv-collector-xnf-simulator/pom.xml @@ -33,7 +33,7 @@ org.onap.dcaegen2.collectors.hv-ves hv-collector-sources - 1.5.1-SNAPSHOT + 1.6.0-SNAPSHOT .. diff --git a/sources/pom.xml b/sources/pom.xml index be03114f..6914682b 100644 --- a/sources/pom.xml +++ b/sources/pom.xml @@ -33,7 +33,7 @@ org.onap.dcaegen2.collectors.hv-ves ves-hv-collector - 1.5.1-SNAPSHOT + 1.6.0-SNAPSHOT .. @@ -125,7 +125,7 @@ ${project.groupId} hv-collector-analysis - 1.5.1-SNAPSHOT + 1.6.0-SNAPSHOT -- cgit 1.2.3-korg