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

upgrade faraday from 1.0 to 2.0 #122

Merged
merged 2 commits into from
Mar 29, 2024
Merged

upgrade faraday from 1.0 to 2.0 #122

merged 2 commits into from
Mar 29, 2024

Conversation

kbrock
Copy link
Member

@kbrock kbrock commented Mar 22, 2024

faraday 2.0 uses different middleware.
Upgraded to use follow_redirects.

faraday 2.0 has been split up to use many http client libraries Using net-http, so this avoids requiring a dozen adapter gems


I would like to test this with tasks to ensure it all still works

Faraday 2.0 only supports ruby 3.0 and higher. had to drop testing (and supporting) ruby 2.7

Copy link
Member

@Fryguy Fryguy left a comment

Choose a reason for hiding this comment

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

LGTM - you said you still want to do more testing or is this ready to go?

@Fryguy Fryguy self-assigned this Mar 25, 2024
kbrock added 2 commits March 25, 2024 18:24
faraday 2.0 uses different middleware.
Upgraded to use follow_redirects.

faraday 2.0 has been split up to use many http client libraries
Using net-http, so this avoids requiring a dozen adapter gems
@kbrock
Copy link
Member Author

kbrock commented Mar 29, 2024

@Fryguy I'm good with this now

@Fryguy Fryguy merged commit 0b53037 into ManageIQ:master Mar 29, 2024
7 checks passed
@Fryguy
Copy link
Member

Fryguy commented Mar 29, 2024

@kbrock damn - I just merged this but it does have me concerned now. I recently was using a different gem that had faraday locked to 2.x, and it caused mismatches. I checked ManageIQ core, and this will break core if we release it.

In our case, manageiq core includes manageiq-api-client [ref]. However, other gems include faraday locked to <2.0:

  • ms_rest [ref]
  • ms_rest_azure [ref]
  • prometheus-alert-buffer-client [ref]
  • promeheus-api-client [ref]
  • xclarity_client [ref]
  • ansible_tower_client [ref], which doesn't specify version, but includes faraday_middleware, so it kind of assumes 1.x in its code.

A number of other gems are <3.0 which are probably fine such as google-cloud-env, google-cloud-auth, and signet.

I think the best way forward is to somehow support both 1.x and 2.x in the same way that the google-cloud-env, google-cloud-auth, and signet gems some how do.

@kbrock kbrock deleted the faraday-2.0 branch March 29, 2024 21:08
@Fryguy
Copy link
Member

Fryguy commented Mar 29, 2024

@kbrock fixed my concerns in #124

jrafanie added a commit that referenced this pull request May 13, 2024
- Support faraday 1.0 and 2.0 [[#124]](#124)
- Upgrade faraday from 1.0 to 2.0 [[#122]](#122)
- Revert "drop activesupport dependency" [[#119]](#119)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants