Repository navigation
Add retries to all API calls - #306
Merged
Merged
Conversation
joshmgross
approved these changes
May 11, 2020
joshmgross
left a comment
Contributor
There was a problem hiding this comment.
Looks good to me. This feels like something that should be done at the http-client level (actions/http-client#4), but I understand why retrying write operations depends on the specific use-cases.
| const response = await httpClient.getJson<ArtifactCacheEntry>( | ||
| getCacheApiUrl(resource) | ||
| const response = await retryTypedResponse("getCacheEntry", () => | ||
| httpClient.getJson<ArtifactCacheEntry>(getCacheApiUrl(resource)) |
Contributor
There was a problem hiding this comment.
The http-client has built-in retries for read operations that we could use for this call and downloadCache. It's on the IRequestOptions and is ignored for write operations.
Contributor
Author
There was a problem hiding this comment.
I'd have to check again, but I think one issue with http-client is that it only retries on certain http status codes. If there's a socket-level error, it wouldn't retry. But as you say, this is certainly something that could be put into http-client.
richardxia
added a commit
to chipsalliance/rocket-chip
that referenced
this pull request
May 16, 2020
Per actions/cache#141 (comment), several of the recent commits have improved reliability: - actions/cache#306 - actions/cache#300 - actions/cache#305
richardxia
added a commit
to chipsalliance/rocket-chip
that referenced
this pull request
May 21, 2020
Per actions/cache#141 (comment), several of the recent commits have improved reliability: - actions/cache#306 - actions/cache#300 - actions/cache#305
richardxia
added a commit
to chipsalliance/rocket-chip
that referenced
this pull request
May 21, 2020
* Use newer actions/cache for improved reliability. Per actions/cache#141 (comment), several of the recent commits have improved reliability: - actions/cache#306 - actions/cache#300 - actions/cache#305 * Use version of actions/cache with fixed arguments for zstd on Ubuntu 16.04.
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
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds one retry to every API call if a retryable http response code is returned (e.g., 503) or an Error is thrown (e.g., socket-level timeout).
Helps with #267