Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • osdu/platform/system/indexer-service
  • schundu/indexer-service
2 results
Show changes
Commits on Source (16)
Showing
with 126 additions and 11 deletions
......@@ -32,3 +32,7 @@ analyze:
type: mvn
target: provider/indexer-ibm/pom.xml
path: .
- name: indexer-reference
type: mvn
target: provider/indexer-reference/pom.xml
path: .
This diff is collapsed.
......@@ -88,7 +88,7 @@ spec:
- name: servicebus_topic_name
value: indexing-progress
- name: entitlements_service_endpoint
value: http://entitlements-azure/entitlements/v1
value: http://entitlements/api/entitlements/v2
- name: entitlements_service_api_key
value: "OBSOLETE"
- name: schema_service_url
......
......@@ -24,7 +24,7 @@ public class SchemaConverterPropertiesConfig implements SchemaConverterConfig {
}
private Set<String> getDefaultSupportedArrayTypes() {
return new HashSet<>(Arrays.asList("boolean", "integer", "number", "string"));
return new HashSet<>(Arrays.asList("boolean", "integer", "number", "string", "object"));
}
private Map<String, String> getDefaultSpecialDefinitionsMap() {
......
......@@ -40,6 +40,10 @@
{
"kind": "string",
"path": "Checksum"
},
{
"kind": "[]object",
"path": "VectorHeaderMapping"
}
]
}
\ No newline at end of file
......@@ -32,6 +32,14 @@
{
"kind": "[]link",
"path": "Counterparties"
},
{
"kind": "[]object",
"path": "Terms"
},
{
"kind": "[]object",
"path": "RestrictedResources"
}
]
}
\ No newline at end of file
......@@ -76,6 +76,10 @@
{
"kind": "string",
"path": "VerticalMeasurementID"
},
{
"kind": "[]object",
"path": "Curves"
}
]
}
\ No newline at end of file
......@@ -44,6 +44,10 @@
{
"kind": "[]string",
"path": "Annotations"
},
{
"kind": "[]object",
"path": "LineageAssertions"
}
]
}
\ No newline at end of file
......@@ -25,7 +25,7 @@
<dependency>
<groupId>org.opengroup.osdu</groupId>
<artifactId>core-lib-gcp</artifactId>
<version>0.6.1-SNAPSHOT</version>
<version>0.7.0</version>
</dependency>
<dependency>
......
......@@ -23,12 +23,36 @@ public class AppExceptionHandler {
? e.getOriginalException().getMessage()
: e.getError().getMessage();
if (e.getError().getCode() > 499) {
Integer errorCode = e.getError().getCode();
if (errorCode > 499) {
log.error(exceptionMsg, e.getOriginalException());
} else {
log.warn(exceptionMsg, e.getOriginalException());
}
return new ResponseEntity<>(e.getError(), HttpStatus.resolve(e.getError().getCode()));
HttpStatus status = Objects.nonNull(HttpStatus.resolve(errorCode))
? HttpStatus.resolve(errorCode)
: resolveNotSupportedStatus(errorCode);
return new ResponseEntity<>(e.getError(), status);
}
//Currently not all codes provided from core can be resolved by HttpStatus
//example org.opengroup.osdu.core.common.model.http.RequestStatus have not supported by HttpStatus codes
private HttpStatus resolveNotSupportedStatus(int statusCode) {
if (statusCode > 99 && statusCode < 200) {
return HttpStatus.CONTINUE;
}
if (statusCode > 199 && statusCode < 300) {
return HttpStatus.NO_CONTENT;
}
if (statusCode > 299 && statusCode < 400) {
return HttpStatus.MULTIPLE_CHOICES;
}
if (statusCode > 399 && statusCode < 500) {
return HttpStatus.BAD_REQUEST;
}
return HttpStatus.INTERNAL_SERVER_ERROR;
}
}
......@@ -42,5 +42,3 @@ security.https.certificate.trust=false
indexer.que.service.mail=default@iam.gserviceaccount.com
SCHEMA_HOST=${HOST}/api/schema-service/v1/schema
storage-query-kinds-host=https://${STORAGE_HOSTNAME}/api/storage/v2/query/kinds
schema.converter.supported-array-types=boolean,integer,number,string,object
......@@ -31,7 +31,7 @@
<packaging>jar</packaging>
<properties>
<os-core-lib-ibm.version>0.3.8-SNAPSHOT</os-core-lib-ibm.version>
<os-core-lib-ibm.version>0.7.0</os-core-lib-ibm.version>
</properties>
<profiles>
......
......@@ -7,6 +7,7 @@ Feature: Indexing of the documents
| tenant1:indexer-int-test:sample-schema-1:1.0.4 | tenant1-indexer-int-test:sample-schema-1-1.0.4 | index_records_1 |
| tenant1:indexer-int-test:sample-schema-2:1.0.4 | tenant1-indexer-int-test:sample-schema-2-1.0.4 | index_records_2 |
| tenant1:indexer-int-test:sample-schema-3:1.0.4 | tenant1-indexer-int-test:sample-schema-3-1.0.4 | index_records_3 |
| tenant1:indexer-int-test:sample-schema-1:1.0.5 | tenant1-indexer-int-test:sample-schema-1-1.0.5 | index_records_1 |
Scenario Outline: Ingest the record and Index in the Elastic Search
When I ingest records with the <recordFile> with <acl> for a given <kind>
......@@ -33,4 +34,4 @@ Feature: Indexing of the documents
Examples:
| kind | recordFile | index | acl | tagKey | tagValue | number |
| "tenant1:indexer-int-test:sample-schema-1:1.0.4" | "index_records_1" | "tenant1-indexer-int-test-sample-schema-1-1.0.4" | "data.default.viewers@tenant1" | "testtag" | "testvalue" | 5 |
| "tenant1:indexer-int-test:sample-schema-1:1.0.5" | "index_records_1" | "tenant1-indexer-int-test-sample-schema-1-1.0.5" | "data.default.viewers@tenant1" | "testtag" | "testvalue" | 5 |