From c8c9348567966e9b294a991d89626ef78d21885d Mon Sep 17 00:00:00 2001 From: Dotan Simha Date: Tue, 28 Oct 2025 09:09:05 +0200 Subject: [PATCH 1/2] fix(deployment): address issues when deploying the same commit twice --- deployment/utils/service-deployment.ts | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/deployment/utils/service-deployment.ts b/deployment/utils/service-deployment.ts index 53f41978102..6e0b414417e 100644 --- a/deployment/utils/service-deployment.ts +++ b/deployment/utils/service-deployment.ts @@ -31,6 +31,7 @@ export type ServiceSecretBinding> = { export class ServiceDeployment { private envSecrets: Record> = {}; + private replaceEveryDeployment: boolean = false; constructor( protected name: string, @@ -80,6 +81,12 @@ export class ServiceDeployment { return this; } + replaceOnEveryDeployment() { + this.replaceEveryDeployment = true; + + return this; + } + withConditionalSecret>>( enabled: boolean, envVar: string, @@ -273,6 +280,12 @@ export class ServiceDeployment { annotations: {}, }; + if (this.replaceEveryDeployment) { + metadata.annotations = { + 'pulumi.com/update-timestamp': Date.now().toString(), + }; + } + metadata.labels = { app: this.name, }; From f7073c64d0d5bf7f16f1e697346b5a14956e233b Mon Sep 17 00:00:00 2001 From: Dotan Simha Date: Tue, 28 Oct 2025 09:41:58 +0200 Subject: [PATCH 2/2] fix --- deployment/utils/service-deployment.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/deployment/utils/service-deployment.ts b/deployment/utils/service-deployment.ts index 6e0b414417e..abd53b604bb 100644 --- a/deployment/utils/service-deployment.ts +++ b/deployment/utils/service-deployment.ts @@ -292,6 +292,7 @@ export class ServiceDeployment { if (this.options.exposesMetrics) { metadata.annotations = { + ...metadata.annotations, 'prometheus.io/port': '10254', 'prometheus.io/path': '/metrics', 'prometheus.io/scrape': 'true',