-
Notifications
You must be signed in to change notification settings - Fork 137
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CI: Use same Ruby version matrix as Ruby, repair for Faraday 1.0 #228
base: master
Are you sure you want to change the base?
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I work on the same team as @olleolleolle and he asked me to have a look :)
@@ -12,11 +12,11 @@ def initialize(app, options = nil) | |||
super(app, options) | |||
|
|||
# NOTE: Faraday 0.9.1 by default does not retry on POST requests | |||
@options.methods << :post | |||
@options.methods = @options.methods + [:post] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor: Could use +=
but it's not objectively better or anything :)
@@ -33,8 +33,10 @@ def call(env) | |||
log(env, exception) | |||
retries -= 1 | |||
retries_header(env, retries) | |||
sleep sleep_amount(retries + 1) | |||
retry | |||
if (sleep_amount = calculate_sleep_amount(retries + 1, env)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where is calculate_sleep_amount
defined? Don't see it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's in the Faraday codebase.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps it's better to do a full replace of the retry middleware - than to patch this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, of course.
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