From bd938de0e527f0e95b7caae61dad8aefff4c4cc5 Mon Sep 17 00:00:00 2001 From: Sachin Argade Date: Fri, 17 Mar 2023 10:34:54 +0530 Subject: [PATCH 1/5] Connector Test service integration with autosetup --- .../autosetup/constant/AppNameConstant.java | 5 +- .../manager/TestConnectorServiceManager.java | 65 +++++++++++++++++++ .../service/EDCConnectorWorkFlow.java | 7 +- .../proxy/ConnectorTestRequest.java | 16 +++++ .../proxy/ConnectorTestServiceProxy.java | 13 ++++ src/main/resources/application.properties | 2 + .../templates/edc_success_activate.html | 3 +- 7 files changed, 106 insertions(+), 5 deletions(-) create mode 100644 src/main/java/org/eclipse/tractusx/autosetup/manager/TestConnectorServiceManager.java create mode 100644 src/main/java/org/eclipse/tractusx/autosetup/testservice/proxy/ConnectorTestRequest.java create mode 100644 src/main/java/org/eclipse/tractusx/autosetup/testservice/proxy/ConnectorTestServiceProxy.java diff --git a/src/main/java/org/eclipse/tractusx/autosetup/constant/AppNameConstant.java b/src/main/java/org/eclipse/tractusx/autosetup/constant/AppNameConstant.java index 2a1766d9..11210cc2 100644 --- a/src/main/java/org/eclipse/tractusx/autosetup/constant/AppNameConstant.java +++ b/src/main/java/org/eclipse/tractusx/autosetup/constant/AppNameConstant.java @@ -35,7 +35,6 @@ public enum AppNameConstant { DFT_FRONTEND, - DFT_BACKEND - - + DFT_BACKEND, + } diff --git a/src/main/java/org/eclipse/tractusx/autosetup/manager/TestConnectorServiceManager.java b/src/main/java/org/eclipse/tractusx/autosetup/manager/TestConnectorServiceManager.java new file mode 100644 index 00000000..675acb53 --- /dev/null +++ b/src/main/java/org/eclipse/tractusx/autosetup/manager/TestConnectorServiceManager.java @@ -0,0 +1,65 @@ +package org.eclipse.tractusx.autosetup.manager; + +import java.util.Map; +import java.util.UUID; + +import org.eclipse.tractusx.autosetup.constant.TriggerStatusEnum; +import org.eclipse.tractusx.autosetup.entity.AutoSetupTriggerDetails; +import org.eclipse.tractusx.autosetup.entity.AutoSetupTriggerEntry; +import org.eclipse.tractusx.autosetup.exception.ServiceException; +import org.eclipse.tractusx.autosetup.model.Customer; +import org.eclipse.tractusx.autosetup.testservice.proxy.ConnectorTestRequest; +import org.eclipse.tractusx.autosetup.testservice.proxy.ConnectorTestServiceProxy; +import org.springframework.retry.annotation.Backoff; +import org.springframework.retry.annotation.Retryable; +import org.springframework.retry.support.RetrySynchronizationManager; +import org.springframework.stereotype.Service; + +import lombok.RequiredArgsConstructor; +import lombok.extern.slf4j.Slf4j; + +@Service +@Slf4j +@RequiredArgsConstructor +public class TestConnectorServiceManager { + + private final AutoSetupTriggerManager autoSetupTriggerManager; + + private final ConnectorTestServiceProxy connectorTestServiceProxy; + + @Retryable(value = { + ServiceException.class }, maxAttemptsExpression = "${retry.maxAttempts}", backoff = @Backoff(delayExpression = "${retry.backOffDelay}")) + public Map verifyConnectorTestingThroughTestService(Customer customerDetails, + Map inputData, AutoSetupTriggerEntry triger) { + + AutoSetupTriggerDetails autoSetupTriggerDetails = AutoSetupTriggerDetails.builder() + .id(UUID.randomUUID().toString()).step("CONNECTOR_TEST_SERVICE").build(); + try { + + ConnectorTestRequest connectorTestRequest = ConnectorTestRequest.builder() + .apiKeyHeader(inputData.get("edcApiKey")).apiKeyValue(inputData.get("edcApiKeyValue")) + .connectorHost(inputData.get("controlPlaneEndpoint")).build(); + + String testResult = connectorTestServiceProxy + .verifyConnectorTestingThroughTestService(connectorTestRequest); + + inputData.put("connectorTestResult", testResult); + + autoSetupTriggerDetails.setStatus(TriggerStatusEnum.SUCCESS.name()); + + } catch (Exception ex) { + + log.error("ConnectorTestService failed retry attempt: : {}", + RetrySynchronizationManager.getContext().getRetryCount() + 1); + + autoSetupTriggerDetails.setStatus(TriggerStatusEnum.FAILED.name()); + autoSetupTriggerDetails.setRemark(ex.getMessage()); + throw new ServiceException("ConnectorTestService Oops! We have an exception - " + ex.getMessage()); + } finally { + autoSetupTriggerManager.saveTriggerDetails(autoSetupTriggerDetails, triger); + } + + return inputData; + } + +} diff --git a/src/main/java/org/eclipse/tractusx/autosetup/service/EDCConnectorWorkFlow.java b/src/main/java/org/eclipse/tractusx/autosetup/service/EDCConnectorWorkFlow.java index 44076592..f12a3126 100644 --- a/src/main/java/org/eclipse/tractusx/autosetup/service/EDCConnectorWorkFlow.java +++ b/src/main/java/org/eclipse/tractusx/autosetup/service/EDCConnectorWorkFlow.java @@ -22,8 +22,8 @@ import static org.eclipse.tractusx.autosetup.constant.AppNameConstant.EDC_CONTROLPLANE; import static org.eclipse.tractusx.autosetup.constant.AppNameConstant.EDC_DATAPLANE; -import static org.eclipse.tractusx.autosetup.constant.AppNameConstant.TRACTUS_CONNECTOR; import static org.eclipse.tractusx.autosetup.constant.AppNameConstant.POSTGRES_DB; +import static org.eclipse.tractusx.autosetup.constant.AppNameConstant.TRACTUS_CONNECTOR; import java.util.Map; @@ -35,6 +35,7 @@ import org.eclipse.tractusx.autosetup.manager.EDCControlplaneManager; import org.eclipse.tractusx.autosetup.manager.EDCDataplaneManager; import org.eclipse.tractusx.autosetup.manager.PostgresDBManager; +import org.eclipse.tractusx.autosetup.manager.TestConnectorServiceManager; import org.eclipse.tractusx.autosetup.manager.TractusConnectorManager; import org.eclipse.tractusx.autosetup.manager.VaultManager; import org.eclipse.tractusx.autosetup.model.Customer; @@ -54,6 +55,7 @@ public class EDCConnectorWorkFlow { private final EDCDataplaneManager edcDataplaneManager; private final TractusConnectorManager tractusConnectorManager; private final ConnectorRegistrationManager connectorRegistrationManager; + private final TestConnectorServiceManager testConnectorServiceManager; private final AppDeleteManager appDeleteManager; @@ -70,6 +72,9 @@ public Map getWorkFlow(Customer customerDetails, SelectedTools t inputConfiguration.putAll( connectorRegistrationManager.registerConnector(customerDetails, tool, inputConfiguration, triger)); + inputConfiguration.putAll(testConnectorServiceManager.verifyConnectorTestingThroughTestService(customerDetails, + inputConfiguration, triger)); + return inputConfiguration; } diff --git a/src/main/java/org/eclipse/tractusx/autosetup/testservice/proxy/ConnectorTestRequest.java b/src/main/java/org/eclipse/tractusx/autosetup/testservice/proxy/ConnectorTestRequest.java new file mode 100644 index 00000000..6f8cd1a0 --- /dev/null +++ b/src/main/java/org/eclipse/tractusx/autosetup/testservice/proxy/ConnectorTestRequest.java @@ -0,0 +1,16 @@ +package org.eclipse.tractusx.autosetup.testservice.proxy; + +import lombok.Builder; +import lombok.Data; + +@Data +@Builder +public class ConnectorTestRequest { + + private String connectorHost; + + private String apiKeyHeader; + + private String apiKeyValue; + +} diff --git a/src/main/java/org/eclipse/tractusx/autosetup/testservice/proxy/ConnectorTestServiceProxy.java b/src/main/java/org/eclipse/tractusx/autosetup/testservice/proxy/ConnectorTestServiceProxy.java new file mode 100644 index 00000000..9de7fbce --- /dev/null +++ b/src/main/java/org/eclipse/tractusx/autosetup/testservice/proxy/ConnectorTestServiceProxy.java @@ -0,0 +1,13 @@ +package org.eclipse.tractusx.autosetup.testservice.proxy; + +import org.springframework.cloud.openfeign.FeignClient; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; + +@FeignClient(name = "ConnectorTestServiceProxy", url = "${connector.test.service.url}") +public interface ConnectorTestServiceProxy { + + @PostMapping("/connector-test") + public String verifyConnectorTestingThroughTestService(@RequestBody ConnectorTestRequest connectorTestRequest); + +} diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties index 997ce591..8b318b80 100644 --- a/src/main/resources/application.properties +++ b/src/main/resources/application.properties @@ -64,6 +64,8 @@ vault.url=${vaultUrl} vault.token=${vaultToken} vault.timeout=30 +#Connector Test service details +connector.test.service.url=${connectorTestServiceUrl} #Portal interface info portal.url=${portalurl} diff --git a/src/main/resources/templates/edc_success_activate.html b/src/main/resources/templates/edc_success_activate.html index cdc116ca..2d37880c 100644 --- a/src/main/resources/templates/edc_success_activate.html +++ b/src/main/resources/templates/edc_success_activate.html @@ -41,7 +41,8 @@

EDC ApiKey : ${edcApiKey}

EDC ApiKeyValue : ${edcApiKeyValue}

Data Plane URL : ${dataPlanePublicEndpoint} - +

Your connector status through connector test service:${connectorTestResult}

+

Kind Regards
Catina-X

From 9290811a185e5e0157dc59cec7fa056fc1279a63 Mon Sep 17 00:00:00 2001 From: Sachin Argade Date: Wed, 22 Mar 2023 14:23:52 +0530 Subject: [PATCH 2/5] Update email template, add waiting for connector test --- .../manager/TestConnectorServiceManager.java | 21 +++++++++++++++++-- .../service/EDCConnectorWorkFlow.java | 3 +++ .../proxy/ConnectorTestServiceProxy.java | 2 +- .../proxy/ConnectorTestServiceResponse.java | 10 +++++++++ .../templates/edc_success_activate.html | 2 +- .../resources/templates/success_activate.html | 1 + 6 files changed, 35 insertions(+), 4 deletions(-) create mode 100644 src/main/java/org/eclipse/tractusx/autosetup/testservice/proxy/ConnectorTestServiceResponse.java diff --git a/src/main/java/org/eclipse/tractusx/autosetup/manager/TestConnectorServiceManager.java b/src/main/java/org/eclipse/tractusx/autosetup/manager/TestConnectorServiceManager.java index 675acb53..5d2864d4 100644 --- a/src/main/java/org/eclipse/tractusx/autosetup/manager/TestConnectorServiceManager.java +++ b/src/main/java/org/eclipse/tractusx/autosetup/manager/TestConnectorServiceManager.java @@ -10,6 +10,8 @@ import org.eclipse.tractusx.autosetup.model.Customer; import org.eclipse.tractusx.autosetup.testservice.proxy.ConnectorTestRequest; import org.eclipse.tractusx.autosetup.testservice.proxy.ConnectorTestServiceProxy; +import org.eclipse.tractusx.autosetup.testservice.proxy.ConnectorTestServiceResponse; +import org.springframework.beans.factory.annotation.Value; import org.springframework.retry.annotation.Backoff; import org.springframework.retry.annotation.Retryable; import org.springframework.retry.support.RetrySynchronizationManager; @@ -26,6 +28,9 @@ public class TestConnectorServiceManager { private final AutoSetupTriggerManager autoSetupTriggerManager; private final ConnectorTestServiceProxy connectorTestServiceProxy; + + @Value("${connector.test.service.url}") + private String connectorTestServiceURL; @Retryable(value = { ServiceException.class }, maxAttemptsExpression = "${retry.maxAttempts}", backoff = @Backoff(delayExpression = "${retry.backOffDelay}")) @@ -40,10 +45,22 @@ public Map verifyConnectorTestingThroughTestService(Customer cus .apiKeyHeader(inputData.get("edcApiKey")).apiKeyValue(inputData.get("edcApiKeyValue")) .connectorHost(inputData.get("controlPlaneEndpoint")).build(); - String testResult = connectorTestServiceProxy + try { + log.info("Waiting after connector setup to get pod up to test connector as data provider/consumer"); + Thread.sleep(60000); + } catch (InterruptedException e) { + + Thread.currentThread().interrupt(); + } + + ConnectorTestServiceResponse testResult = connectorTestServiceProxy .verifyConnectorTestingThroughTestService(connectorTestRequest); - inputData.put("connectorTestResult", testResult); + log.info("Connector status: " + testResult.getMessage()); + + inputData.put("connectorTestResult", testResult.getMessage()); + + inputData.put("testServiceURL", connectorTestServiceURL); autoSetupTriggerDetails.setStatus(TriggerStatusEnum.SUCCESS.name()); diff --git a/src/main/java/org/eclipse/tractusx/autosetup/service/EDCConnectorWorkFlow.java b/src/main/java/org/eclipse/tractusx/autosetup/service/EDCConnectorWorkFlow.java index f12a3126..38b11c58 100644 --- a/src/main/java/org/eclipse/tractusx/autosetup/service/EDCConnectorWorkFlow.java +++ b/src/main/java/org/eclipse/tractusx/autosetup/service/EDCConnectorWorkFlow.java @@ -99,6 +99,9 @@ public Map getWorkFlowSeparateCPandDP(Customer customerDetails, edcDataplaneManager.managePackage(customerDetails, workflowAction, tool, inputConfiguration, triger)); inputConfiguration.putAll( connectorRegistrationManager.registerConnector(customerDetails, tool, inputConfiguration, triger)); + + inputConfiguration.putAll(testConnectorServiceManager.verifyConnectorTestingThroughTestService(customerDetails, + inputConfiguration, triger)); return inputConfiguration; } diff --git a/src/main/java/org/eclipse/tractusx/autosetup/testservice/proxy/ConnectorTestServiceProxy.java b/src/main/java/org/eclipse/tractusx/autosetup/testservice/proxy/ConnectorTestServiceProxy.java index 9de7fbce..2358c5ac 100644 --- a/src/main/java/org/eclipse/tractusx/autosetup/testservice/proxy/ConnectorTestServiceProxy.java +++ b/src/main/java/org/eclipse/tractusx/autosetup/testservice/proxy/ConnectorTestServiceProxy.java @@ -8,6 +8,6 @@ public interface ConnectorTestServiceProxy { @PostMapping("/connector-test") - public String verifyConnectorTestingThroughTestService(@RequestBody ConnectorTestRequest connectorTestRequest); + public ConnectorTestServiceResponse verifyConnectorTestingThroughTestService(@RequestBody ConnectorTestRequest connectorTestRequest); } diff --git a/src/main/java/org/eclipse/tractusx/autosetup/testservice/proxy/ConnectorTestServiceResponse.java b/src/main/java/org/eclipse/tractusx/autosetup/testservice/proxy/ConnectorTestServiceResponse.java new file mode 100644 index 00000000..8c00c7bf --- /dev/null +++ b/src/main/java/org/eclipse/tractusx/autosetup/testservice/proxy/ConnectorTestServiceResponse.java @@ -0,0 +1,10 @@ +package org.eclipse.tractusx.autosetup.testservice.proxy; + +import lombok.Data; + +@Data +public class ConnectorTestServiceResponse { + + private String message; + +} diff --git a/src/main/resources/templates/edc_success_activate.html b/src/main/resources/templates/edc_success_activate.html index 2d37880c..2e8d5fbe 100644 --- a/src/main/resources/templates/edc_success_activate.html +++ b/src/main/resources/templates/edc_success_activate.html @@ -41,7 +41,7 @@

EDC ApiKey : ${edcApiKey}

EDC ApiKeyValue : ${edcApiKeyValue}

Data Plane URL : ${dataPlanePublicEndpoint} -

Your connector status through connector test service:${connectorTestResult}

+

Your connector status through connector test service: ${connectorTestResult}, check status again here

Kind Regards
Catina-X

diff --git a/src/main/resources/templates/success_activate.html b/src/main/resources/templates/success_activate.html index 1cc49b9b..6333062f 100644 --- a/src/main/resources/templates/success_activate.html +++ b/src/main/resources/templates/success_activate.html @@ -33,6 +33,7 @@

Hello ${orgname},

The SDE/DFT tool successfully activated for your use.

Please click here to start using it.

+

Your connector status through connector test service: ${connectorTestResult}, check status again here

Note: You need to use your own organization login credential to login SDE/DFT tool.

Kind Regards
Catina-X

From ab80b21f1571d40f7272ca388c24b76123d3cfb0 Mon Sep 17 00:00:00 2001 From: Sachin Argade Date: Wed, 22 Mar 2023 14:39:05 +0530 Subject: [PATCH 3/5] fix sonar issue --- .../manager/TestConnectorServiceManager.java | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/src/main/java/org/eclipse/tractusx/autosetup/manager/TestConnectorServiceManager.java b/src/main/java/org/eclipse/tractusx/autosetup/manager/TestConnectorServiceManager.java index 5d2864d4..a60a2061 100644 --- a/src/main/java/org/eclipse/tractusx/autosetup/manager/TestConnectorServiceManager.java +++ b/src/main/java/org/eclipse/tractusx/autosetup/manager/TestConnectorServiceManager.java @@ -28,7 +28,7 @@ public class TestConnectorServiceManager { private final AutoSetupTriggerManager autoSetupTriggerManager; private final ConnectorTestServiceProxy connectorTestServiceProxy; - + @Value("${connector.test.service.url}") private String connectorTestServiceURL; @@ -45,13 +45,8 @@ public Map verifyConnectorTestingThroughTestService(Customer cus .apiKeyHeader(inputData.get("edcApiKey")).apiKeyValue(inputData.get("edcApiKeyValue")) .connectorHost(inputData.get("controlPlaneEndpoint")).build(); - try { - log.info("Waiting after connector setup to get pod up to test connector as data provider/consumer"); - Thread.sleep(60000); - } catch (InterruptedException e) { - - Thread.currentThread().interrupt(); - } + log.info("Waiting after connector setup to get pod up to test connector as data provider/consumer"); + Thread.sleep(60000); ConnectorTestServiceResponse testResult = connectorTestServiceProxy .verifyConnectorTestingThroughTestService(connectorTestRequest); @@ -59,7 +54,7 @@ public Map verifyConnectorTestingThroughTestService(Customer cus log.info("Connector status: " + testResult.getMessage()); inputData.put("connectorTestResult", testResult.getMessage()); - + inputData.put("testServiceURL", connectorTestServiceURL); autoSetupTriggerDetails.setStatus(TriggerStatusEnum.SUCCESS.name()); From 7650c5cd257328d0ae8c947a584a7a7e14c2396e Mon Sep 17 00:00:00 2001 From: adkumar1 Date: Thu, 23 Mar 2023 11:54:53 +0530 Subject: [PATCH 4/5] 1.2.2 version --- CHANGELOG.md | 6 ++ README.md | 4 +- charts/orchestrator/Chart.yaml | 4 +- charts/orchestrator/README.md | 2 +- index.yaml | 105 +++++++++++++++++++++++++++++++++ pom.xml | 2 +- 6 files changed, 117 insertions(+), 6 deletions(-) create mode 100644 index.yaml diff --git a/CHANGELOG.md b/CHANGELOG.md index 2c966f59..ed01afb7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,12 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), ## [Unreleased] +## [1.2.2] - 2023-03-23 + +### Added + - Connector test service integration for managed connector connectivity test + - Update email template for connector status + ## [1.2.1] - 2023-03-18 ### Fixed diff --git a/README.md b/README.md index 6dce7be2..2778b049 100644 --- a/README.md +++ b/README.md @@ -12,8 +12,8 @@ This service will help service provider to set up DFT/SDE with EDC and EDC as se ### Software Version ```shell -Application version: 1.2.1 -Helm release version: 1.2.1 +Application version: 1.2.2 +Helm release version: 1.2.2 ``` diff --git a/charts/orchestrator/Chart.yaml b/charts/orchestrator/Chart.yaml index 78be3efe..c3e16efc 100644 --- a/charts/orchestrator/Chart.yaml +++ b/charts/orchestrator/Chart.yaml @@ -38,14 +38,14 @@ sources: # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 1.2.1 +version: 1.2.2 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to # follow Semantic Versioning. They should reflect the version the application is using. # It is recommended to use it with quotes. -appVersion: "1.2.1" +appVersion: "1.2.2" dependencies: - condition: postgresql.enabled name: postgresql diff --git a/charts/orchestrator/README.md b/charts/orchestrator/README.md index 7d130d31..c5b6b4e0 100644 --- a/charts/orchestrator/README.md +++ b/charts/orchestrator/README.md @@ -1,6 +1,6 @@ # autosetup -![Version: 1.2.1](https://img.shields.io/badge/Version-1.2.1-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.2.1](https://img.shields.io/badge/AppVersion-1.2.1-informational?style=flat-square) +![Version: 1.2.2](https://img.shields.io/badge/Version-1.2.2-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.2.2](https://img.shields.io/badge/AppVersion-1.2.2-informational?style=flat-square) This service will help service provider to set up DFT/SDE with EDC and EDC as service in service provider environment. diff --git a/index.yaml b/index.yaml new file mode 100644 index 00000000..4227ecfa --- /dev/null +++ b/index.yaml @@ -0,0 +1,105 @@ +apiVersion: v1 +entries: + autosetup: + - apiVersion: v2 + appVersion: 1.2.2 + created: "2023-03-23T11:52:03.751385+05:30" + dependencies: + - condition: postgresql.enabled + name: postgresql + repository: https://charts.bitnami.com/bitnami + version: 11.x.x + description: This service will help service provider to set up DFT/SDE with EDC + and EDC as service in service provider environment. + digest: cfe3552cc5cb1a6af6a42f0db1ec3c539cce7dfdfe92f16a03222f3b2c061335 + name: autosetup + sources: + - https://github.com/eclipse-tractusx/autosetup-backend + type: application + urls: + - https://catenax-ng.github.io/tx-autosetup-backend/autosetup-1.2.2.tgz + version: 1.2.2 + - apiVersion: v2 + appVersion: 1.2.1 + created: "2023-03-23T11:52:03.747811+05:30" + dependencies: + - condition: postgresql.enabled + name: postgresql + repository: https://charts.bitnami.com/bitnami + version: 11.x.x + description: This service will help service provider to set up DFT/SDE with EDC + and EDC as service in service provider environment. + digest: d786a44bcefc16692922febb7e2aa8c8cf1e9c26a90f5f7f9ab96bd7be7ab6d3 + name: autosetup + sources: + - https://github.com/eclipse-tractusx/autosetup-backend + type: application + urls: + - https://catenax-ng.github.io/tx-autosetup-backend/autosetup-1.2.1.tgz + version: 1.2.1 + - apiVersion: v2 + appVersion: 1.2.0 + created: "2023-03-23T11:52:03.744139+05:30" + dependencies: + - condition: postgresql.enabled + name: postgresql + repository: https://charts.bitnami.com/bitnami + version: 11.x.x + description: This service will help service provider to set up DFT/SDE with EDC + and EDC as service in service provider environment. + digest: 445bb07d54c5122c0a77d167217a7177da0714d302aa394fc6c758a46c8d2fb5 + name: autosetup + sources: + - https://github.com/eclipse-tractusx/autosetup-backend + type: application + urls: + - https://catenax-ng.github.io/tx-autosetup-backend/autosetup-1.2.0.tgz + version: 1.2.0 + - apiVersion: v2 + appVersion: 1.1.5 + created: "2023-03-23T11:52:03.739837+05:30" + dependencies: + - condition: postgresql.enabled + name: postgresql + repository: https://charts.bitnami.com/bitnami + version: 11.x.x + description: A Helm chart for Kubernetes + digest: 04563b2e84ff94388d09e3645699f47be07fbc985fccc4dbc5997b6c754608bd + name: autosetup + sources: + - https://github.com/eclipse-tractusx/autosetup-backend + type: application + urls: + - https://catenax-ng.github.io/tx-autosetup-backend/autosetup-1.1.5.tgz + version: 1.1.5 + - apiVersion: v2 + appVersion: 1.1.4 + created: "2023-03-23T11:52:03.736098+05:30" + dependencies: + - condition: postgresql.enabled + name: postgresql + repository: https://charts.bitnami.com/bitnami + version: 11.x.x + description: A Helm chart for Kubernetes + digest: 31f30dfcab47c6a905522d96508d0c810995504b9cebe76bdf428b735298c7b6 + name: autosetup + type: application + urls: + - https://catenax-ng.github.io/tx-autosetup-backend/autosetup-1.1.4.tgz + version: 1.1.4 + - apiVersion: v2 + appVersion: 0.0.8 + created: "2023-03-23T11:52:03.73211+05:30" + dependencies: + - condition: postgresql.enabled + name: postgresql + repository: https://charts.bitnami.com/bitnami + version: 11.x.x + description: A Helm chart for Kubernetes + digest: fc8fbb6b7f5ca9ba828c217ccf260e06ee4fa6ed3633568ce7d74cdf5f0c1051 + name: autosetup + type: application + urls: + - https://catenax-ng.github.io/tx-autosetup-backend/autosetup-1.1.3.tgz + version: 1.1.3 +generated: "2023-03-23T11:52:03.726464+05:30" diff --git a/pom.xml b/pom.xml index 588b3abd..dffd5254 100644 --- a/pom.xml +++ b/pom.xml @@ -11,7 +11,7 @@ org.eclipse.tractusx auto-setup - 1.2.1 + 1.2.2 auto-setup auto-setup From e640e63a579a6898bd97b64b0c20b80e01564cd4 Mon Sep 17 00:00:00 2001 From: Sachin Argade Date: Thu, 23 Mar 2023 12:08:02 +0530 Subject: [PATCH 5/5] sonar fix --- .../manager/TestConnectorServiceManager.java | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/eclipse/tractusx/autosetup/manager/TestConnectorServiceManager.java b/src/main/java/org/eclipse/tractusx/autosetup/manager/TestConnectorServiceManager.java index a60a2061..89979a0c 100644 --- a/src/main/java/org/eclipse/tractusx/autosetup/manager/TestConnectorServiceManager.java +++ b/src/main/java/org/eclipse/tractusx/autosetup/manager/TestConnectorServiceManager.java @@ -18,6 +18,7 @@ import org.springframework.stereotype.Service; import lombok.RequiredArgsConstructor; +import lombok.SneakyThrows; import lombok.extern.slf4j.Slf4j; @Service @@ -45,8 +46,7 @@ public Map verifyConnectorTestingThroughTestService(Customer cus .apiKeyHeader(inputData.get("edcApiKey")).apiKeyValue(inputData.get("edcApiKeyValue")) .connectorHost(inputData.get("controlPlaneEndpoint")).build(); - log.info("Waiting after connector setup to get pod up to test connector as data provider/consumer"); - Thread.sleep(60000); + waitingTime(); ConnectorTestServiceResponse testResult = connectorTestServiceProxy .verifyConnectorTestingThroughTestService(connectorTestRequest); @@ -74,4 +74,16 @@ public Map verifyConnectorTestingThroughTestService(Customer cus return inputData; } + @SneakyThrows + private void waitingTime() { + + try { + log.info("Waiting after connector setup to get pod up to test connector as data provider/consumer"); + Thread.sleep(60000); + } catch (InterruptedException e) { + + Thread.currentThread().interrupt(); + } + } + }