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

Allow fog-core 2.0 #429

Closed
wants to merge 1 commit into from
Closed

Allow fog-core 2.0 #429

wants to merge 1 commit into from

Conversation

jaredbeck
Copy link
Contributor

@jaredbeck jaredbeck commented Jan 30, 2018

The fog-core changelog entry for 2.0 says:

fix association reload drop ruby <2 support fix net-ssh usage add mime-type dependency

The [fog-core changelog](https://github.com/fog/fog-core/blob/master/changelog.md) says: 

> fix association reload drop ruby <2 support fix net-ssh usage add mime-type dependency
@jaredbeck
Copy link
Contributor Author

Test failure:

  undefined method `all_associations_and_attributes' for nil:NilClass (NoMethodError)
        /home/travis/.rvm/gems/ruby-2.0.0-p648/gems/fog-core-2.0.0/lib/fog/core/model.rb:49:in `reload'
        /home/travis/.rvm/gems/ruby-2.0.0-p648/gems/fog-core-2.0.0/lib/fog/core/model.rb:71:in `block in wait_for'
        /home/travis/.rvm/gems/ruby-2.0.0-p648/gems/fog-core-2.0.0/lib/fog/core/wait_for.rb:7:in `block in wait_for'
        /home/travis/.rvm/gems/ruby-2.0.0-p648/gems/fog-core-2.0.0/lib/fog/core/wait_for.rb:6:in `loop'
        /home/travis/.rvm/gems/ruby-2.0.0-p648/gems/fog-core-2.0.0/lib/fog/core/wait_for.rb:6:in `wait_for'
        /home/travis/.rvm/gems/ruby-2.0.0-p648/gems/fog-core-2.0.0/lib/fog/core/model.rb:70:in `wait_for'
        tests/models/compute/address_tests.rb:6:in `block (2 levels) in <top (required)>'
        tests/helpers/model_helper.rb:12:in `block in model_tests'
...

Might have something to do with that "fix association reload" part of the fog-core changelog entry?

@geemus
Copy link
Member

geemus commented Jan 30, 2018

Unfortunately, I forget some of the specifics here. @plribeiro3000 do you perhaps recall enough to help provide guidance here? Thanks!

@plribeiro3000
Copy link
Member

Damm. sorry i'm late here.

I think i lost this notification by email. Will check it now.

@plribeiro3000
Copy link
Member

plribeiro3000 commented Feb 25, 2018

Hmmm. I believe this has nothing to do with fog-core.

Looking at the implementation:

https://github.com/fog/fog-core/blob/ec1a09ee986fd4bd37dbd0b33ae0f260d57e3cf7/lib/fog/core/model.rb#L47-L49

It seems that the object trying to be reloaded do not exist.

Maybe this test is doing a reload on a non existent object? Or maybe we should check if identity is not nil before trying to get it again and reload?

@plribeiro3000
Copy link
Member

Going a little deeper:

This is where it actually calls reload:

And it does not seem as the tests are running against Mock.

fog-aws/tests/helper.rb

Lines 1 to 29 in 61b3dbb

begin
require 'simplecov'
SimpleCov.start
SimpleCov.command_name "Shindo"
rescue LoadError => e
$stderr.puts "not recording test coverage: #{e.inspect}"
end
require File.expand_path('../../lib/fog/aws', __FILE__)
Bundler.require(:test)
Excon.defaults.merge!(:debug_request => true, :debug_response => true)
require File.expand_path(File.join(File.dirname(__FILE__), 'helpers', 'mock_helper'))
# This overrides the default 600 seconds timeout during live test runs
unless Fog.mocking?
Fog.timeout = ENV['FOG_TEST_TIMEOUT'] || 2_000
Fog::Logger.warning "Setting default fog timeout to #{Fog.timeout} seconds"
end
def lorem_file
File.open(File.dirname(__FILE__) + '/lorem.txt', 'r')
end
def array_differences(array_a, array_b)
(array_a - array_b) | (array_b - array_a)
end

@lanej
Copy link
Member

lanej commented Mar 14, 2018

Closing in favor of #433

@lanej lanej closed this Mar 14, 2018
@jaredbeck jaredbeck deleted the patch-1 branch March 14, 2018 23:22
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