Commit 715a1ab0 authored by Mayank Saggar [Microsoft]'s avatar Mayank Saggar [Microsoft]
Browse files

Workflow-azure service - Updated osdu.core.lib to latest 0.0.33 and introduced...

Workflow-azure service - Updated osdu.core.lib to latest 0.0.33 and introduced the necessary changes for the same.
parent a33eb0d1
Pipeline #11496 failed with stage
in 1 minute and 49 seconds
......@@ -31,7 +31,7 @@
<properties>
<azure.version>2.1.7</azure.version>
<osdu.azurecore.version>0.0.24</osdu.azurecore.version>
<osdu.azurecore.version>0.0.33</osdu.azurecore.version>
<azure.appservice.resourcegroup></azure.appservice.resourcegroup>
<azure.appservice.plan></azure.appservice.plan>
<azure.appservice.appname></azure.appservice.appname>
......@@ -72,6 +72,11 @@
<artifactId>core-lib-azure</artifactId>
<version>${osdu.azurecore.version}</version>
</dependency>
<dependency>
<groupId>org.opengroup.osdu</groupId>
<artifactId>os-core-common</artifactId>
<version>0.3.12</version>
</dependency>
<dependency>
<groupId>org.opengroup.osdu</groupId>
<artifactId>workflow-core</artifactId>
......
......@@ -14,16 +14,10 @@
package org.opengroup.osdu.workflow.provider.azure.config;
import com.azure.cosmos.CosmosClient;
import com.azure.cosmos.CosmosContainer;
import com.azure.security.keyvault.secrets.SecretClient;
import org.opengroup.osdu.azure.KeyVaultFacade;
import org.opengroup.osdu.common.Validators;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import sun.misc.BASE64Encoder;
import javax.inject.Named;
......@@ -63,16 +57,4 @@ public class AzureBootstrapConfig {
public String keyVaultURL() {
return keyVaultURL;
}
@Bean
@Named("COSMOS_ENDPOINT")
public String cosmosEndpoint(SecretClient kv) {
return KeyVaultFacade.getSecretWithValidation(kv, "cosmos-endpoint");
}
@Bean
@Named("COSMOS_KEY")
public String cosmosKey(SecretClient kv) {
return KeyVaultFacade.getSecretWithValidation(kv, "cosmos-primary-key");
}
}
......@@ -14,28 +14,21 @@
package org.opengroup.osdu.workflow.provider.azure.repository;
import java.util.List;
import java.util.Optional;
import java.util.logging.Level;
import java.util.logging.Logger;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.opengroup.osdu.azure.CosmosStore;
import org.opengroup.osdu.azure.cosmosdb.CosmosStore;
import org.opengroup.osdu.core.common.model.WorkflowType;
import org.opengroup.osdu.core.common.model.http.DpsHeaders;
import org.opengroup.osdu.workflow.model.IngestionStrategy;
import org.opengroup.osdu.workflow.provider.azure.config.AzureBootstrapConfig;
import org.opengroup.osdu.workflow.provider.azure.config.CosmosConfig;
import org.opengroup.osdu.workflow.provider.azure.model.IngestionStrategyDoc;
import org.opengroup.osdu.workflow.provider.interfaces.IIngestionStrategyRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;
import com.azure.cosmos.CosmosContainer;
import javax.inject.Named;
import java.util.Optional;
import java.util.logging.Level;
import java.util.logging.Logger;
@Repository
@Slf4j
......
......@@ -14,13 +14,9 @@
package org.opengroup.osdu.workflow.provider.azure.repository;
import java.util.logging.Level;
import java.util.logging.Logger;
import java.util.Optional;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.opengroup.osdu.azure.CosmosStore;
import org.opengroup.osdu.azure.cosmosdb.CosmosStore;
import org.opengroup.osdu.core.common.model.http.DpsHeaders;
import org.opengroup.osdu.workflow.exception.WorkflowNotFoundException;
import org.opengroup.osdu.workflow.model.WorkflowStatus;
......@@ -31,9 +27,9 @@ import org.opengroup.osdu.workflow.provider.interfaces.IWorkflowStatusRepository
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;
import com.azure.cosmos.CosmosContainer;
import javax.inject.Named;
import java.util.Optional;
import java.util.logging.Level;
import java.util.logging.Logger;
@Repository
@Slf4j
......
......@@ -13,6 +13,13 @@
# limitations under the License.
LOG_PREFIX=workflow
# Server Path Configuration
server.servlet.contextPath=/api/workflow/v1/
# Partition service
PARTITION_API=${partition_service_endpoint}
azure.activedirectory.app-resource-id=${aad_client_id}
# Azure AD configuration for OpenIDConnect
azure.activedirectory.session-stateless=true
......
package org.opengroup.osdu.workflow.provider.azure.repository;
import com.azure.cosmos.*;
import com.azure.cosmos.CosmosClientException;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.InjectMocks;
import org.mockito.Mock;
import org.mockito.junit.MockitoJUnitRunner;
import org.opengroup.osdu.azure.CosmosStore;
import org.opengroup.osdu.azure.cosmosdb.CosmosStore;
import org.opengroup.osdu.core.common.model.WorkflowType;
import org.opengroup.osdu.core.common.model.http.AppException;
import org.opengroup.osdu.core.common.model.http.DpsHeaders;
......@@ -21,17 +18,14 @@ import org.opengroup.osdu.workflow.provider.azure.config.CosmosConfig;
import org.opengroup.osdu.workflow.provider.azure.model.IngestionStrategyDoc;
import org.springframework.boot.test.context.SpringBootTest;
import java.io.IOException;
import java.util.Optional;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.ArgumentMatchers.eq;
import static org.mockito.Mockito.doReturn;
import static org.mockito.Mockito.doThrow;
import static org.mockito.Mockito.when;
import javax.inject.Named;
import java.io.IOException;
import java.util.Optional;
@RunWith(MockitoJUnitRunner.class)
@SpringBootTest(classes = {WorkflowApplication.class})
......
package org.opengroup.osdu.workflow.provider.azure.repository;
import com.azure.cosmos.*;
import com.azure.cosmos.CosmosClientException;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.InjectMocks;
import org.mockito.Mock;
import org.mockito.junit.MockitoJUnitRunner;
import org.opengroup.osdu.azure.CosmosStore;
import org.opengroup.osdu.azure.cosmosdb.CosmosStore;
import org.opengroup.osdu.core.common.model.http.AppException;
import org.opengroup.osdu.core.common.model.http.DpsHeaders;
import org.opengroup.osdu.workflow.exception.WorkflowNotFoundException;
......@@ -21,20 +19,14 @@ import org.opengroup.osdu.workflow.provider.azure.config.CosmosConfig;
import org.opengroup.osdu.workflow.provider.azure.model.WorkflowStatusDoc;
import org.springframework.boot.test.context.SpringBootTest;
import java.io.IOException;
import java.util.Optional;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.ArgumentMatchers.eq;
import static org.mockito.Mockito.doNothing;
import static org.mockito.Mockito.doReturn;
import static org.mockito.Mockito.doThrow;
import static org.mockito.Mockito.times;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
import javax.inject.Named;
import java.io.IOException;
import java.util.Optional;
@RunWith(MockitoJUnitRunner.class)
@SpringBootTest(classes = {WorkflowApplication.class})
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment