Command attempted:
hub release create -a unraid-node-api-v2.15.2-alpha.1.tgz v2.15.2-rolling-20201110225807
What happened:
{"message":"Validation Failed","request_id":"EFAF:6883:17029:19EC7:5FAB2559","documentation_url":"https://docs.github.com/rest","errors":[{"resource":"ReleaseAsset","code":"already_exists","field":"name"}]}
More info:
This is happening on our Github runner and now myself locally. This was also tested with a clean repo as shown in the following logs.
➜ testing_github_actions git:(master) ✗ HUB_VERBOSE=1 hub release create -a unraid-node-api-v2.15.2-alpha.1.tgz v2.15.2-rolling-20201110225807
$ git rev-parse -q --git-dir
$ git remote -v
$ git config --get-all hub.host
$ git var GIT_EDITOR
$ git config core.commentchar
$ nano /Users/xo/code/OmgImAlexis/testing_github_actions/.git/RELEASE_EDITMSG
> POST https://api.github.com/repos/OmgImAlexis/testing_github_actions/releases
> Authorization: token [REDACTED]
> Accept: application/vnd.github.v3+json;charset=utf-8
{"name":"test","tag_name":"v2.15.2-rolling-20201110225807","target_commitish":"","body":"","draft":false,"prerelease":false,"assets":null,"tarball_url":"","zipball_url":"","html_url":"","upload_url":"","url":"","created_at":"0001-01-01T00:00:00Z","published_at":"0001-01-01T00:00:00Z"}
< HTTP 201
< X-Oauth-Scopes: repo, gist
< X-Accepted-Oauth-Scopes: repo
< Location: https://api.github.com/repos/OmgImAlexis/testing_github_actions/releases/33760129
{"url":"https://api.github.com/repos/OmgImAlexis/testing_github_actions/releases/33760129","assets_url":"https://api.github.com/repos/OmgImAlexis/testing_github_actions/releases/33760129/assets","upload_url":"https://uploads.github.com/repos/OmgImAlexis/testing_github_actions/releases/33760129/assets{?name,label}","html_url":"https://github.com/OmgImAlexis/testing_github_actions/releases/tag/v2.15.2-rolling-20201110225807","id":33760129,"node_id":"MDc6UmVsZWFzZTMzNzYwMTI5","tag_name":"v2.15.2-rolling-20201110225807","target_commitish":"master","name":"test","draft":false,"author":{"login":"OmgImAlexis","id":6525926,"node_id":"MDQ6VXNlcjY1MjU5MjY=","avatar_url":"https://avatars2.githubusercontent.com/u/6525926?v=4","gravatar_id":"","url":"https://api.github.com/users/OmgImAlexis","html_url":"https://github.com/OmgImAlexis","followers_url":"https://api.github.com/users/OmgImAlexis/followers","following_url":"https://api.github.com/users/OmgImAlexis/following{/other_user}","gists_url":"https://api.github.com/users/OmgImAlexis/gists{/gist_id}","starred_url":"https://api.github.com/users/OmgImAlexis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OmgImAlexis/subscriptions","organizations_url":"https://api.github.com/users/OmgImAlexis/orgs","repos_url":"https://api.github.com/users/OmgImAlexis/repos","events_url":"https://api.github.com/users/OmgImAlexis/events{/privacy}","received_events_url":"https://api.github.com/users/OmgImAlexis/received_events","type":"User","site_admin":false},"prerelease":false,"created_at":"2020-11-10T23:39:56Z","published_at":"2020-11-10T23:42:01Z","assets":[],"tarball_url":"https://api.github.com/repos/OmgImAlexis/testing_github_actions/tarball/v2.15.2-rolling-20201110225807","zipball_url":"https://api.github.com/repos/OmgImAlexis/testing_github_actions/zipball/v2.15.2-rolling-20201110225807","body":""}
Attaching 1 asset...
> POST https://uploads.github.com/repos/OmgImAlexis/testing_github_actions/releases/33760129/assets?name=unraid-node-api-v2.15.2-alpha.1.tgz
> Authorization: token [REDACTED]
> Accept: application/vnd.github.v3+json;charset=utf-8
< HTTP 502
{"message":"Error uploading to https://github-production-release-asset-2e65be.s3.amazonaws.com: 403","request_id":"EFAF:6883:1701D:19EBA:5FAB254A"}
> POST https://uploads.github.com/repos/OmgImAlexis/testing_github_actions/releases/33760129/assets?name=unraid-node-api-v2.15.2-alpha.1.tgz
> Authorization: token [REDACTED]
> Accept: application/vnd.github.v3+json;charset=utf-8
< HTTP 422
< X-Oauth-Scopes: repo, gist
< X-Accepted-Oauth-Scopes: repo
{"message":"Validation Failed","request_id":"EFAF:6883:17029:19EC7:5FAB2559","documentation_url":"https://docs.github.com/rest","errors":[{"resource":"ReleaseAsset","code":"already_exists","field":"name"}]}
The release was created, but attaching 1 asset failed. You can retry with:
hub release edit v2.15.2-rolling-20201110225807 -m '' -a unraid-node-api-v2.15.2-alpha.1.tgz
Error uploading release asset: Unprocessable Entity (HTTP 422)
Duplicate value for "name"
I can edit and create releases fine. The only time I get an issue with a clean or existing repo is when trying to also attach a file.
We’re experiencing this issue as well. It broke our CI + TestFlight build pipeline.
So I just deleted the releases that were broken and re-ran our build process. Everything is now magically working.
@ydnar any chance you could give that a go?
Same here. It worked after I deleted dupe releases.
Randy
On Nov 10, 2020, at 4:58 PM, Alexis Tyler notifications@github.com wrote:

So I just deleted the releases that were broken and re-ran our build process. Everything is now magically working.@ydnar any chance you could give that a go?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.
@OmgImAlexis @ydnar Thank you for reporting. It looks like this was due to some upstream network issue when uploading to S3. I'm sorry for the trouble. Is there something that needs fixing in hub, or can we close this?
I'm not sure if it's a change in hub or the API itself. I noticed even if I try the edit command it suggests it still failed until I deleted the broken release.
I also couldn't see a way to replace/delete a release asset.
@OmgImAlexis The error message suggested this:
The release was created, but attaching 1 asset failed. You can retry with:
hub release edit v2.15.2-rolling-20201110225807 -m '' -a unraid-node-api-v2.15.2-alpha.1.tgz
Did you try that command? Usually, retrying uploading a corrupt asset should first delete an existing asset of the same name, which should alleviate the need of recreating an entire Release from scratch.
If you retried that command, what was the exact error?
None of the commands work once it's corrupted. The only option is to delete the whole release otherwise all I got back was the same error.
@OmgImAlexis That sounds serious. Thank you for the information so far!
I wonder how hub can try to detect and remove the corrupted upload without having to delete and recreate an entire Release record. To make things more difficult to test, I'm not sure how to reproduce this, short of randomly getting a failed response from S3.
If anyone who was come across this can capture what is the state of API responses for release assets of a "corrupted" release, please add to the thread! 🙇
@mislav since this is all GitHub related I’d be okay with giving you logs from one of our GitHub actions that ran this. Any chance that’d help?
@OmgImAlexis For sure; that would help! You can email it to [email protected] 🙇