feature: remove public annotation from EntityProcessingResult to mark it as an internal type and improve the change set to describe the subscription method
Signed-off-by: Hasan Oezdemir <21654050+nodify-at@users.noreply.github.com>
This commit is contained in:
@@ -2,5 +2,13 @@
|
||||
'@backstage/plugin-catalog-backend': patch
|
||||
---
|
||||
|
||||
Provide a new listener `CatalogProcessingErrorListener` for the processing engines to notify the caller if an entity can not be processed. Processing engine
|
||||
will collect the errors and passes the entity and the results to the given listeners.
|
||||
CatalogBuilder supports now subscription to processing engine errors.
|
||||
|
||||
```ts
|
||||
subscribe(options: {
|
||||
onProcessingError: (event: { unprocessedEntity: Entity, error: Error }) => Promise<void> | void;
|
||||
});
|
||||
```
|
||||
|
||||
If you want to get notified on errors while processing the entities, you call CatalogBuilder.subscribe
|
||||
to get notifications with the parameters defined as above.
|
||||
|
||||
@@ -15,7 +15,6 @@ import { DocumentCollatorFactory } from '@backstage/plugin-search-common';
|
||||
import { Entity } from '@backstage/catalog-model';
|
||||
import { EntityPolicy } from '@backstage/catalog-model';
|
||||
import { GetEntitiesRequest } from '@backstage/catalog-client';
|
||||
import { JsonObject } from '@backstage/types';
|
||||
import { JsonValue } from '@backstage/types';
|
||||
import { LocationEntityV1alpha1 } from '@backstage/catalog-model';
|
||||
import { Logger } from 'winston';
|
||||
@@ -420,21 +419,6 @@ export type EntityFilter =
|
||||
}
|
||||
| EntitiesSearchFilter;
|
||||
|
||||
// @public
|
||||
export type EntityProcessingResult =
|
||||
| {
|
||||
ok: true;
|
||||
state: JsonObject;
|
||||
completedEntity: Entity;
|
||||
deferredEntities: DeferredEntity[];
|
||||
relations: EntityRelationSpec[];
|
||||
errors: Error[];
|
||||
}
|
||||
| {
|
||||
ok: false;
|
||||
errors: Error[];
|
||||
};
|
||||
|
||||
// @public
|
||||
export interface EntityProvider {
|
||||
connect(connection: EntityProviderConnection): Promise<void>;
|
||||
|
||||
@@ -14,11 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
export type {
|
||||
CatalogProcessingEngine,
|
||||
EntityProcessingResult,
|
||||
DeferredEntity,
|
||||
} from './types';
|
||||
export type { CatalogProcessingEngine, DeferredEntity } from './types';
|
||||
|
||||
export { createRandomProcessingInterval } from './refresh';
|
||||
export type { ProcessingIntervalFunction } from './refresh';
|
||||
|
||||
@@ -29,7 +29,7 @@ export type EntityProcessingRequest = {
|
||||
|
||||
/**
|
||||
* The result of processing an entity.
|
||||
* @public
|
||||
* @internal
|
||||
*/
|
||||
export type EntityProcessingResult =
|
||||
| {
|
||||
|
||||
Reference in New Issue
Block a user