FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Add some release asset upload retrying. by chrisgavin · Pull Request #74 · github/codeql-action-sync-tool · GitHub

Add some release asset upload retrying. - #74

Merged
chrisgavin merged 2 commits into
mainfrom
upload-retrying
Jun 14, 2022
Merged

Add some release asset upload retrying.#74
chrisgavin merged 2 commits into
mainfrom
upload-retrying

Conversation

chrisgavin commented May 30, 2022
edited
Loading

Copy link
Copy Markdown
Contributor

This hopefully improves the success rate of uploading to the integration test instance.

We retry on 5xx errors, and handle already_exists errors explicitly. The reason for handling `already_exists is that it seems like sometimes the "failed upload" from a 5xx error will actually finish successfully in the background so if we retry again we'll get a 422 due to uploading a duplicate asset.

chrisgavin force-pushed the upload-retrying branch 11 times, most recently from 127bc30 to 38c5894 Compare May 31, 2022 10:06
chrisgavin marked this pull request as ready for review June 14, 2022 13:46
Comment thread internal/push/push.go Outdated
if err != nil {
return errors.Wrap(err, "Error opening release asset.")
}
defer assetFile.Close()

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

I think defering inside a for loop might cause a resource leak here? If so, you might have to move this block into a function.

simon-engledew left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Looks good, although I've not tested it out. 🙏

chrisgavin merged commit 0de4ed4 into main Jun 14, 2022
chrisgavin deleted the upload-retrying branch June 14, 2022 14:42
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants


Back | FazBrowse Home | New Git URL