Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Open Subsurface Data Universe Software
Platform
Data Flow
Data Enrichment
wks
Commits
1fde2cc1
Commit
1fde2cc1
authored
Sep 08, 2021
by
Rostislav Dublin (EPAM)
Browse files
Merge branch 'gcp-refactor-lib-usage' into 'master'
Gcp refactor lib usage(GONRG-3099) See merge request
!94
parents
87c12979
35792202
Pipeline
#69132
failed with stages
in 35 minutes and 48 seconds
Changes
5
Pipelines
4
Hide whitespace changes
Inline
Side-by-side
NOTICE
View file @
1fde2cc1
...
...
@@ -128,9 +128,9 @@ The following software have components provided under the terms of this license:
- Lucene Join (from https://repo1.maven.org/maven2/org/apache/lucene/lucene-join)
- Lucene Join (from https://repo1.maven.org/maven2/org/apache/lucene/lucene-join)
- Lucene Memory (from https://repo1.maven.org/maven2/org/apache/lucene/lucene-memory)
- Lucene Memory (from https://repo1.maven.org/maven2/org/apache/lucene/lucene-memory)
- Lucene Memory (from https://repo1.maven.org/maven2/org/apache/lucene/lucene-backward-codecs)
- Lucene Memory (from https://repo1.maven.org/maven2/org/apache/lucene/lucene-backward-codecs)
- Lucene Memory (from https://repo1.maven.org/maven2/org/apache/lucene/lucene-memory)
- Lucene Miscellaneous (from https://repo1.maven.org/maven2/org/apache/lucene/lucene-misc)
- Lucene Miscellaneous (from https://repo1.maven.org/maven2/org/apache/lucene/lucene-misc)
- Lucene Queries (from https://repo1.maven.org/maven2/org/apache/lucene/lucene-queries)
...
...
@@ -241,10 +241,8 @@ The following software have components provided under the terms of this license:
- elasticsearch-geo (from https://github.com/elastic/elasticsearch)
- elasticsearch-geo (from https://github.com/elastic/elasticsearch)
- error-prone annotations (from https://repo1.maven.org/maven2/com/google/errorprone/error_prone_annotations)
- error-prone annotations (from https://repo1.maven.org/maven2/com/google/errorprone/error_prone_annotations)
- google-cloud-datastore (from https://github.com/GoogleCloudPlatform/google-cloud-python)
- google-cloud-storage (from https://github.com/GoogleCloudPlatform/google-cloud-python)
- grpc-google-cloud-pubsub-v1 (from https://repo1.maven.org/maven2/com/google/api/grpc/grpc-google-cloud-pubsub-v1)
- io.grpc:grpc-alts (from https://github.com/grpc/grpc-java)
- io.grpc:grpc-api (from https://github.com/grpc/grpc-java)
- io.grpc:grpc-auth (from https://github.com/grpc/grpc-java)
...
...
@@ -291,10 +289,10 @@ The following software have components provided under the terms of this license:
- resilience4j (from https://resilience4j.readme.io)
- resilience4j (from https://resilience4j.readme.io)
- resilience4j (from https://resilience4j.readme.io)
- resilience4j (from https://github.com/resilience4j/resilience4j)
- resilience4j (from https://resilience4j.readme.io)
- resilience4j (from https://resilience4j.readme.io)
- resilience4j (from https://github.com/resilience4j/resilience4j)
- resilience4j (from https://github.com/resilience4j/resilience4j)
- rest (from https://github.com/elastic/elasticsearch)
- rest (from https://github.com/elastic/elasticsearch)
- rest-high-level (from https://github.com/elastic/elasticsearch)
...
...
@@ -477,7 +475,6 @@ The following software have components provided under the terms of this license:
- JUnit Platform Commons (from https://junit.org/junit5/)
- JUnit Platform Engine API (from https://junit.org/junit5/)
- JUnit Platform Engine API (from https://junit.org/junit5/)
- JUnit Vintage Engine (from https://junit.org/junit5/)
- Jakarta Annotations API (from https://projects.eclipse.org/projects/ee4j.ca)
- Jakarta Expression Language Implementation (from https://projects.eclipse.org/projects/ee4j.el)
- Logback Classic Module (from https://repo1.maven.org/maven2/ch/qos/logback/logback-classic)
...
...
@@ -490,6 +487,7 @@ The following software have components provided under the terms of this license:
- Microsoft Application Insights Java SDK Web with Auto Registration Module (from https://github.com/Microsoft/ApplicationInsights-Java)
- Microsoft Application Insights Log4j 2 Appender (from https://github.com/Microsoft/ApplicationInsights-Java)
- SnakeYAML (from http://www.snakeyaml.org)
- org.junit.vintage:junit-vintage-engine (from http://junit.org/junit5/)
========================================================================
EPL-2.0
...
...
@@ -508,9 +506,9 @@ The following software have components provided under the terms of this license:
- JUnit Platform Commons (from https://junit.org/junit5/)
- JUnit Platform Engine API (from https://junit.org/junit5/)
- JUnit Platform Engine API (from https://junit.org/junit5/)
- JUnit Vintage Engine (from https://junit.org/junit5/)
- Jakarta Annotations API (from https://projects.eclipse.org/projects/ee4j.ca)
- Jakarta Expression Language Implementation (from https://projects.eclipse.org/projects/ee4j.el)
- org.junit.vintage:junit-vintage-engine (from http://junit.org/junit5/)
========================================================================
GPL-2.0-only
...
...
@@ -791,9 +789,9 @@ The following software have components provided under the terms of this license:
- JUnit Platform Commons (from https://junit.org/junit5/)
- JUnit Platform Engine API (from https://junit.org/junit5/)
- JUnit Platform Engine API (from https://junit.org/junit5/)
- JUnit Vintage Engine (from https://junit.org/junit5/)
- Jakarta Activation API jar (from https://repo1.maven.org/maven2/jakarta/activation/jakarta.activation-api)
- Jakarta XML Binding API (from https://repo1.maven.org/maven2/jakarta/xml/bind/jakarta.xml.bind-api)
- Spongy Castle (from http://rtyley.github.io/spongycastle/)
- org.junit.vintage:junit-vintage-engine (from http://junit.org/junit5/)
provider/wks-gcp/pom.xml
View file @
1fde2cc1
...
...
@@ -28,12 +28,7 @@
<dependency>
<groupId>
org.opengroup.osdu
</groupId>
<artifactId>
core-lib-gcp
</artifactId>
<version>
0.11.0
</version>
</dependency>
<dependency>
<groupId>
io.grpc
</groupId>
<artifactId>
grpc-core
</artifactId>
<version>
1.38.1
</version>
<version>
0.12.0-SNAPSHOT
</version>
</dependency>
<dependency>
<groupId>
com.google.cloud
</groupId>
...
...
provider/wks-gcp/src/main/java/org/opengroup/osdu/wks/WksServiceApplicationGcp.java
View file @
1fde2cc1
...
...
@@ -17,7 +17,6 @@
package
org.opengroup.osdu.wks
;
import
org.opengroup.osdu.core.gcp.di.PartitionTenantInfoFactoryBean
;
import
org.opengroup.osdu.core.gcp.multitenancy.StorageFactory
;
import
org.opengroup.osdu.core.gcp.multitenancy.TenantFactory
;
import
org.springframework.boot.SpringApplication
;
...
...
@@ -29,8 +28,7 @@ import org.springframework.context.annotation.FilterType;
@ComponentScan
(
value
=
{
"org.opengroup.osdu"
},
excludeFilters
=
{
@ComponentScan
.
Filter
(
type
=
FilterType
.
ASSIGNABLE_TYPE
,
value
=
{
PartitionTenantInfoFactoryBean
.
class
,
WksServiceApplication
.
class
,
TenantFactory
.
class
,
StorageFactory
.
class
})})
@ComponentScan
.
Filter
(
type
=
FilterType
.
ASSIGNABLE_TYPE
,
value
=
{
WksServiceApplication
.
class
,
TenantFactory
.
class
,
StorageFactory
.
class
})})
public
class
WksServiceApplicationGcp
{
public
static
void
main
(
String
[]
args
)
{
...
...
provider/wks-gcp/src/main/java/org/opengroup/osdu/wks/config/TenantFactoryConfiguration.java
deleted
100644 → 0
View file @
87c12979
/*
* Copyright 2021 Google LLC
* Copyright 2021 EPAM Systems, Inc
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package
org.opengroup.osdu.wks.config
;
import
lombok.RequiredArgsConstructor
;
import
org.opengroup.osdu.core.common.model.http.DpsHeaders
;
import
org.opengroup.osdu.core.common.multitenancy.PartitionTenantInfoFactory
;
import
org.opengroup.osdu.core.common.partition.IPartitionFactory
;
import
org.opengroup.osdu.core.common.partition.IPartitionProvider
;
import
org.opengroup.osdu.core.common.provider.interfaces.ITenantFactory
;
import
org.opengroup.osdu.core.gcp.GoogleIdToken.GcpServiceAccountJwtClient
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Configuration
;
@Configuration
@RequiredArgsConstructor
public
class
TenantFactoryConfiguration
{
private
final
IPartitionFactory
partitionFactory
;
private
final
GcpServiceAccountJwtClient
jwtClient
;
@Bean
public
ITenantFactory
getTenantInfoFactory
()
{
DpsHeaders
dpsHeaders
=
new
DpsHeaders
();
dpsHeaders
.
put
(
DpsHeaders
.
AUTHORIZATION
,
jwtClient
.
getIdToken
(
null
));
IPartitionProvider
iPartitionProvider
=
partitionFactory
.
create
(
dpsHeaders
);
return
PartitionTenantInfoFactory
.
builder
()
.
partitionProvider
(
iPartitionProvider
)
.
build
();
}
}
provider/wks-gcp/src/main/resources/application.properties
View file @
1fde2cc1
...
...
@@ -22,3 +22,4 @@ osdu.host.search-service-url=${SEARCH_API}
osdu.host.storage-service-url
=
${STORAGE_API}
osdu.host.schema-service-url
=
${SCHEMA_API}
GOOGLE_AUDIENCES
=
${WKS_GCP_AUDIENCES}
LOG_PREFIX
=
wks-service
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment