Commit 77aa3354 authored by Kishore Battula's avatar Kishore Battula
Browse files

Merge branch 'core-lib-version-update' into 'master'

Core lib azure version update

See merge request !38
parents 08a95be0 48136712
Pipeline #16249 passed with stages
in 45 minutes and 29 seconds
......@@ -9,6 +9,13 @@ The following software have components provided under the terms of this license:
- Android SDK (from https://www.android.com/)
========================================================================
Apache-1.1
========================================================================
The following software have components provided under the terms of this license:
- StAX (from http://stax.codehaus.org/)
========================================================================
Apache-2.0
========================================================================
......@@ -32,14 +39,11 @@ The following software have components provided under the terms of this license:
- AWS SDK for Java - BOM (from https://aws.amazon.com/sdkforjava)
- AWS SDK for Java - Core (from https://aws.amazon.com/sdkforjava)
- Adapter: RxJava (from )
- Apache Commons BeanUtils (from http://commons.apache.org/proper/commons-beanutils/)
- Apache Commons Codec (from http://commons.apache.org/proper/commons-codec/)
- Apache Commons Collections (from http://commons.apache.org/proper/commons-collections/)
- Apache Commons Lang (from http://commons.apache.org/proper/commons-lang/)
- Apache Commons Logging (from http://commons.apache.org/proper/commons-logging/)
- Apache Commons Logging (from http://commons.apache.org/proper/commons-logging/)
- Apache Commons Text (from http://commons.apache.org/proper/commons-text/)
- Apache Commons Validator (from http://commons.apache.org/proper/commons-validator/)
- Apache Geronimo JMS Spec 2.0 (from http://geronimo.apache.org/maven/${siteId}/${version})
- Apache HttpAsyncClient (from http://hc.apache.org/httpcomponents-asyncclient)
- Apache HttpClient (from http://hc.apache.org/httpcomponents-client)
......@@ -56,13 +60,12 @@ The following software have components provided under the terms of this license:
- Asynchronous Http Client (from )
- Asynchronous Http Client Netty Utils (from )
- AutoValue Annotations (from )
- Azure Metrics Spring Boot Starter (from https://github.com/Microsoft/azure-spring-boot)
- Bean Validation API (from http://beanvalidation.org)
- Byte Buddy (without dependencies) (from )
- Byte Buddy Java agent (from )
- ClassMate (from http://github.com/cowtowncoder/java-classmate)
- Cloud Storage JSON API v1-rev58-1.21.0 (from )
- Commons Digester (from http://commons.apache.org/digester/)
- Commons IO (from http://commons.apache.org/io/)
- Commons IO (from http://commons.apache.org/io/)
- Converter: Jackson (from )
- Elastic JNA Distribution (from https://github.com/java-native-access/jna)
......@@ -90,6 +93,7 @@ The following software have components provided under the terms of this license:
- IBM COS Java SDK for COS KMS (from https://github.com/ibm/ibm-cos-sdk-java)
- IBM COS SDK For Java (from https://github.com/ibm/ibm-cos-sdk-java)
- IBM COS SDK for Java - Core (from https://github.com/ibm/ibm-cos-sdk-java)
- IntelliJ IDEA Annotations (from http://www.jetbrains.org)
- J2ObjC Annotations (from https://github.com/google/j2objc/)
- J2ObjC Annotations (from https://github.com/google/j2objc/)
- JBoss Logging 3 (from http://www.jboss.org)
......@@ -101,23 +105,37 @@ The following software have components provided under the terms of this license:
- JSONassert (from https://github.com/skyscreamer/JSONassert)
- Jackson 2 extensions to the Google HTTP Client Library for Java. (from https://github.com/google/google-http-java-client.git/google-http-client-jackson2)
- Jackson dataformat: CBOR (from http://github.com/FasterXML/jackson-dataformats-binary)
- Jackson dataformat: CBOR (from http://github.com/FasterXML/jackson-dataformats-binary)
- Jackson datatype: JSR310 (from http://wiki.fasterxml.com/JacksonModuleJSR310)
- Jackson datatype: JSR310 (from http://wiki.fasterxml.com/JacksonModuleJSR310)
- Jackson-annotations (from http://github.com/FasterXML/jackson)
- Jackson-annotations (from http://github.com/FasterXML/jackson)
- Jackson-core (from https://github.com/FasterXML/jackson-core)
- Jackson-core (from https://github.com/FasterXML/jackson-core)
- Jackson-dataformat-Smile (from http://github.com/FasterXML/jackson-dataformat-smile)
- Jackson-dataformat-Smile (from http://github.com/FasterXML/jackson-dataformat-smile)
- Jackson-dataformat-XML (from http://wiki.fasterxml.com/JacksonExtensionXmlDataBinding)
- Jackson-dataformat-YAML (from https://github.com/FasterXML/jackson)
- Jackson-dataformat-YAML (from https://github.com/FasterXML/jackson)
- Jackson-datatype-Joda (from http://wiki.fasterxml.com/JacksonModuleJoda)
- Jackson-datatype-jdk8 (from )
- Jackson-datatype-jdk8 (from )
- Jackson-module-Afterburner (from http://wiki.fasterxml.com/JacksonHome)
- Jackson-module-JAXB-annotations (from http://wiki.fasterxml.com/JacksonJAXBAnnotations)
- Jackson-module-parameter-names (from )
- Jackson-module-parameter-names (from )
- Jakarta Bean Validation API (from https://beanvalidation.org)
- Java Native Access (from https://github.com/java-native-access/jna)
- Java Native Access Platform (from https://github.com/java-native-access/jna)
- Java UUID Generator (from http://wiki.fasterxml.com/JugHome)
- Javassist (from http://www.javassist.org/)
- Joda-Time (from http://www.joda.org/joda-time/)
- Json Path (from https://github.com/jayway/JsonPath)
- KeePassJava2 :: All (from https://repo1.maven.org/maven2/org/linguafranca/pwdb/KeePassJava2)
- KeePassJava2 :: DOM (from https://repo1.maven.org/maven2/org/linguafranca/pwdb/KeePassJava2-dom)
- KeePassJava2 :: JAXB (from https://repo1.maven.org/maven2/org/linguafranca/pwdb/KeePassJava2-jaxb)
- KeePassJava2 :: KDB (from https://repo1.maven.org/maven2/org/linguafranca/pwdb/KeePassJava2-kdb)
- KeePassJava2 :: KDBX (from https://repo1.maven.org/maven2/org/linguafranca/pwdb/KeePassJava2-kdbx)
- KeePassJava2 :: Simple (from https://repo1.maven.org/maven2/org/linguafranca/pwdb/KeePassJava2-simple)
- Lucene Common Analyzers (from )
- Lucene Core (from )
- Lucene Grouping (from )
......@@ -140,23 +158,30 @@ The following software have components provided under the terms of this license:
- Microsoft Application Insights Java SDK Web Module (from https://github.com/Microsoft/ApplicationInsights-Java)
- Microsoft Application Insights Log4j 2 Appender (from https://github.com/Microsoft/ApplicationInsights-Java)
- Microsoft Azure Netty HTTP Client Library (from https://github.com/Azure/azure-sdk-for-java)
- Mockito (from http://mockito.org)
- Microsoft Azure SDK for SQL API of Azure Cosmos DB Service (from https://github.com/Azure/azure-sdk-for-java)
- Mockito (from http://www.mockito.org)
- Mockito (from http://mockito.org)
- Mockito (from http://mockito.org)
- Netty Reactive Streams Implementation (from )
- Netty/Buffer (from http://netty.io/)
- Netty/Buffer (from http://netty.io/)
- Netty/Codec (from )
- Netty/Codec/DNS (from )
- Netty/Codec (from )
- Netty/Codec/HTTP (from )
- Netty/Codec/HTTP (from )
- Netty/Codec/HTTP2 (from )
- Netty/Codec/Socks (from )
- Netty/Common (from )
- Netty/Common (from )
- Netty/Handler (from )
- Netty/Handler (from )
- Netty/Handler/Proxy (from )
- Netty/Resolver (from )
- Netty/Resolver/DNS (from )
- Netty/Resolver (from )
- Netty/TomcatNative [BoringSSL - Static] (from )
- Netty/Transport (from http://netty.io/)
- Netty/Transport (from http://netty.io/)
- Netty/Transport/Native/Unix/Common (from )
- Netty/Transport/Native/Unix/Common (from )
- Nimbus JOSE+JWT (from https://bitbucket.org/connect2id/nimbus-jose-jwt)
- Nimbus LangTag (from https://bitbucket.org/connect2id/nimbus-language-tags)
......@@ -171,10 +196,12 @@ The following software have components provided under the terms of this license:
- OpenCensus (from https://github.com/census-instrumentation/opencensus-java)
- OpenCensus (from https://github.com/census-instrumentation/opencensus-java)
- OpenCensus (from https://github.com/census-instrumentation/opencensus-java)
- PWDB :: Database (from https://repo1.maven.org/maven2/org/linguafranca/pwdb/database)
- Protocol Buffer extensions to the Google HTTP Client Library for Java. (from )
- QpidJMS Client (from )
- Reactive Streams Netty driver (from https://github.com/reactor/reactor-netty)
- Retrofit (from )
- Simple XML (from http://simple.sourceforge.net)
- SnakeYAML (from http://www.snakeyaml.org)
- Spring AOP (from https://github.com/spring-projects/spring-framework)
- Spring Beans (from https://github.com/spring-projects/spring-framework)
......@@ -216,14 +243,16 @@ The following software have components provided under the terms of this license:
- Spring Transaction (from https://github.com/spring-projects/spring-framework)
- Spring Web (from https://github.com/spring-projects/spring-framework)
- Spring Web MVC (from https://github.com/spring-projects/spring-framework)
- StAX (from http://stax.codehaus.org/)
- StAX API (from http://stax.codehaus.org/)
- T-Digest (from https://github.com/tdunning/t-digest)
- Woodstox (from https://github.com/FasterXML/woodstox)
- aalto-xml (from )
- aggs-matrix-stats (from https://github.com/elastic/elasticsearch)
- cli (from https://github.com/elastic/elasticsearch)
- com.google.api.grpc:proto-google-cloud-firestore-v1beta1 (from https://github.com/googleapis/googleapis)
- com.google.api.grpc:proto-google-common-protos (from https://github.com/googleapis/googleapis)
- com.google.api.grpc:proto-google-iam-v1 (from https://github.com/googleapis/googleapis)
- commons-collections (from )
- compiler (from http://github.com/spullara/mustache.java)
- datastore-v1-proto-client (from )
- elasticsearch-core (from https://github.com/elastic/elasticsearch)
......@@ -243,8 +272,10 @@ The following software have components provided under the terms of this license:
- ion-java (from https://github.com/amznlabs/ion-java/)
- jackson-databind (from http://github.com/FasterXML/jackson)
- jackson-databind (from http://github.com/FasterXML/jackson)
- jackson-databind (from http://github.com/FasterXML/jackson)
- java-cloudant (from https://cloudant.com)
- java-cloudant (from https://cloudant.com)
- javatuples (from http://www.javatuples.org)
- javax.inject (from http://code.google.com/p/atinject/)
- jersey-core (from )
- jose4j (from https://bitbucket.org/b_c/jose4j/)
......@@ -267,12 +298,10 @@ The following software have components provided under the terms of this license:
- proto-google-cloud-firestore-admin-v1 (from https://repo1.maven.org/maven2/com/google/api/grpc/proto-google-cloud-firestore-admin-v1)
- proto-google-cloud-firestore-v1 (from https://repo1.maven.org/maven2/com/google/api/grpc/proto-google-cloud-firestore-v1)
- proton-j (from )
- proton-j (from )
- rank-eval (from https://github.com/elastic/elasticsearch)
- rest (from https://github.com/elastic/elasticsearch)
- rest-high-level (from https://github.com/elastic/elasticsearch)
- rxjava (from https://github.com/ReactiveX/RxJava)
- rxjava (from https://github.com/ReactiveX/RxJava)
- secure-sm (from https://github.com/elastic/elasticsearch)
- spring-cloud-starter (from https://projects.spring.io/spring-cloud)
- spring-security-config (from http://spring.io/spring-security)
......@@ -312,6 +341,7 @@ The following software have components provided under the terms of this license:
- Hamcrest (from http://hamcrest.org/JavaHamcrest/)
- Hamcrest Core (from http://hamcrest.org/)
- Lucene Common Analyzers (from )
- StAX (from http://stax.codehaus.org/)
- Stax2 API (from http://github.com/FasterXML/stax2-api)
- ThreeTen backport (from https://www.threeten.org/threetenbp)
......@@ -342,6 +372,7 @@ The following software have components provided under the terms of this license:
- Mockito (from http://www.mockito.org)
- NanoHttpd-Core (from )
- Netty/Codec/HTTP (from )
- Netty/Codec/HTTP (from )
- Protocol Buffer Java API (from https://developers.google.com/protocol-buffers/)
- Protocol Buffers [Util] (from )
- Reflections (from http://github.com/ronmamo/reflections)
......@@ -566,19 +597,25 @@ The following software have components provided under the terms of this license:
- Microsoft Azure client library for Identity (from https://github.com/Azure/azure-sdk-for-java)
- Microsoft Azure client library for KeyVault Secrets (from https://github.com/Azure/azure-sdk-for-java)
- Microsoft Azure common module for Storage (from https://github.com/Azure/azure-sdk-for-java)
- Microsoft Azure internal Avro module for Storage (from https://github.com/Azure/azure-sdk-for-java)
- Mockito (from http://mockito.org)
- Mockito (from http://mockito.org)
- Mockito (from http://www.mockito.org)
- Netty/Codec/HTTP (from )
- Netty/Codec/HTTP (from )
- Netty/Common (from )
- Netty/Common (from )
- Project Lombok (from https://projectlombok.org)
- SLF4J API Module (from http://www.slf4j.org)
- Spongy Castle (from http://rtyley.github.io/spongycastle/)
- Spring Data for Azure Cosmos DB SQL API (from https://github.com/Azure/azure-sdk-for-java/tree/master/sdk/cosmos/azure-spring-data-cosmos)
- adal4j (from https://github.com/AzureAD/azure-activedirectory-library-for-java)
- jsoup (from http://jsoup.org/)
- micrometer-core (from https://github.com/micrometer-metrics/micrometer)
- mockito-inline (from https://github.com/mockito/mockito)
- mockito-junit-jupiter (from https://github.com/mockito/mockito)
- msal4j (from https://github.com/AzureAD/microsoft-authentication-library-for-java)
- msal4j-persistence-extension (from https://github.com/AzureAD/microsoft-authentication-extensions-for-java)
- spring-security-core (from http://spring.io/spring-security)
- spring-security-crypto (from http://spring.io/spring-security)
......@@ -613,6 +650,7 @@ The following software have components provided under the terms of this license:
- Guava: Google Core Libraries for Java (from https://github.com/google/guava.git)
- HdrHistogram (from http://hdrhistogram.github.io/HdrHistogram/)
- LatencyUtils (from http://latencyutils.github.io/LatencyUtils/)
- Spongy Castle (from http://rtyley.github.io/spongycastle/)
========================================================================
SPL-1.0
......@@ -645,6 +683,7 @@ The following software have components provided under the terms of this license:
- Microsoft Azure client library for Blob Storage (from https://github.com/Azure/azure-sdk-for-java)
- Project Lombok (from https://projectlombok.org)
- Spring Web (from https://github.com/spring-projects/spring-framework)
- msal4j (from https://github.com/AzureAD/microsoft-authentication-library-for-java)
- reactive-streams (from http://www.reactive-streams.org/)
========================================================================
......@@ -658,6 +697,7 @@ The following software have components provided under the terms of this license:
- JUnit Jupiter (Aggregator) (from https://junit.org/junit5/)
- JavaBeans Activation Framework API jar (from )
- JavaMail API (from )
- Spongy Castle (from http://rtyley.github.io/spongycastle/)
- jakarta.xml.bind-api (from )
- org.junit.jupiter:junit-jupiter-api (from http://junit.org/junit5/)
- org.junit.jupiter:junit-jupiter-engine (from http://junit.org/junit5/)
......
......@@ -31,13 +31,26 @@
<properties>
<azure.version>2.1.7</azure.version>
<osdu.azurecore.version>0.0.33</osdu.azurecore.version>
<osdu.corelibazure.version>0.0.44</osdu.corelibazure.version>
<azure.appservice.resourcegroup></azure.appservice.resourcegroup>
<azure.appservice.plan></azure.appservice.plan>
<azure.appservice.appname></azure.appservice.appname>
<azure.appservice.subscription></azure.appservice.subscription>
</properties>
<dependencyManagement>
<dependencies>
<!-- Inherit managed dependencies from core-lib-azure -->
<dependency>
<groupId>org.opengroup.osdu</groupId>
<artifactId>core-lib-azure</artifactId>
<version>${osdu.corelibazure.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<dependency>
<groupId>com.microsoft.azure</groupId>
......@@ -70,7 +83,7 @@
<dependency>
<groupId>org.opengroup.osdu</groupId>
<artifactId>core-lib-azure</artifactId>
<version>${osdu.azurecore.version}</version>
<version>${osdu.corelibazure.version}</version>
</dependency>
<dependency>
<groupId>org.opengroup.osdu</groupId>
......
......@@ -61,7 +61,7 @@ public class AzureBootstrapConfig {
public CosmosClient buildCosmosClient(SecretClient kv) {
final String cosmosEndpoint = KeyVaultFacade.getSecretWithValidation(kv, "opendes-cosmos-endpoint");
final String cosmosPrimaryKey = KeyVaultFacade.getSecretWithValidation(kv, "opendes-cosmos-primary-key");
return new CosmosClientBuilder().setEndpoint(cosmosEndpoint).setKey(cosmosPrimaryKey).buildClient();
return new CosmosClientBuilder().endpoint(cosmosEndpoint).key(cosmosPrimaryKey).buildClient();
}
@Bean
......
package org.opengroup.osdu.workflow.provider.azure.config;
import com.azure.cosmos.CosmosClient;
import com.azure.cosmos.CosmosClientBuilder;
import com.azure.cosmos.internal.AsyncDocumentClient;
import org.opengroup.osdu.azure.cosmosdb.ICosmosClientFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Primary;
......@@ -19,9 +17,4 @@ public class SinglePartitionCosmosClientFactory implements ICosmosClientFactory
public CosmosClient getClient(final String s) {
return cosmosClient;
}
@Override
public AsyncDocumentClient getAsyncClient(final String s) {
return null;
}
}
......@@ -90,7 +90,7 @@ public class WorkflowStatusRepository implements IWorkflowStatusRepository {
if (!existingDoc.isPresent()) {
WorkflowStatusDoc newStatusDoc = buildWorkflowStatusDoc(workflowStatus);
cosmosStore.upsertItem(dpsHeaders.getPartitionId(), cosmosConfig.getDatabase(),
cosmosConfig.getWorkflowStatusCollection(), newStatusDoc);
cosmosConfig.getWorkflowStatusCollection(), newStatusDoc.getWorkflowId(), newStatusDoc);
}
logger.log(Level.INFO, String.format("Fetch saved workflow status: {%s}", workflowStatus));
......@@ -123,7 +123,7 @@ public class WorkflowStatusRepository implements IWorkflowStatusRepository {
workflowStatusDoc.workflowStatusType = WorkflowStatusType.valueOf(workflowStatusType.toString());
cosmosStore.upsertItem(dpsHeaders.getPartitionId(), cosmosConfig.getDatabase(),
cosmosConfig.getWorkflowStatusCollection(), workflowStatusDoc);
cosmosConfig.getWorkflowStatusCollection(), workflowStatusDoc.getWorkflowId(), workflowStatusDoc);
WorkflowStatus workflowStatus = buildWorkflowStatus(workflowStatusDoc);
logger.log(Level.INFO, String.format("Updated workflow status : {%s}", workflowStatus));
......
package org.opengroup.osdu.workflow.provider.azure.repository;
import com.azure.cosmos.CosmosClientException;
import com.azure.cosmos.CosmosException;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
......@@ -54,7 +54,7 @@ public class IngestionStrategyRepositoryTest {
}
@Test
public void findByWorkflowTypeAndDataTypeAndUserId() throws CosmosClientException, IOException {
public void findByWorkflowTypeAndDataTypeAndUserId() throws CosmosException, IOException {
IngestionStrategyDoc ingestionStrategyDoc = new IngestionStrategyDoc();
ingestionStrategyDoc.setDagName("osdu_python_sdk_well_log_ingestion");
ingestionStrategyDoc.setDataType("well_log");
......@@ -76,14 +76,14 @@ public class IngestionStrategyRepositoryTest {
}
@Test
public void shouldReturnNullWhenRecordNotFound() throws CosmosClientException {
public void shouldReturnNullWhenRecordNotFound() throws CosmosException {
when(cosmosStore.findItem(any(), any(), any(), any(), any(), any()))
.thenReturn(Optional.empty());
Assert.assertNull(repository.findByWorkflowTypeAndDataTypeAndUserId(WorkflowType.OSDU, "test", ""));
}
@Test(expected = AppException.class)
public void shouldThrowExceptionWhenCosmosException() throws CosmosClientException {
public void shouldThrowExceptionWhenCosmosException() throws CosmosException {
doThrow(AppException.class)
.when(cosmosStore)
.findItem(any(), any(), any(), any(), any(), any());
......
package org.opengroup.osdu.workflow.provider.azure.repository;
import com.azure.cosmos.CosmosClientException;
import com.azure.cosmos.CosmosException;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
......@@ -75,7 +75,7 @@ public class WorkflowStatusRepositoryTest {
@Test(expected = WorkflowNotFoundException.class)
public void shouldThrowExceptionWhenWorkflowNotFound() throws CosmosClientException {
public void shouldThrowExceptionWhenWorkflowNotFound() throws CosmosException {
when(cosmosStore.findItem(
eq(PARTITION_ID),
eq(DATABASE_NAME),
......@@ -87,7 +87,7 @@ public class WorkflowStatusRepositoryTest {
}
@Test(expected = AppException.class)
public void shouldThrowExceptionWhenCosmosException() throws CosmosClientException {
public void shouldThrowExceptionWhenCosmosException() throws CosmosException {
when(cosmosStore.findItem(
eq(PARTITION_ID),
eq(DATABASE_NAME),
......@@ -124,6 +124,7 @@ public class WorkflowStatusRepositoryTest {
eq(PARTITION_ID),
eq(DATABASE_NAME),
eq(WORKFLOW_STATUS_COLLECTION_NAME),
eq(TEST_WORKFLOW_ID),
any());
WorkflowStatus status = workflowStatusRepository.saveWorkflowStatus(workflowstatus);
......@@ -152,7 +153,7 @@ public class WorkflowStatusRepositoryTest {
}
@Test(expected = WorkflowNotFoundException.class)
public void updateWorkflowStatusThrowWorkflowIDNotFound() throws CosmosClientException {
public void updateWorkflowStatusThrowWorkflowIDNotFound() throws CosmosException {
when(cosmosStore.findItem(
eq(PARTITION_ID),
eq(DATABASE_NAME),
......
Supports Markdown
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