Skip to content
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

Support faraday 2.0 & streaming api #32

Merged
merged 8 commits into from
Oct 22, 2022

Conversation

aka-nez
Copy link
Contributor

@aka-nez aka-nez commented Oct 21, 2022

Hi! I tried to update the gem to make it compatible with Faraday 2 and add streaming API support.

Take a look. please @iMacTia

CleanShot 2022-10-21 at 11 35 54@2x

Probably, I should update the CI matrix, too: remove 2.5, add 3.0+

Copy link
Member

@iMacTia iMacTia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @aka-nez 🙌!

Agree about the CI matrix, please make it cover 2.6 -> 3.1 like we do in Faraday.

Out of curiosity, could you explain why you needed to explicitly add the faraday/multipart middleware? What kind of errors were you seeing otherwise?

@aka-nez
Copy link
Contributor Author

aka-nez commented Oct 21, 2022

Out of curiosity, could you explain why you needed to explicitly add the faraday/multipart middleware? What kind of errors were you seeing otherwise?

spec/faraday/http/adapter_spec.rb:26 uses this middleware, that was bundled with Faraday before

I tried removing this middleware - all specs passed. I will remove this lines with next commit

@iMacTia
Copy link
Member

iMacTia commented Oct 21, 2022

Thanks for clarifying!
I saw you added it to the Gemfile and spec_helper, so there should be no impact on users of this gem 👍

@aka-nez
Copy link
Contributor Author

aka-nez commented Oct 21, 2022

I have updated the CI matrix and entirely removed everything related to multipart. It doesn't impact tests

@olleolleolle
Copy link
Member

(I did some cleaning out of earlier Required Build Checks, which included now-removed ones.)

@olleolleolle
Copy link
Member

olleolleolle commented Oct 21, 2022

Ah, I noted this in the failure in CI:

Gems in the groups 'development' and 'test' were not installed.

Perhaps some --deployment flag is enabled>

Edit:

BUNDLE_WITHOUT: "development:test"

We can probably drop this, since the bundler-cache make it quick anyway.

@aka-nez
Copy link
Contributor Author

aka-nez commented Oct 21, 2022

Removed this line from ci

faraday-http.gemspec Outdated Show resolved Hide resolved
@olleolleolle
Copy link
Member

@iMacTia Are we ready to go, here?

Copy link
Member

@iMacTia iMacTia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, faraday ~> 2.0 is incorrect, we should pin to faraday ~> 2.5 as older versions don't have the new streaming API. Tests are passing because bundler installs the latest version, which works fine.

@aka-nez
Copy link
Contributor Author

aka-nez commented Oct 21, 2022

Actually, faraday ~> 2.0 is incorrect, we should pin to faraday ~> 2.5 as older versions don't have the new streaming API. Tests are passing because bundler installs the latest version, which works fine.

Sure. Fixed! 👍

@iMacTia iMacTia merged commit a8941f3 into lostisland:master Oct 22, 2022
@iMacTia
Copy link
Member

iMacTia commented Oct 22, 2022

Thank you so much @aka-nez, I'm gonna drop a release soon 🙌 !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants