CI: Use same Ruby version matrix as Ruby, repair for Faraday 1.0#228
Draft
olleolleolle wants to merge 4 commits intoadelevie:masterfrom
Draft
CI: Use same Ruby version matrix as Ruby, repair for Faraday 1.0#228olleolleolle wants to merge 4 commits intoadelevie:masterfrom
olleolleolle wants to merge 4 commits intoadelevie:masterfrom
Conversation
The Ruby support schedule currently contains 2.5-2.7. https://www.ruby-lang.org/en/downloads/branches/
- BetterRetry has a frozen array, workaround for that
henrik
reviewed
Apr 27, 2020
Contributor
henrik
left a comment
There was a problem hiding this comment.
I work on the same team as @olleolleolle and he asked me to have a look :)
|
|
||
| # NOTE: Faraday 0.9.1 by default does not retry on POST requests | ||
| @options.methods << :post | ||
| @options.methods = @options.methods + [:post] |
Contributor
There was a problem hiding this comment.
Minor: Could use += but it's not objectively better or anything :)
| retries_header(env, retries) | ||
| sleep sleep_amount(retries + 1) | ||
| retry | ||
| if (sleep_amount = calculate_sleep_amount(retries + 1, env)) |
Contributor
There was a problem hiding this comment.
Where is calculate_sleep_amount defined? Don't see it.
Contributor
Author
There was a problem hiding this comment.
It's in the Faraday codebase.
Contributor
Author
There was a problem hiding this comment.
Perhaps it's better to do a full replace of the retry middleware - than to patch this.
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.
This PR wants to use latest released Faraday.
⚠️ This is a work in progress. Some bits remain. Will update this Description when finalized.
Background
CI changes
This PR adds new Ruby versions and removes old ones.
The Ruby support schedule currently contains 2.5-2.7. https://www.ruby-lang.org/en/downloads/branches/ - and, people who are using this gem to communicate with Parse probably run those supported Ruby versions.
This PR also removes the no-longer-used Travis setting
sudo: false. See more at the Travis blog.Faraday middleware change
The Retry middleware changed enough upstream in 1.0 that the local overrides here make it troublesome.
Details