From 1de45a6508925e6c39bb82561574024af2fdaee8 Mon Sep 17 00:00:00 2001 From: Comrade Renovate Bot Date: Mon, 31 Jul 2023 07:02:04 +0000 Subject: [PATCH 1/4] chore(deps): update goreleaser/goreleaser docker tag to v1.19.2 --- .drone.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.drone.yml b/.drone.yml index 17c563ad3..601a89f8d 100644 --- a/.drone.yml +++ b/.drone.yml @@ -33,7 +33,7 @@ steps: event: tag - name: release - image: goreleaser/goreleaser:v1.18.2 + image: goreleaser/goreleaser:v1.19.2 environment: GITEA_TOKEN: from_secret: goreleaser_gitea_token From 3e95319969775c09647b91f699486998e9b155c5 Mon Sep 17 00:00:00 2001 From: Rich M Date: Sun, 30 Jul 2023 12:28:11 +0100 Subject: [PATCH 2/4] Add os hook for interrupt signal while waiting for service to converge. --- pkg/upstream/stack/stack.go | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/pkg/upstream/stack/stack.go b/pkg/upstream/stack/stack.go index 61ee93cf9..8ca2c8764 100644 --- a/pkg/upstream/stack/stack.go +++ b/pkg/upstream/stack/stack.go @@ -5,6 +5,8 @@ import ( "fmt" "io" "io/ioutil" + "os" + "os/signal" "strings" "time" @@ -454,6 +456,10 @@ func WaitOnService(ctx context.Context, cl *dockerClient.Client, serviceID, appN errChan := make(chan error, 1) pipeReader, pipeWriter := io.Pipe() + sigintChannel := make(chan os.Signal, 1) + signal.Notify(sigintChannel, os.Interrupt) + defer signal.Stop(sigintChannel) + go func() { errChan <- progress.ServiceProgress(ctx, cl, serviceID, pipeWriter) }() @@ -465,6 +471,26 @@ func WaitOnService(ctx context.Context, cl *dockerClient.Client, serviceID, appN select { case err := <-errChan: return err + case <-sigintChannel: + return fmt.Errorf(fmt.Sprintf(` +The wait for %s to converge was interrupted. + +This does not necessarily mean your deployment has stopped, but we aren't +monitoring it anymore + +You can track latest deployment status with: + + abra app ps --watch %s + +And inspect the logs with: + + abra app logs %s + +If a service is failing to even start, try to smoke out the error with: + + abra app errors --watch %s + +`, appName, appName, appName, appName)) case <-time.After(timeout): return fmt.Errorf(fmt.Sprintf(` %s has not converged (%s second timeout reached). @@ -481,7 +507,7 @@ And inspect the logs with: abra app logs %s -If a service is failing to even start, try smoke out the error with: +If a service is failing to even start, try to smoke out the error with: abra app errors --watch %s From 2d135329bb9756fb8a9bdcada4c359c15e77823b Mon Sep 17 00:00:00 2001 From: Richard M Date: Mon, 31 Jul 2023 22:25:41 +0100 Subject: [PATCH 3/4] Change message when starting to poll for deployment status. --- pkg/upstream/stack/stack.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/upstream/stack/stack.go b/pkg/upstream/stack/stack.go index 8ca2c8764..5091e93ab 100644 --- a/pkg/upstream/stack/stack.go +++ b/pkg/upstream/stack/stack.go @@ -416,7 +416,7 @@ func deployServices( return nil } - logrus.Infof("waiting for services to converge: %s", strings.Join(serviceNames, ", ")) + logrus.Infof("Starting to poll for deployment status for: %s", strings.Join(serviceNames, ", ")) ch := make(chan error, len(serviceIDs)) for serviceID, serviceName := range serviceIDs { logrus.Debugf("waiting on %s to converge", serviceName) From 65fdaf43cce8ca6c3e9609e4c59da0abc005b394 Mon Sep 17 00:00:00 2001 From: Richard M Date: Tue, 1 Aug 2023 12:50:15 +0100 Subject: [PATCH 4/4] Attempt to replace the deploy completed message. --- pkg/upstream/stack/stack.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/upstream/stack/stack.go b/pkg/upstream/stack/stack.go index 5091e93ab..e28c90de6 100644 --- a/pkg/upstream/stack/stack.go +++ b/pkg/upstream/stack/stack.go @@ -433,7 +433,7 @@ func deployServices( logrus.Debugf("assuming %s converged successfully", serviceID) } - logrus.Info("services converged 👌") + logrus.Infof("Successfully deployed %s to %s 👌", appName, namespace.Name()) return nil }