From fb873d9bc168bd84a82a9947df295f439d73f7d9 Mon Sep 17 00:00:00 2001 From: IshaVenikar Date: Wed, 9 Oct 2024 14:40:15 +0530 Subject: [PATCH] Pass auction Id in DNS deployment --- packages/backend/src/entity/Deployment.ts | 3 +++ packages/backend/src/entity/Project.ts | 2 +- packages/backend/src/registry.ts | 3 +-- packages/backend/src/service.ts | 6 ++++-- 4 files changed, 9 insertions(+), 5 deletions(-) diff --git a/packages/backend/src/entity/Deployment.ts b/packages/backend/src/entity/Deployment.ts index a2719986..239e88ee 100644 --- a/packages/backend/src/entity/Deployment.ts +++ b/packages/backend/src/entity/Deployment.ts @@ -130,6 +130,9 @@ export class Deployment { @Column('varchar') deployerLrn!: string; + @Column('varchar', { nullable: true }) + auctionId!: string | null; + @Column({ enum: Environment }) diff --git a/packages/backend/src/entity/Project.ts b/packages/backend/src/entity/Project.ts index e877878a..646cff59 100644 --- a/packages/backend/src/entity/Project.ts +++ b/packages/backend/src/entity/Project.ts @@ -47,7 +47,7 @@ export class Project { description!: string; @Column('varchar', { nullable: true }) - auctionId?: string | null; + auctionId!: string | null; @Column({ type: 'simple-array', nullable: true }) deployerLrn!: string[] | null; diff --git a/packages/backend/src/registry.ts b/packages/backend/src/registry.ts index 04e5895a..17e670ed 100644 --- a/packages/backend/src/registry.ts +++ b/packages/backend/src/registry.ts @@ -377,8 +377,7 @@ export class Registry { return records.filter((record: AppDeploymentRecord) => deployments.some( (deployment) => - deployment.applicationRecordId === record.attributes.application && - record.attributes.url.includes(deployment.id) + deployment.applicationRecordId === record.attributes.application ) ); } diff --git a/packages/backend/src/service.ts b/packages/backend/src/service.ts index 2306db02..19ef0d7d 100644 --- a/packages/backend/src/service.ts +++ b/packages/backend/src/service.ts @@ -746,7 +746,8 @@ export class Service { createdBy: Object.assign(new User(), { id: project.ownerId!, }), - deployerLrn: deployer + deployerLrn: deployer, + auctionId: project.auctionId }); log( @@ -777,7 +778,8 @@ export class Service { repository: repoUrl, environmentVariables: environmentVariablesObj, dns: `${newDeployment.project.name}`, - lrn + auctionId: project.auctionId!, + lrn: deployer, }); }