Schema issueshttps://community.opengroup.org/osdu/platform/system/schema-service/-/issues2024-03-23T10:12:02Zhttps://community.opengroup.org/osdu/platform/system/schema-service/-/issues/155OSDU-DD-Delivery-M23.0 (v0.26.0)2024-03-23T10:12:02ZThomas Gehrmann [slb]OSDU-DD-Delivery-M23.0 (v0.26.0)- [ ] Update to the M23.0 deliverables from OSDU Data Definitions- [ ] Update to the M23.0 deliverables from OSDU Data DefinitionsM23 - Release 0.26Thomas Gehrmann [slb]Thomas Gehrmann [slb]https://community.opengroup.org/osdu/platform/system/schema-service/-/issues/142Content-Type returned doesn't match OpenAPI json2024-03-14T16:18:32ZShane HutchinsContent-Type returned doesn't match OpenAPI jsonOne note the Content-Type returned in the following doesn't match OpenAPI json:
* GET /api/schema-service/v1/schema
* PUT /api/schema-service/v1/schema
* POST /api/schema-service/v1/schema
* GET /api/schema-service/v1/schema/{id}
Rece...One note the Content-Type returned in the following doesn't match OpenAPI json:
* GET /api/schema-service/v1/schema
* PUT /api/schema-service/v1/schema
* POST /api/schema-service/v1/schema
* GET /api/schema-service/v1/schema/{id}
Received a response with 'application/json' Content-Type, but it is not declared in the schema.
`Defined content types: */*`
`curl -X GET -H 'Authorization: [Filtered]' -H 'data-partition-id: opendes' 'https://osdu-glab.msft-osdu-test.org/api/schema-service/v1/schema?authority=osdu&source=wks&entityType=wellbore&schemaVersionMajor=1&schemaVersionMinor=1&status=PUBLISHED&scope=INTERNAL&latestVersion=True&limit=10'`
Response status: 200
Response payload: `{"schemaInfos":[],"offset":0,"count":0,"totalCount":0}`M22 - Release 0.25Chad LeongShane HutchinsChad Leonghttps://community.opengroup.org/osdu/platform/system/schema-service/-/issues/120System endpoint should also be accessible to user with admin roles2023-11-29T21:16:40ZAbhishek Kumar (SLB)System endpoint should also be accessible to user with admin rolesAs per initial design, there was a need for reserved partition to store **SHARED** schemas so that users can share schemas across partitions. For example, boostrapped schemas can be accessed by any user from any partition. This design do...As per initial design, there was a need for reserved partition to store **SHARED** schemas so that users can share schemas across partitions. For example, boostrapped schemas can be accessed by any user from any partition. This design does not restrict users to create and share their schemas directly rather going through the bootstrapping route.
Initially, creation of all the schemas were through _**common PUT/POST endpoint**_ and the decision of whether schema is **SHARED** or **INTERNAL** was decided based on the data-partition-id mentioned in the header. This design had its own challenges:
- Necessity of maintaining dedicated partition which all end users must be aware about
- Due to common endpoint for both **SHARED** and **INTERNAL** schemas, the decision making was driven through the data-partition-id in the header.
- Could not put any governance at the URL level for better access management.
![image](/uploads/44297a56933116a349c97b9f3e718c38/image.png)
Considering above challenges separate system endpoint was introduced to bifurcate **INTERNAL** and **SHARED** schema creation. Which means SHARED schemas can only be created using system endpoint without specifying any data-partition-id. This, however, was a breaking change and hence it was achieved in two phases:
1. **Creation of System partition:**
At this stage, only system partition was introduced without impacting the user experience. As a result, all existing **SHARED** partitions were moved to system partition and new requests were re-directed to system partitions i.e no new SHARED schemas were getting created into reserved partition (default)
![image](/uploads/42e8bb9df4441cbc7d319101f41582ae/image.png)
2. **Introduction of new endpoint** (https://{{domain}}/api/schema-service/v1/schemas/system):
Because of a dedicated endpoint, **SHARED** schemas are created without providing any data-partition-id in the header.
![image](/uploads/e76b6b085b9e4213d7178a5d8cddc8ec/image.png)
But there is a issue with this design, it is always expected to create SHARED schemas only through bootstrap script which uses service principal. As a result of this, users who were previously able to create and share their schemas are impacted. They now only need to go through bootstrapping process.
To fix this, we need to restrict the access to this endpoint through some entitlement service group role like service **schema-service.admin**.https://community.opengroup.org/osdu/platform/system/schema-service/-/issues/124Schema service upgrades may be blocked by schemas created in private tenants.2023-10-12T13:30:24ZRustam Lotsmanenko (EPAM)rustam_lotsmanenko@epam.comSchema service upgrades may be blocked by schemas created in private tenants.Currently, the creation of system schema may be blocked by the private internal schema in a private tenant.
If schema initially were created in the private tenant.
![Untitled_Diagram.drawio](/uploads/990837be38e4c62e3f0dbb257d914eb7/U...Currently, the creation of system schema may be blocked by the private internal schema in a private tenant.
If schema initially were created in the private tenant.
![Untitled_Diagram.drawio](/uploads/990837be38e4c62e3f0dbb257d914eb7/Untitled_Diagram.drawio.png)
**Cons of current flow:**
- Easy to break bootstrapping, it will fail with errors like: `Error with kind osdu:wks:master-data--ConnectedSourceDataJob:1.3.0: Message: Update/Create failed because schema id is present in another tenant`
- It's not possible to fix it through API, since Schema doesn't have a DELETE endpoint.
**Proposal:**
- There is none for now.
**Additional info:**M21 - Release 0.24Rustam Lotsmanenko (EPAM)rustam_lotsmanenko@epam.comRustam Lotsmanenko (EPAM)rustam_lotsmanenko@epam.comhttps://community.opengroup.org/osdu/platform/system/schema-service/-/issues/123Incorrect status is being returned upon creating the schema that already exis...2023-05-31T11:42:03ZKamlesh TodaiIncorrect status is being returned upon creating the schema that already exists in the systemWhen one tries to create the schema that is already existing in the system, one gets the return error code of **400 - Bad request**. As per the API documentation, it is correct. But I think that the error code is misleading. The message ...When one tries to create the schema that is already existing in the system, one gets the return error code of **400 - Bad request**. As per the API documentation, it is correct. But I think that the error code is misleading. The message returned is also misleading. It returns "message": "Update/Create failed because schema id is present in another tenant, this is not true because the schema is present in the same tenant.
This is what one would expect, The return error code should be **409 Conflict** indicating that schema is already present. and the message should be "schema is present".M19 - Release 0.22https://community.opengroup.org/osdu/platform/system/schema-service/-/issues/105Remove unwanted logs from IT2022-12-09T13:39:36ZAbhishek Kumar (SLB)Remove unwanted logs from ITAs of today there are too many unwanted logs printed during IT execution which slows down the execution.As of today there are too many unwanted logs printed during IT execution which slows down the execution.Neha SardaNeha Sardahttps://community.opengroup.org/osdu/platform/system/schema-service/-/issues/95x-osdu-indexing changes are breaking2022-10-13T11:08:05ZThomas Gehrmann [slb]x-osdu-indexing changes are breaking# Context:
Indexing hints in the OSDU schemas are considered decorations and not taken into account when schemas versions are
validated for 'breaking changes'.
Downstream indexing changes from any state to any other state are considere...# Context:
Indexing hints in the OSDU schemas are considered decorations and not taken into account when schemas versions are
validated for 'breaking changes'.
Downstream indexing changes from any state to any other state are considered breaking changes:
* Breaking changes for the indexer: changes from `flattened` to `nested` require the re-indexing of the kind in
question.
* Consuming applications must use a different query syntax.
# How it's done today:
The process depends on human interaction (assuming OSDU well-known schemas here, but this is no different for custom
schemas):
* Stakeholders ask for an indexing behavior change, OSDU Data Definition reacts by changing the `x-osdu-indexing`
extension tag values in the schema.
* OSDU Data Definition Release notes identify the kinds, which are to be re-indexed.
* In M10 virtually all kinds had to be re-indexed
* In M11 type `reference-data--QualityDataRuleSet` requires re-indexing
* During deployment the records for the affected kinds must be re-indexed.
# Issue with current design:
Upon deployment of a new milestone (or custom schemas),
1. for all involved data-partitions, delete the index for the changed kind and trigger re-indexing. This can take -
depending on the number of records per kind - a very log time and cause serious down-time.
2. Applications have no good way of understanding that the query syntax has changed. Applications may no longer find
data if they depended on queries into data structures affected by the change.
# Proposal:
## `PUBLISHED` Schema Status
1. For schemas with state `PUBLISHED` treat changes to the `x-osdu-indexing` extension tag values in the schema as **_
breaking changes_**.
2. Breaking changes require an incremented major schema version number.
3. Schema Validation Changes during schema creation:
* Changes to the `x-osdu-indexing` extension tag values in `PUBLISHED` schemas with same major schema version
numbers will be **_rejected_**. I.e., the attempted registration of such schema will fail with error.
## `DEVELOPMENT` Schema Status
1. The validation for `DEVELOPMENT` status schemas for incremental versions on top of or between existing minor or patch
versions follows the same rules as for `PUBLISHED` schemas. Attempts to change the `x-osdu-indexing` extension tag
values will be **_rejected_** by the Schema service.
2. For 'single' version schemas in `DEVELOPMENT`, the updates of the `x-osdu-indexing` extension tag values are
permitted.
* It is the responsibility of the schema authors to communicate the impact to deployment and consumers. This is
expected to be acceptable during the development phase.
CC @nthakur @ChrisZhang @chad @pbehedeM12 - Release 0.15https://community.opengroup.org/osdu/platform/system/schema-service/-/issues/96Add /validate endpoint to help non-core-platform developers2022-09-29T13:41:07ZEric SchoenAdd /validate endpoint to help non-core-platform developersOSDU application developers working outside of the OSDU core platform do not necessarily have access to OSDU's schema toolchain to ensure that their schemas are correct, consistent with OSDU abstract types, and usable by the indexer.
...OSDU application developers working outside of the OSDU core platform do not necessarily have access to OSDU's schema toolchain to ensure that their schemas are correct, consistent with OSDU abstract types, and usable by the indexer.
- When working with DEVELOPMENT status schema, there is no validation enforced by the schema service in the POST or PUT /schema endpoint. This allows an invalid schema to be installed into OSDU.
- Subsequently, the storage service PUT /records endpoint will accept data for that (possibly invalid) schema kind without complaint.
- The application is not aware that the data can't be indexed by the indexer due to invalid schema, and an attempt to reindex data of the invalid schema kind will produce a 500 error from the indexer with no explanation.
If the schema service provided a /validate endpoint that is effectively a dry-run for the POST/PUT /schema endpoint, a lot of uncertainty could be reduced, and lost development time from simple errors could be saved.https://community.opengroup.org/osdu/platform/system/schema-service/-/issues/79ADR: Registering Schema Extensions2022-08-31T15:33:29ZParesh BehedeADR: Registering Schema Extensions**Context & Scope**
Here we are proposing a new set of APIs on Schema service on OSDU that allow for the creation, update retrieval and deletion of extensions on existing Schemas.
This ADR carries on from the following ADR [here](https...**Context & Scope**
Here we are proposing a new set of APIs on Schema service on OSDU that allow for the creation, update retrieval and deletion of extensions on existing Schemas.
This ADR carries on from the following ADR [here](https://community.opengroup.org/osdu/platform/system/search-service/-/issues/69) to allow the x-osdu-virtual-property defined in schemas to also be applied as an extension to schemas by services and applications running on top of the OSDU.
**Trade-off Analysis**
An important assumption we make is that a provider of an extension is the only concrete consumer of that extension. We shall call the provider the schema extension authority. This authority defines the scope it can be governed at.
The alternative is to assign versioning onto extensions. However this then faces potential problems of schema bloat if many versions of an extension could exist for a schema and also increases the friction for adoption by client applications where the extensions are trying to give them the freedom and flexibility to use OSDU schemas in their own context.
Allowing virtual properties to be assigned as extensions services like indexer/search are loosely coupled with these extensions as they need to use them in a generic way e.g. to index an extension property but no consumer will have a hard coupling to the specific properties provided unless they choose to. This is important because it allows the extension authority to change their extensions when they need to and not worry about breaking changes outside their own scope.
This also gives the extension authority flexibility and not enforce the same versioning semantics on an extension that is in the schema.
**Decision**
A new set of APIs will be be developed in the schema service that allows clients to register their own extensions on top of existing schemas.
For now this will only allow users to add in their own _"x-osdu-virtual-properties"_ extensions to existing schemas. However theoretically it could be extended for any extension use case.
The extension APIs can append new virtual properties only, it cannot override or change existing virtual properties defined in the schema.
When clients retrieve schemas from the existing schema service the schema service appends the extensions into the schema transparently to the client.
For example imagine the schema osdu:wks:master-data--Well:1.0.0 contains the following virtual property definition.
```json
{
"x-osdu-virtual-properties":{
"data.VirtualProperties.DefaultLocation": {
"type": "object",
"priority": [
{ "path": "data.ProjectedBottomHoleLocation" },
{ "path": "data.GeographicBottomHoleLocation" },
{ "path": "data.SpatialLocation" }
]}
}
}
```
Then in the schema extensions we provide an extension like below on the new extensions _POST_ API
```json
"kind": "osdu:wks:master-data--Well:1.0.0",
"authority": "MyApplication"
"x-osdu-virtual-properties":{
"data.VirtualProperties.MyDefaultName": {
"type": "string",
"priority": [
{ "path": "data.FacilityName", "isType": "string" }
]}
}
```
A client requesting the schema _"osdu:wks:master-data--Well:1.0.0"_ would then get a result that contained the following.
```json
"schema" {
...
...
{
"x-osdu-virtual-properties":{
"data.VirtualProperties.DefaultLocation": {
"type": "object",
"priority": [
{ "path": "data.ProjectedBottomHoleLocation" },
{ "path": "data.GeographicBottomHoleLocation" },
{ "path": "data.SpatialLocation" }
]}
}
...
...
"x-osdu-extensions": {
"MyApplication": {
"x-osdu-virtual-properties": {
"data.VirtualProperties.MyDefaultName": {
"type": "string",
"priority": [{
"path": "data.FacilityName",
"isType": "string"
}]
}
}
}
}
}
```
Where an extensions object is added to the schema and grouped within the `authority`
However if someone tried to register the following to extensions
```json
"kind": osdu:wks:master-data--Well:1.0.0
"x-osdu-virtual-properties":{
"data.VirtualProperties.DefaultLocation": {
"type": "object",
"priority": [
{ "path": "data.ProjectedBottomHoleLocation" }
]}
}
```
It would fail as 'DefaultLocation' is already declared as a virtual property in the schema.
The storage of extensions supplied is always system wide. This means any extensions registered apply to all partitions. However they are scoped by the schema they are applied to.
**API Spec**
Below is the API spec for the schema extensions
```yaml
paths:
"/schema/extensions":
post:
tags:
- Schema
summary: Adds a schema extension to the schema repository.
description: Adds a schema extension to the schema repository. The extension is identified by a combination of the 'kind' and 'authority' properties assigned on the request and must be unique. Scope of an extension is always SHARED. Required roles 'users.datalake.editors' or 'users.datalake.admins' groups to create schema.
operationId: Create Schema extension
parameters:
- $ref: "#/components/parameters/data-partition-id"
requestBody:
content:
application/json:
schema:
$ref: "#/components/schemas/SchemaExtensionRequest"
required: true
responses:
"201":
description: "Schema extension created"
headers:
location:
description: "Path of newly created schema extension."
schema:
type: "string"
content:
application/json:
schema:
$ref: "#/components/schemas/SchemaExtensionResponse"
"400":
description: "Bad request"
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponseFormat'
"401":
description: "Unauthorized"
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponseFormat'
"403":
description: "Forbidden"
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponseFormat'
"409":
description: "Extension with the same 'kind' and 'authority' already created"
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponseFormat'
security:
- bearer: []
- appkey: []
deprecated: false
put:
tags:
- Schema
summary: Adds a schema extension to the schema repository.
description: Updates a schema extension. The extensions is identified by a combination of the 'kind' and 'authority' properties assigned on the request and must be unique. Scope of an extension is always SHARED. Required roles 'users.datalake.editors' or 'users.datalake.admins' groups to create schema.
operationId: Update Schema extension
parameters:
- $ref: "#/components/parameters/data-partition-id"
requestBody:
content:
application/json:
schema:
$ref: "#/components/schemas/SchemaExtensionRequest"
required: true
responses:
"200":
description: "Schema extension updated"
headers:
location:
description: "Path of updated created schema extension."
schema:
type: "string"
content:
application/json:
schema:
$ref: "#/components/schemas/SchemaExtensionResponse"
"400":
description: "Bad request"
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponseFormat'
"401":
description: "Unauthorized"
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponseFormat'
"403":
description: "Forbidden"
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponseFormat'
security:
- bearer: []
- appkey: []
deprecated: false
get:
tags:
- Schema
summary: "Gets schema extensions from the schema repository."
description: "Gets schema extensions. Required roles 'users.datalake.viewers' or 'users.datalake.editors' or 'users.datalake.admins' groups."
operationId: Gets Schema extensions
parameters:
- in: query
name: kind
schema:
type: string
required: false
description: "The kind to retrieve extensions for"
- in: query
name: authority
schema:
type: string
required: false
description: "The authority to retrieve extensions for"
- in: query
name: id
schema:
type: string
required: false
description: "The ID to retrieve the extension for"
responses:
"200":
description: "OK"
content:
application/json:
schema:
type: array
items:
$ref: "#/components/schemas/SchemaExtensionResponse"
"400":
description: "Bad request"
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponseFormat'
"401":
description: "Unauthorized"
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponseFormat'
"403":
description: "Forbidden"
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponseFormat'
security:
- bearer: []
- appkey: []
deprecated: false
delete:
tags:
- Schema
summary: "Deletes a schema extensions"
description: "Deletes a schema extensions. Required roles 'users.datalake.admins' groups."
operationId: Deletes a schema extension
parameters:
- in: query
name: id
schema:
type: string
required: true
description: "The ID to delete the extension for"
responses:
"204":
description: "No content"
"400":
description: "Bad request"
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponseFormat'
"401":
description: "Unauthorized"
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponseFormat'
"403":
description: "Forbidden"
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponseFormat'
security:
- bearer: []
- appkey: []
deprecated: false
schemas:
SchemaExtensionRequest:
type: object
title: SchemaExtensionRequest
properties:
kind:
type: string
example: "osdu:wks:master-data--Well:1.0.0"
description: "The schema kind(s) the extension applies to. Can use explicit 'authority','source','type','version' values for one or more parts."
authority:
type: string
example: "OSDU"
description: "The authority who supplied the extension. Can be used to identify who should use the extension. A authority can supply one or more extensions but only one for for each unique kind."
x-osdu-extensions:
type: object
example: {}
description: "The extensions to apply to the given kind"
example:
kind: "osdu:wks:master-data--Well:1.0.0"
authority: "GIS"
x-osdu-extensions:
x-osdu-virtual-properties:
data.VirtualProperties.DefaultPosition:
type: "object"
priority: [{ "path": "data.ProjectedBottomHoleLocation" },{"path": "data.GeographicBottomHoleLocation", "type": "GeoJson" },{"path": "data.SpatialLocation"} ]
SchemaExtensionResponse:
type: object
title: SchemaExtensionRequest
properties:
id:
type: string
description: "The unique identifier for the extension"
example:
id: "e4erg55677hfhrrbe5erveer4=="
kind: "osdu:wks:master-data--Well:1.0.0"
authority: "GIS"
x-osdu-extensions:
x-osdu-virtual-properties:
data.VirtualProperties.DefaultPosition:
type: "object"
priority: [{ "path": "data.ProjectedBottomHoleLocation" },{"path": "data.GeographicBottomHoleLocation", "type": "GeoJson" },{"path": "data.SpatialLocation"} ]
```
**Example Use case: Adding and consuming an extensions data property**
Up to this point we have looked at how we can map multiple properties to a virtual property to enable the use case of discovery across different kinds.
However another use case for schema extensions is for different consumers to add new properties into schemas and have them also become discoverable.
To enable this we can make use of the new ```x-osdu-virtual-properties```. For example when an application ingests data they include the properties from the OSDU schema that it relates. However they could choose to add their own properties as well that aren't mentioned in the schema.
This data is then kept in the storage records but is not indexed or known by other consumption services as it is not represented in the schema.
So if I ingest a record from my application like below
```
{
"id": "p1:wks:master-data--Well:1234",
"kind": "osdu:wks:master-data--Well:1.0.0",
...
...
"data": {
"Name": "1234-abc,
"ExtensionProperties": {
"petrel-project": "sim1.pet"
}
...
'''
}
}
```
The property ```Name``` is indexed as it is part of the referenced schema but the property ```petrel-project``` is not part of the schema so is not indexed.
However I could use the new ```x-osdu-virtual-properties``` to assign it as a virtual property so it is indexed.
```
"kind": "osdu:wks:master-data--Well:1.0.0",
"x-osdu-extensions" : {
"authority": "SLB",
"x-osdu-virtual-properties":{
"data.ExtensionProperties.petrel-project": {
"type": "object",
"priority": [
{
"path": "data.ExtensionProperties.petrel-project",
"isType":"string"
}
]}
}
}
```
As I am using the same virtual property key ```data.ExtensionProperties.petrel-project``` as the path to the property in the storage record this means it is indexed on the same path.
e.g. to search for this property
```
{
"kind": "osdu:wks:master-data--Well:1.0.0",
"query": "data.ExtensionProperties.petrel-project:'sim1.pet'"
}
```
**Consequences**
- Schema service needs to be extended to support creating, updating and deleting extensions
- Schema service needs to be updated to add an extensions object to schemas returned to clients
- Schema service needs to send notifications when extensions change
- Indexer needs to support schemas with extensions containing `"x-osdu-virtual-properties"`Paresh BehedeParesh Behedehttps://community.opengroup.org/osdu/platform/system/schema-service/-/issues/94Schema get-by-id API returns incorrect schema2022-08-26T11:55:17ZPramesh PatilSchema get-by-id API returns incorrect schema**Issue -** When we store schema we have two parts metadata + actual schema body.
Metadata is stored into cosmos-db and actual schema is stored into blob-storage.
During manual data cleanup, sometimes data is only deleted from cosmos-db...**Issue -** When we store schema we have two parts metadata + actual schema body.
Metadata is stored into cosmos-db and actual schema is stored into blob-storage.
During manual data cleanup, sometimes data is only deleted from cosmos-db, in such situation get-by-id tend to return value direct from storage if present. In this situation it could return two different schema if simultaneous exist in different data-partition.
Approach - Need to add new method that return verify schema for given Id is present in cosmos-db or not and based on that we should go ahead and fetch details from blob-storage.
To implement this it require changes into core module and every provider should implement common method that return the status of schemahttps://community.opengroup.org/osdu/platform/system/schema-service/-/issues/99Poor performance of schema info list endpoint and uniqueness check2022-08-24T11:00:46ZRustam Lotsmanenko (EPAM)rustam_lotsmanenko@epam.comPoor performance of schema info list endpoint and uniqueness checkPerformance issue related to get schema info list request and uniqueness check in the schema creation process:
~~~
curl --location --request GET 'localhost:8080/api/schema-service/v1/schema?authority=SchemaSanityTest' \
--header 'Data-P...Performance issue related to get schema info list request and uniqueness check in the schema creation process:
~~~
curl --location --request GET 'localhost:8080/api/schema-service/v1/schema?authority=SchemaSanityTest' \
--header 'Data-Partition-Id: osdu'
~~~
This request can use the `offset` and `limit` parameters, it is ok when these parameters are used at the data access layer,
but in the Schema service they were used at the core level by design:
https://community.opengroup.org/osdu/platform/system/schema-service/-/blob/master/schema-core/src/main/java/org/opengroup/osdu/schema/service/serviceimpl/SchemaService.java#L305
Also, this logic is used during schema creation, the same methods used to verify schema uniqueness and whether breaking changes are present or not.
This leads to loading a lot of unwanted data, for example, the query presented in the example will fetch over 6500 schema information from the GCP dev env, but by default, they will be discarded in the core service and only 100 records will be returned in the response.
Previously issues were spotted at GCP and Azure envs, to fix GCP we manually delete schemas created by IT's, my guess is that the Azure team does the same:
https://community.opengroup.org/osdu/platform/system/schema-service/-/issues/76
https://community.opengroup.org/osdu/platform/system/schema-service/-/issues/70
Suggestion for the fix is to pass `limit` and `offset` parameters to the provider level and use them directly.Andrei Dalhikh [EPAM/GC]Andrei Dalhikh [EPAM/GC]https://community.opengroup.org/osdu/platform/system/schema-service/-/issues/108Schema service must not allow creation of schema with different case2022-08-23T15:53:06ZNeelesh ThakurSchema service must not allow creation of schema with different caseSchema service uses `kind` as an identifier for Schema for a data-set. `kind` with casing difference usually belongs to same data-set and don't have any other notion. This creates confusion for the end-user consuming records from Search ...Schema service uses `kind` as an identifier for Schema for a data-set. `kind` with casing difference usually belongs to same data-set and don't have any other notion. This creates confusion for the end-user consuming records from Search service with different case. Moreover consumption service like Search uses kind as index name. It's backend (Elasticsearch) do not honor casing for index names thus creating issues for index creation.
Data Definition does not provide any rules for kind casing and delegates this governance to Schema service. It should not allow creation of schema with different case for kind.
Related Search service issue: [94](https://community.opengroup.org/osdu/platform/system/search-service/-/issues/94)https://community.opengroup.org/osdu/platform/system/schema-service/-/issues/78One should be able to delete the created schema2022-05-05T08:30:39ZKamlesh TodaiOne should be able to delete the created schemaAt present, the API seems to be missing the delete functionality. Prior to schema service when storage API was used there was an option to delete the schema. But in Schema Service that option is not present. So when creating the custom s...At present, the API seems to be missing the delete functionality. Prior to schema service when storage API was used there was an option to delete the schema. But in Schema Service that option is not present. So when creating the custom schemas for testing, it is difficult to clean after the testhttps://community.opengroup.org/osdu/platform/system/schema-service/-/issues/62Restricting a regular user of schema service to create schema with osdu:wks2022-01-18T04:05:34ZParesh BehedeRestricting a regular user of schema service to create schema with osdu:wksSince long there has been a pending item in Schema Service backlog to bring some governance/policing on schema creation/update for certain special authority and source.
For example restricting a regular user of schema service (admin, ed...Since long there has been a pending item in Schema Service backlog to bring some governance/policing on schema creation/update for certain special authority and source.
For example restricting a regular user of schema service (admin, editor or user) should not be able to create schema with authority:source as osdu:wks
Of course bootstrapping for these schemas are still valid. And with MSFT bringing in the new end point /system/schema for bootstrapping OOB schema, upgrades of system schema (OSDU) will also be possible using special privileges and this API.
Keeping these aspects in mind, I think it makes sense to restrict osdu:wks creation or update by regular user via APIs.
It would avoid getting into a schema conflict issues for system schemas in various environments.
Following issue might appear/occur if we do not restrict user from creating osdu:wks
1. Schema service bootstraps data definitions schema (osdu:wks) version 1.0.0 as they are approved
2. These schemas are available across all partitions as system/shared schemas
3. Now user intentionally or unintentionally creates osdu:wks:wellbore:2.0.0 schema his/her partition (private schema)
4. Now if data definitions team comes up with new changes in osdu:wks:wellbore schema and bump up the schema version to osdu:wks:wellbore:2.0.0
5. Now when schema service tries to bootstrap these latest schema version it would fail as one of the private partition already has this exact version available. (created in step 3)https://community.opengroup.org/osdu/platform/system/schema-service/-/issues/71Queuing of Schema build2021-09-16T12:25:18ZAbhishek Kumar (SLB)Queuing of Schema buildCurrently, schema builds are triggered concurrently. This creates a problem with:
- Integration testing
- Bootstrap process
The above two processes make calls to the actual endpoint of the service and hence it is important that these st...Currently, schema builds are triggered concurrently. This creates a problem with:
- Integration testing
- Bootstrap process
The above two processes make calls to the actual endpoint of the service and hence it is important that these steps are triggered on the right image that is deployed.
There have been instances where the bootstrap or IT stage has failed because a different build is triggered and original image is replaced.