From 2fecd945690a939931329c1aab29e12c3e773c67 Mon Sep 17 00:00:00 2001 From: Carlos Alexandro Becker Date: Sun, 7 Aug 2022 12:32:15 -0300 Subject: [PATCH] fix: do not push snaps concurrently (#3295) It seems that the error I get sometimes (#3257) is related to snap push not being able to work concurrently. I'm not a 100% sure though, so I'll try this and see how it goes. If the error still happens, we can ignore the error or retry. closes #3257 --- internal/pipe/snapcraft/snapcraft.go | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/internal/pipe/snapcraft/snapcraft.go b/internal/pipe/snapcraft/snapcraft.go index 3c44d2f4859..be6e54cdf86 100644 --- a/internal/pipe/snapcraft/snapcraft.go +++ b/internal/pipe/snapcraft/snapcraft.go @@ -201,14 +201,12 @@ func (Pipe) Publish(ctx *context.Context) error { return pipe.ErrSkipPublishEnabled } snaps := ctx.Artifacts.Filter(artifact.ByType(artifact.PublishableSnapcraft)).List() - g := semerrgroup.New(ctx.Parallelism) for _, snap := range snaps { - snap := snap - g.Go(func() error { - return push(ctx, snap) - }) + if err := push(ctx, snap); err != nil { + return err + } } - return g.Wait() + return nil } func create(ctx *context.Context, snap config.Snapcraft, arch string, binaries []*artifact.Artifact) error {