-
-
Notifications
You must be signed in to change notification settings - Fork 84
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
Update dependency versions inside gemspec #413
base: master
Are you sure you want to change the base?
Conversation
LGTM |
@maham-nazir-confiz Could you please review this change? |
Any updates on this? @maham-nazir-confiz |
ACK from me. |
@ShimShtein I'm on it. Sorry for the delay. |
LGTM. |
@maham-nazir-confiz can you please update about the status of this PR? It's critical for https://github.com/theforeman/foreman_azure_rm, since Foreman project moves to |
Hi, Regards |
@maham-nazir-confiz, first thanks for responding to this. The response is much appreciated. |
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.
From looking at other dependencies, fog-core
was the only one that is not backwards compatible.
@maham-nazir-confiz, what do you say about this?
fog-azure-rm.gemspec
Outdated
@@ -22,8 +22,8 @@ Gem::Specification.new do |spec| | |||
spec.add_development_dependency 'minitest', '~> 5.8.4' | |||
spec.add_development_dependency 'simplecov' | |||
spec.add_development_dependency 'codeclimate-test-reporter' , '~> 1.0.0' | |||
spec.add_dependency 'fog-core', '~> 1.43' | |||
spec.add_dependency 'fog-json', '~> 1.0.2' | |||
spec.add_dependency 'fog-core', '~> 2.1.0' |
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.
Let's try and make it backwards compatible - I suggest removing version restriction.
spec.add_dependency 'fog-core', '~> 2.1.0' | |
spec.add_dependency 'fog-core' |
@maham-nazir-confiz As suggested by @ShimShtein , I have tested the above changes. In addition to those, I assume we can also remove version restriction on |
b88ca9a
to
5f49643
Compare
@@ -32,7 +32,7 @@ Gem::Specification.new do |spec| | |||
spec.add_dependency 'azure_mgmt_traffic_manager', '~> 0.9.0' | |||
spec.add_dependency 'azure_mgmt_sql', '~> 0.9.0' | |||
spec.add_dependency 'azure_mgmt_key_vault', '~> 0.9.0' | |||
spec.add_dependency 'azure-storage', '= 0.11.5.preview' | |||
spec.add_dependency 'azure-storage', '~> 0.11.preview' |
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.
Can we use the latest version 0.15.0.preview
here?
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.
@bguban, ~> 0.11.preview
will take 0.15.0.preview
too.
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.
~> 0.11.preview
means >= 0.11
including preview and < 1.0
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.
Can you explain how it will take 0.15.0.preview as well? When I install the gem with these dependencies, it just shows as 0.11.preivew
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.
According to thoughtbot (specifically the second part - ~> 1.1 example) this will result with >= 0.11
and < 1.0
as I have mentioned before. According to rubygems pattern guide
Using ~> with prerelease versions will restrict you to prerelease versions only.
Which should be good, since Azure only releases .preview
versions to rubygems
We already tested it, and 0.15.preview
was pulled.
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.
@maham-nazir-confiz, @ShimShtein maybe as possible solution is just to increment the major version of the
fog-azure-rm
and use the latest versions of dependent gems in it. If somebody needs backward compatibility they would use the current version, who don't need it could use the newer version of the gem.
I agree, upgrading to later gem versions would resolve much of these issues.
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.
@bguban This can be a possible solution.
@maham-nazir-confiz your thoughts on @bguban 's comment?
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.
@maham-nazir-confiz, Actually it depends on the user to limit nokogiri
version. I mean the user can limit nokogiri
version in his own Gemspec file like this:
gem 'fog-azure-rm' # require our library
gem 'nokogiri', '<=1.9.1' # if the user wants ruby 2.0 compatibility
azure-storage
does not require newer 'nokogiri', it sets only lower limit requirement. It's up to user to set up higher limit, if the user needs it.
Other option would be adding an if
condition into fog-azure-rm.gemspec
, but I am not sure it will be parsed well by rubygems
.
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.
@ShimShtein That's right, users can set the upper limit of nokogiri, if required, in their own gemspec.
@maham-nazir-confiz What do you think?
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.
@maham-nazir-confiz Could you please let us know if the approach suggested against nokogiri failure works for you?
ACK from me, it's also backwards compatible. |
spec.add_dependency 'fog-core', '~> 1.43' | ||
spec.add_dependency 'fog-json', '~> 1.0.2' | ||
spec.add_dependency 'fog-core' | ||
spec.add_dependency 'fog-json' |
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.
@maham-nazir-confiz I have removed the version dependency here. Could you please take a look?
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'll get back to you after reviewing the changes.
Regards
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.
@maham-nazir-confiz Any updates on this?
@apuntamb Regards |
@maham-nazir-confiz |
@maham-nazir-confiz, any news about this PR? |
@bguban Regards |
@maham-nazir-confiz Are you still working on this? I'd love to get fog-azure-rm working with fog-core v2.x. Do you want others to take over maintenance of this project? |
Any updates on this? |
For those of you interested, I forked this gem and made numerous fixes: https://gitlab.com/gitlab-org/gitlab-fog-azure-rm |
@stanhu Hi Stan, thank you for taking initiative in this topic and maintaining this fork. As you may have noticed the azure Ruby SDK is in the process of being retired (except for the storage gems): https://github.com/Azure/azure-sdk-for-ruby#important-announcement This includes the Cheers! |
@sebnjk I can't promise anything, but I'd imagine we'll have to support the gem for a while since GitLab has customers that rely on that gem. I personally would like to migrate away from CarrierWave and Fog in favor of a solution that focuses on object storage and uses the SDKs directly as much as possible, which fog-aws does not. https://github.com/google/go-cloud is a good model in Go; I'd like to see something like that in Ruby. Note that the fork only supports file transfers; I stripped all the other cloud-related functionality. |
This PR updates the versions of following dependencies which are needed by foreman_azure_rm has started to point to the latest fog-azure-rm (0.4.9).
Foreman compute resources are in process to be bumped to refer to
fog-2.x
andfog-core 2.x
and the versions currently being used for the selected dependencies in this PR, show certain conflicts with other gems in terms of version requirements. Preferred fog-core version for fog-azure-rm in this case is >=2.x. For the other three dependenciesfog-json, azure-storage, mime-types
, newer versions satisfy the version specifications too.