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

Checksum upload to github broken with new archive spec #1123

Closed
issmirnov opened this issue Aug 24, 2019 · 7 comments
Closed

Checksum upload to github broken with new archive spec #1123

issmirnov opened this issue Aug 24, 2019 · 7 comments
Labels
bug Something isn't working

Comments

@issmirnov
Copy link

Describe the bug
After following the notice at https://goreleaser.com/deprecations/#archive, uploading releases to Github fails due to an empty checksum file.

To Reproduce

  1. Clone any repo (I used https://github.com/issmirnov/zap).
  2. Update archive format to follow the new spec.
  3. Try to perform a release (see my travis conf)

Expected behavior
Releases work as normal.

What actually happens

The project checksum file is created, but has empty contents. As a result, the github release fails with error code:

creating or updating release repo=issmirnov/zap tag=v1.2.0
         • release updated           url=https://github.com/issmirnov/zap/releases/tag/v1.2.0
         • uploading to release      file=dist/zap_1.2.0_checksums.txt name=zap_1.2.0_checksums.txt
release failed after 55.04s error=GitHub/GitLab Releases: failed to publish artifacts: failed to upload zap_1.2.0_checksums.txt after 10 retries: POST https://uploads.github.com/repos/issmirnov/zap/releases/19514345/assets?name=zap_1.2.0_checksums.txt: 400 Bad Content-Length:  []

Environment (please complete the following information):

  • OS: MacOS Mojave, and Ubuntu 18.04, as well as Travis
  • GoReleaser Version: 0.116.0

Additional context

@issmirnov issmirnov added the bug Something isn't working label Aug 24, 2019
@mavogel
Copy link
Member

mavogel commented Aug 29, 2019

Hi @issmirnov,
does this error also happen when you run the releasing locally? AFAICS in your commit, you removed the following section

checksum:	archives:
  name_template: '{{ .ProjectName }}_checksums.txt'

so it should assume the default "{{ .ProjectName }}_{{ .Version }}_checksums.txt" and I cannot reproduce it being empty.

Would you mind running the script with the debug flag as follows
curl -sL https://git.io/goreleaser | bash -s -- --debug to get more information.

@stale
Copy link

stale bot commented Sep 12, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix This will not be worked on label Sep 12, 2019
@caarlos0
Copy link
Member

do not stale

@stale stale bot removed the wontfix This will not be worked on label Sep 12, 2019
@mavogel
Copy link
Member

mavogel commented Sep 14, 2019

ping @issmirnov

issmirnov added a commit to issmirnov/zap that referenced this issue Sep 15, 2019
@issmirnov
Copy link
Author

Apologies for delay, was behind on email.

Well. This is odd. I ran the full command as provided above, and of course it works. I was all excited to get you guys some logs and dive into this, but it ran flawlessly this time around. I'm guessing it's probably either a stale version on my end, or some other PEBCAK error. I'll update my mainline repo and see if I can generate a release with travis, then close this out.

@issmirnov
Copy link
Author

issmirnov commented Sep 15, 2019

Neat! This is great. Looks like it works completely fine. I have no idea what I did wrong last time, but I'm fairly certain it was an error on my part. Thanks for following up on this!

https://travis-ci.org/issmirnov/zap/jobs/585340174

image

@github-actions
Copy link
Contributor

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 18, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants