Azure / azure-sdk-for-ruby

Ruby SDK for Azure Resource Manager: build and manage your Azure cloud infrastructure (Compute, Virtual Networks, Storage, etc...) using Ruby.
MIT License
275 stars 246 forks source link

Regression v0.21.0 - unable to require azure_mgmt_compute on v0.21.0 #2818

Closed agrare closed 3 years ago

agrare commented 3 years ago

After upgrading to azure_mgmt_compute-0.21.0 I am unable to require the gem:

$ irb
>> require 'azure_mgmt_compute'
Traceback (most recent call last):
       11: from /usr/bin/irb:23:in `<main>'
       10: from /usr/bin/irb:23:in `load'
        9: from /usr/lib/ruby/gems/2.7.0/gems/irb-1.2.6/exe/irb:11:in `<top (required)>'
        8: from (irb):1
        7: from /usr/lib/ruby/vendor_ruby/rubygems/core_ext/kernel_require.rb:149:in `require'
        6: from /usr/lib/ruby/vendor_ruby/rubygems/core_ext/kernel_require.rb:160:in `rescue in require'
        5: from /usr/lib/ruby/vendor_ruby/rubygems/core_ext/kernel_require.rb:160:in `require'
        4: from /home/grare/adam/.gem/gems/azure_mgmt_compute-0.21.0/lib/azure_mgmt_compute.rb:24:in `<top (required)>'
        3: from /usr/lib/ruby/vendor_ruby/rubygems/core_ext/kernel_require.rb:149:in `require'
        2: from /usr/lib/ruby/vendor_ruby/rubygems/core_ext/kernel_require.rb:160:in `rescue in require'
        1: from /usr/lib/ruby/vendor_ruby/rubygems/core_ext/kernel_require.rb:160:in `require'
LoadError (cannot load such file -- profiles/latest/compute_latest_profile_client)

On azure_mgmt_compute-0.20.0 I can require it without issue:

$ irb
>> require 'azure_mgmt_compute'
=> true
agrare commented 3 years ago

It looks like https://github.com/Azure/azure-sdk-for-ruby/pull/2817/files#diff-711fd5a469190d37056d75e04f80bf709efa899b0fab9cdce3209b3c4228d204 moved this file to a different gem?

Actually it looks like that PR is failing on exactly this issue: https://travis-ci.org/github/Azure/azure-sdk-for-ruby/jobs/757214156#L14080-L14085

agrare commented 3 years ago

Appears to have been introduced by https://github.com/Azure/azure-sdk-for-ruby/pull/2817 Not sure how the gem got released while the PR is red but that's more of a process question not a code question

agrare commented 3 years ago

Can confirm this fixes the issue. You might want to consider yanking the broken versions from rubygems so people don't inadvertently use it like we did.

kairu-ms commented 3 years ago

Can confirm this fixes the issue. You might want to consider yanking the broken versions from rubygems so people don't inadvertently use it like we did.

Thanks so much for your instruction. I've already yanked the broken versions.

agrare commented 3 years ago

No problem! Thanks for the fix