Skip to content
This repository has been archived by the owner on Sep 19, 2021. It is now read-only.

improve git-related error handling #118

Closed
justinmk opened this issue Jul 16, 2017 · 4 comments
Closed

improve git-related error handling #118

justinmk opened this issue Jul 16, 2017 · 4 comments

Comments

@justinmk
Copy link
Member

(migrated from #12)

When git push fails, currently we keep retrying many times. Should not do that when GH_TOKEN is invalid, and possibly other errors where retrying is just a waste of time.

@justinmk justinmk changed the title scripts: Improve git-related error handling improve git-related error handling Jul 16, 2017
@acferreir4
Copy link

@justinmk Would it suffice to just remove the while/retry loop or should it be replaced with another mechanism for handling an invalid gh_token?

@justinmk
Copy link
Member Author

@acferreir4 Not sure how often requests fail, but if it's more than zero then removing the retry loop will cause failed jobs.

GitHub API doc says it will return 404 in that case. So we only need to break out of the loop if 404 is returned.

Probably this can be done in _check_gh_error. https://github.com/neovim/bot-ci/blob/master/ci/common/github-api.sh

@do-you-dare
Copy link

Hello! I'd like to tackle this issue; seems to be a nice start here.

Is the idea breaking from this while if the GH_TOKEN is invalid?

Thanks in advance!

@justinmk
Copy link
Member Author

justinmk commented Aug 8, 2018

@dread-uo Thanks for the interest in helping! It looks like here it's already done:

if ! has_gh_token ; then

This hasn't been a problem in practice, so let's just close this issue.

@justinmk justinmk closed this as completed Aug 8, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants