craft
craft copied to clipboard
Improve GitHub asset upload retry algorithm
Seen a few times now that we can get an intermittent asset upload failure from GitHub. Do we have a retry already for that? How about it?
@rhcarvalho @iker-barriocanal Do you recall the retry conversation we had earlier? Was it around GitHub asset uploads?
We try up to 3 times: https://github.com/getsentry/craft/blob/03fda08404939fb2a88c5059e1e5634689ea1cf1/src/targets/github.ts#L389
We can probably increase it and also add some delay?
@chadwhitacre it was about asset downloads.
Looking at the code at https://github.com/getsentry/craft/blob/03fda08404939fb2a88c5059e1e5634689ea1cf1/src/targets/github.ts#L394-L396, I am not sure if the retry logic is working as expected. @chadwhitacre's https://github.com/getsentry/publish/runs/4540082749?check_suite_focus=true#step:8:169 did have 3x 500 requests to the failed asset, but I don't see a "Reached maximum retries..." error.

We need https://github.com/getsentry/publish/issues/665 to get better stack traces :)
+1 to potentially a few more retries and exponential backoff.