From b60af676805093bccf7ced054ae553204ecf60f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20B=C4=99za?= Date: Mon, 15 Jan 2024 17:52:28 +0100 Subject: [PATCH] Make sure that we always fetch latest commit sha When we update the service definition we don't want to copy sha from the previous deployment but rather fetch the latest one. For that we need to zero git sha in deployment definiton which will trigger fetching latest change. --- pkg/koyeb/services.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkg/koyeb/services.go b/pkg/koyeb/services.go index 31c61b9d..d01c4310 100644 --- a/pkg/koyeb/services.go +++ b/pkg/koyeb/services.go @@ -165,6 +165,11 @@ $> koyeb service update myapp/myservice --env PORT=8001 --env '!DEBUG'`, updateDef = latestDeploy.GetDeployments()[0].Definition } + // zero the sha to make sure that the latest sha is fetched + if updateDef.Git != nil { + updateDef.Git.Sha = koyeb.PtrString("") + } + err = parseServiceDefinitionFlags(cmd.Flags(), updateDef) if err != nil { return err