Closed samuel-kerrien closed 2 years ago
Draft PR that gives some insights of what should be done here: https://github.com/BlueBrain/nexus/pull/2886
NB: We would rather use the term Pipe
instead of Transformation
Property of pipes:
Context
depending on the pipe (ex: to define the types to filter out, a construct query to transform the resource, ...)resourceSchemas
, resourceTypes
, sourceAsText
, includeMetadata
, includeDeprecated
, ...) will be rewritten as pipesA new property will appear in the payload when creating/updating
Example:
{
...,
"pipeline": {
{
"name": "excludeMetadata"
},
{
"name": "filterTypes",
"description": "We wish only to keep persons here",
"context": {
"types": ["schema:Person"]
}
},
{
"name": "[pipeName]",
"description": "[Optional description]",
"context": {
"property": "[Optional context]"
}
}
},
...
}
pipeline
property, none of the legacy resourceSchemas
, resourceTypes
, sourceAsText
, includeMetadata
, includeDeprecated
properties can be definedpipeId
is not found or if the provided context is invalid, a rejection is returned.For retro-compatibility purposes when getting a view:
After a new Delta version / new version of a Pipe / removal of a Pipe, a pipeline can become invalid. So indexing should not be started for them and these views should be advertised (through an endpoint ?) so that users can be alerted and can fix them.
Create an endpoint where people can test the pipeline against a bunch of resources with actually creating it / indexing
Generalize Pipes to Blazegraph and Composite Views
Break retro-compatibility to make endpoints more understandable/maintainable both on user and developer point of view
1.7:
After 1.7:
I see that you are considering adding an endpoint to discover broken views, would it not be simpler to describe the status of a view when listing them (ref: https://bluebrainnexus.io/docs/delta/api/views/index.html#list-views) ?
Are to able to fit @kaij's usecase into this proposal ?
I was thinking of another endpoint which would act as an healthcheck with the failing views and the reason (retro-compatibility has been broken, the pipe does not exist anymore, ...).
An endpoint that could be used by a probe that could trigger an alert if at least a view is failing.
I am sharing it with the team for now to get some validation between us first. For example, it is very Delta-focused for now, there should be some impacts on Fusion to discuss too.
Follow up of this ticket: Transformation before ElasticSearch indexing #2549
Acceptance Criteria
Next