Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

snapcraft: incorrect version is released #1268

twpayne opened this issue Dec 3, 2019 · 3 comments

snapcraft: incorrect version is released #1268

twpayne opened this issue Dec 3, 2019 · 3 comments


Copy link

@twpayne twpayne commented Dec 3, 2019

Describe the bug

It looks like goreleaser's concurrency can result in the incorrect version of a Snap being released on

To Reproduce

This is not particularly reproducible, but I've seen it in the last two releases of chezmoi, which has a slightly complex goreleaser snapcraft setup with two builds.


After running goreleaser and pushing snaps, displays the correct latest version for the i386 and arm64 architectures (currently 1.7.5) but displays the previous version as the latest version for the amd64 architecture (1.7.4).

The symptom is described in more detail in this forum post. The snapcraft folk (thanks Natalia) did some digging on their side and found:

What we see internally is that we have a request to release revision 92 a few microseconds after the request to release 96, so 96 is released first but almost immediately superseded by 92.

Does that sound like something the tool you are using might be doing?

Expected behavior

Released snap versions are all the latest version and are all at the latest version.


  • OS: Linux running on Travis CI
  • OS version: Almost certainly Ubuntu 18.04.3, but I'm not sure
  • GoReleaser Version: 0.123.3

Additional context

  • chezmoi's releases to are exclusively done by goreleaser running on Travis in response to pushing a tag to GitHub. I don't think there's any other software running here.
  • chezmoi's goreleaser snapcraft config. Note that there are two builds used.
  • chezmoi's goreleaser Travis CI config: trigger, setup, and code.
  • Travis job that built and pushed the 1.7.5 release to snapcraft (expand line 546 of the log to see details)
  • goreleaser's snapcraft pipeline runs snap push --release=stable concurrently in these lines.
  • chezmoi is slowly migrating from Travis to GitHub Actions with a config in this file but none of this touches goreleaser or any release process.
  • What snapcraft observed: "we have a request to release revision 92 a few microseconds after the request to release 96" is strange behavior because revision 92 isn't even a revision that goreleaser should know about. Revision 92 was a previous release. It's unclear how goreleaser can even know about this. I'll ask.

Apologies for submitting a weird and inconclusive issue.

@twpayne twpayne added the bug label Dec 3, 2019

This comment has been minimized.

Copy link

@caarlos0 caarlos0 commented Dec 3, 2019

Looking at the logs:

         • pushing snap              snap=chezmoi_1.7.5_linux_amd64.snap
         • pushing snap              snap=chezmoi_1.7.5_linux_arm64.snap
         • pushing snap              snap=chezmoi_1.7.5_linux_386.snap

it seems that the right version was deployed.

But, going further, travis starts with an clean clone AFAIK - and therefore with an empty dist folder. GoReleaser do not download old versions of the software being released at any point... You also run the release with --rm-dist, so even if something old was there, it would have been deleted...

I also looked into your previous' release logs to see if maybe it wasn't approved or something, but seems like it was and everything was fine...

I really can't see how goreleaser could have done that... maybe add the debug flag to the release so we can have more info if it happens again?

I'm sorry I'm not being very helpful, but I'm really out of ideas on this one 🙁


This comment has been minimized.

Copy link
Contributor Author

@twpayne twpayne commented Dec 3, 2019

Thanks so much for looking into this Carlos.

Snapcraft have reported back:

We have dig further into our stack and we have found out that we have a race condition when multiple releases are done too quickly to the same channel (even if those are for different architectures).

So, this was not a bug in goreleaser. Thank you again for your time spent investigating.

@twpayne twpayne closed this Dec 3, 2019

This comment has been minimized.

Copy link

@caarlos0 caarlos0 commented Dec 3, 2019

Awesome, glad you folks figured it out!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
2 participants
You can’t perform that action at this time.