From bac5e9da36122761c7b29106cab3f36eb107b7c1 Mon Sep 17 00:00:00 2001 From: Rob Knight Date: Fri, 19 Jul 2024 18:04:18 +0200 Subject: [PATCH] Tidying and extra comments --- .../PODPipeline/PODSheetPreview.tsx | 16 ---------------- .../pipelines/PODPipeline/PODPipeline.ts | 10 ++++++---- .../subservices/utils/instantiatePipeline.ts | 1 - 3 files changed, 6 insertions(+), 21 deletions(-) diff --git a/apps/generic-issuance-client/src/pages/pipeline/PipelineEditSection/PODPipeline/PODSheetPreview.tsx b/apps/generic-issuance-client/src/pages/pipeline/PipelineEditSection/PODPipeline/PODSheetPreview.tsx index c0c93247ff..c4ead37a70 100644 --- a/apps/generic-issuance-client/src/pages/pipeline/PipelineEditSection/PODPipeline/PODSheetPreview.tsx +++ b/apps/generic-issuance-client/src/pages/pipeline/PipelineEditSection/PODPipeline/PODSheetPreview.tsx @@ -170,22 +170,6 @@ function ColumnIndicator({ - {/* - }> - Text - - }> - Integer - - }> - Boolean - - }> - Date - - }>UUID - - */} } onClick={() => onDelete(columnNames[column])} diff --git a/apps/passport-server/src/services/generic-issuance/pipelines/PODPipeline/PODPipeline.ts b/apps/passport-server/src/services/generic-issuance/pipelines/PODPipeline/PODPipeline.ts index 6f0308763e..0450841408 100644 --- a/apps/passport-server/src/services/generic-issuance/pipelines/PODPipeline/PODPipeline.ts +++ b/apps/passport-server/src/services/generic-issuance/pipelines/PODPipeline/PODPipeline.ts @@ -25,11 +25,9 @@ import { PipelineAtom } from "../../../../database/queries/pipelineAtomDB"; import { IPipelineConsumerDB } from "../../../../database/queries/pipelineConsumerDB"; -import { IPipelineSemaphoreHistoryDB } from "../../../../database/queries/pipelineSemaphoreHistoryDB"; import { logger } from "../../../../util/logger"; import { PersistentCacheService } from "../../../persistentCacheService"; import { setError, traced } from "../../../telemetryService"; -import { SemaphoreGroupProvider } from "../../SemaphoreGroupProvider"; import { FeedIssuanceCapability, makeGenericIssuanceFeedUrl @@ -65,7 +63,6 @@ export class PODPipeline implements BasePipeline { private db: IPipelineAtomDB; private definition: PODPipelineDefinition; private credentialSubservice: CredentialSubservice; - private semaphoreGroupProvider?: SemaphoreGroupProvider; private consumerDB: IPipelineConsumerDB; private cacheService: PersistentCacheService; @@ -83,7 +80,6 @@ export class PODPipeline implements BasePipeline { db: IPipelineAtomDB, credentialSubservice: CredentialSubservice, consumerDB: IPipelineConsumerDB, - _semaphoreHistoryDB: IPipelineSemaphoreHistoryDB, cacheService: PersistentCacheService ) { this.eddsaPrivateKey = eddsaPrivateKey; @@ -140,6 +136,12 @@ export class PODPipeline implements BasePipeline { this.definition.id ); + // @todo because this code is async, it may end up being interleaved + // with issuance requests at run-time. This may result in code + // requesting PCDs that - temporarily - do not exist because the atom + // DB has not been repopulated. + // A long-term solution might involve locking the pipeline or the DB, + // or refactoring so that this scenario cannot arise. await this.db.clear(this.definition.id); logs.push(makePLogInfo(`cleared old data`)); await this.db.save(this.definition.id, atoms); diff --git a/apps/passport-server/src/services/generic-issuance/subservices/utils/instantiatePipeline.ts b/apps/passport-server/src/services/generic-issuance/subservices/utils/instantiatePipeline.ts index e7f9a2ed01..6a039ed428 100644 --- a/apps/passport-server/src/services/generic-issuance/subservices/utils/instantiatePipeline.ts +++ b/apps/passport-server/src/services/generic-issuance/subservices/utils/instantiatePipeline.ts @@ -118,7 +118,6 @@ export function instantiatePipeline( args.pipelineAtomDB, args.credentialSubservice, args.consumerDB, - args.semaphoreHistoryDB, args.cacheService ); }