Skip to content

Commit

Permalink
Merge pull request backstage#27816 from backstage/freben/incr-depr
Browse files Browse the repository at this point in the history
deprecate IncrementalCatalogBuilder, stop using old event interface
  • Loading branch information
freben authored Nov 25, 2024
2 parents 6a4027c + cce9cae commit 935c855
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 8 deletions.
5 changes: 5 additions & 0 deletions .changeset/fast-cheetahs-deliver.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@backstage/plugin-catalog-backend-module-incremental-ingestion': patch
---

Deprecate old-backend-system `IncrementalCatalogBuilder`
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
```ts
import { BackendFeature } from '@backstage/backend-plugin-api';

// @alpha (undocumented)
// @alpha @deprecated (undocumented)
const _feature: BackendFeature;
export default _feature;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export type EntityIteratorResult<T> =
cursor?: T;
};

// @public (undocumented)
// @public @deprecated (undocumented)
export class IncrementalCatalogBuilder {
// (undocumented)
addIncrementalEntityProvider<TCursor, TContext>(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@

import { default as feature } from './module';

/** @alpha */
/**
* @alpha
* @deprecated Please import from `@backstage/plugin-catalog-backend-module-incremental-ingestion` instead
*/
const _feature = feature;
export default _feature;
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,10 @@ import { performance } from 'perf_hooks';
import { Duration } from 'luxon';
import { v4 } from 'uuid';
import { stringifyError } from '@backstage/errors';
import { EventParams, EventSubscriber } from '@backstage/plugin-events-node';
import { EventParams } from '@backstage/plugin-events-node';
import { HumanDuration } from '@backstage/types';

export class IncrementalIngestionEngine
implements IterationEngine, EventSubscriber
{
export class IncrementalIngestionEngine implements IterationEngine {
private readonly restLength: Duration;
private readonly backoff: HumanDuration[];

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,10 @@ import { IncrementalIngestionDatabaseManager } from '../database/IncrementalInge
import { IncrementalProviderRouter } from '../router/routes';
import { EventParams, EventSubscriber } from '@backstage/plugin-events-node';

/** @public */
/**
* @public
* @deprecated Please migrate to the new backend system and import `@backstage/plugin-catalog-backend-module-incremental-ingestion` as a module, and add providers to the `incrementalIngestionProvidersExtensionPoint` instead
*/
export class IncrementalCatalogBuilder {
/**
* Creates the incremental catalog builder, which extends the regular catalog builder.
Expand Down

0 comments on commit 935c855

Please sign in to comment.