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 to faraday 2.0.0 #227

Open
honeyankit opened this issue Apr 20, 2023 · 8 comments · Fixed by honeyankit/azure-storage-ruby#1 · May be fixed by #228
Open

Upgrade to faraday 2.0.0 #227

honeyankit opened this issue Apr 20, 2023 · 8 comments · Fixed by honeyankit/azure-storage-ruby#1 · May be fixed by #228

Comments

@honeyankit
Copy link

honeyankit commented Apr 20, 2023

Hello,

We are using azure-storage-blob with ruby on rails dependabot application in order to create resources in Azure. The version of azure-storage-blob used is 2.0 which depends on azure-storage-common which depends on Faraday version 1.0.0.

azure-storage-blob (2.0.3) --> azure-storage-common (2.0.4) --> Faraday (1.0.0)

This is causing an issue as we are using faraday-retry 2.0.0 which depends on faraday 2.0 and we cannot downgrade to faraday 1.0.0 as it will break of things for us.

Logs from the bundle update command:

Bundler could not find compatible versions for gem "faraday":
  In snapshot (Gemfile.lock):
    faraday (= 2.6.0)

  In Gemfile:
    azure-storage-blob (~> 2.0) was resolved to 2.0.3, which depends on
      azure-storage-common (~> 2.0) was resolved to 2.0.4, which depends on
        faraday (~> 1.0)

    faraday-retry (~> 2.0.0) was resolved to 2.0.0, which depends on
      faraday (~> 2.0)

Running `bundle update` will rebuild your snapshot from scratch, using only
the gems in your Gemfile, which may resolve the conflict.

Could you please review and try to fix this issue? Thanks in advance!

Ankit

@honeyankit honeyankit linked a pull request Apr 20, 2023 that will close this issue
@honeyankit
Copy link
Author

I have created a draft PR (#228) to update the Faraday version to 2.0 for azure-storage-common. If the testing mentioned in the doc is sufficient ?

@honeyankit
Copy link
Author

honeyankit commented Apr 20, 2023

Faraday upgrade docs.

@honeyankit
Copy link
Author

After upgrading the faraday to 2.0, the faraday_middleware is complaining to use faraday 1.0.

$ bundle install
Fetching gem metadata from https://rubygems.org/...........
Resolving dependencies...
Bundler could not find compatible versions for gem "faraday":
  In Gemfile:
    faraday (~> 2.0)

    faraday_middleware (~> 1.0.0.rc1) was resolved to 1.0.0, which depends on
      faraday (~> 1.0)

@honeyankit
Copy link
Author

honeyankit commented Apr 20, 2023

Based on the faraday_middleware docs. It has been deprecated and need to use the middleware in awesome-faraday replaced the ones using in faraday_middleware in this repo.

@honeyankit honeyankit changed the title Dependency problem with faraday 1.0.0 Upgrade to faraday 2.0.0 Apr 20, 2023
@honeyankit
Copy link
Author

PR: #228

@alaarab
Copy link

alaarab commented Apr 28, 2023

@honeyankit Nice PR. This seems to be a big issue for many people. Microsofts own oauth solution is incompatible with this package because it uses Faraday 2 as well. Your PR fixes that. For now I am forking off your solution. Hopefully MS can accept your solution ASAP.

@MarioRuiz
Copy link

What's the state on this? any plan for merging?

@muxcmux
Copy link

muxcmux commented Jun 29, 2023

I've been using my fork for a little less than a year in prod without any issues. It upgrades the dependent gems as well and points the source for those straight to the repo, so if you are not using them in isolation it should work for you too. Hope this helps

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