You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
By default, saved objects service evaluates it’s current status based on the migration and OpenSearch node compatibility.
Using custom repository interface user is now able to register repository with non-opensearch storage options. In such cases, saved object service status should evaluate based on storage option which user chooses. The goal of this project is to provide more flexible interface so that user can customize saved object service status based on their chosen storage option. With the integration of this interface, repository factory provider and non-opensearch storage option, we can decouple saved objects service from OpenSearch.
Requirements
Should have the ability to set the saved object service status based on external storage options.
Architecture
For this feature following changes will be made to saved object service:
SavedObjectsServiceSetup Interface: New function will be added named setStatus in SavedObjectsServiceSetup interface. This function accepts Observable of type ServiceStatus<SavedObjectStatusMeta>. Storage plugin which registers custom repository may customize the saved object service status calculation by calling this function with an Observable. Within this Observable, a plugin may choose to make the status depend on storage connection and any other factors on which their storage depend upon.
SavedObjectsServiceSetup implementation: Instead of returning saved object service status evaluated based on migrator and OpenSearch by default, return following BehaviorSubject as default.
SavedObjectsServiceStart : When saved object service starts, it will check if custom status has been set by plugin. If service founds custom status not null, it will update savedObjectServiceStatus$ with next() otherwise existing status evaluation will be executed.
savedObjectServiceStatus$ is an observable that represents the status of a saved object service. When next() is called on this observable, it indicates that there is a new status for the saved object service, and any components or services that have subscribed to this observable will be notified of the change and can react to it. And that’s how OpenSearch-Dashboards status service will be updated.
Use case by storage plugin
const externalStatus$ = interval(1000).pipe(
switchMap(() => {
// Check Storage health and return status
// e.g. const storageHealth = await this.metaStorageService.checkStorageHealth();
return of({
level: ServiceStatusLevels.available,
summary: 'Saved Object Service is using Postgres and it is up',
});
})
);
core.savedObjects.setStatus(
externalStatus$.pipe(
map((externalStatus) => {
return externalStatus;
})
)
);
Overview
By default, saved objects service evaluates it’s current status based on the migration and OpenSearch node compatibility.
Using custom repository interface user is now able to register repository with non-opensearch storage options. In such cases, saved object service status should evaluate based on storage option which user chooses. The goal of this project is to provide more flexible interface so that user can customize saved object service status based on their chosen storage option. With the integration of this interface, repository factory provider and non-opensearch storage option, we can decouple saved objects service from OpenSearch.
Requirements
Architecture
For this feature following changes will be made to saved object service:
SavedObjectsServiceSetup Interface: New function will be added named
setStatus
in SavedObjectsServiceSetup interface. This function accepts Observable of typeServiceStatus<SavedObjectStatusMeta>
. Storage plugin which registers custom repository may customize the saved object service status calculation by calling this function with an Observable. Within this Observable, a plugin may choose to make the status depend on storage connection and any other factors on which their storage depend upon.SavedObjectsServiceSetup implementation: Instead of returning saved object service status evaluated based on migrator and OpenSearch by default, return following
BehaviorSubject
as default.savedObjectServiceStatus$
withnext()
otherwise existing status evaluation will be executed.savedObjectServiceStatus$
is an observable that represents the status of a saved object service. When next() is called on this observable, it indicates that there is a new status for the saved object service, and any components or services that have subscribed to this observable will be notified of the change and can react to it. And that’s how OpenSearch-Dashboards status service will be updated.Use case by storage plugin
POC : bandinib-amzn@96cc898
Partially fixes: #1441
The text was updated successfully, but these errors were encountered: