You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In our test environment for ChefDK packages, we intermittently see errors like:
/opt/chefdk/embedded/lib/ruby/site_ruby/2.1.0/rubygems/specification.rb:762:in `block in _resort!': undefined method `name' for nil:NilClass (NoMethodError)
from /opt/chefdk/embedded/lib/ruby/site_ruby/2.1.0/rubygems/specification.rb:761:in `sort!'
from /opt/chefdk/embedded/lib/ruby/site_ruby/2.1.0/rubygems/specification.rb:761:in `_resort!'
from /opt/chefdk/embedded/lib/ruby/site_ruby/2.1.0/rubygems/specification.rb:713:in `_all'
from /opt/chefdk/embedded/lib/ruby/site_ruby/2.1.0/rubygems/specification.rb:896:in `each'
from /opt/chefdk/embedded/lib/ruby/site_ruby/2.1.0/rubygems/dependency.rb:300:in `find_all'
from /opt/chefdk/embedded/lib/ruby/site_ruby/2.1.0/rubygems/dependency.rb:300:in `to_specs'
from /opt/chefdk/embedded/lib/ruby/site_ruby/2.1.0/rubygems/dependency.rb:324:in `to_spec'
from /opt/chefdk/embedded/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_gem.rb:58:in `gem'
from /opt/chefdk/embedded/lib/ruby/site_ruby/2.1.0/rubygems.rb:595:in `load_yaml'
from /opt/chefdk/embedded/lib/ruby/site_ruby/2.1.0/rubygems/config_file.rb:328:in `load_file'
from /opt/chefdk/embedded/lib/ruby/site_ruby/2.1.0/rubygems/config_file.rb:197:in `initialize'
from /opt/chefdk/embedded/lib/ruby/site_ruby/2.1.0/rubygems.rb:291:in `new'
from /opt/chefdk/embedded/lib/ruby/site_ruby/2.1.0/rubygems.rb:291:in `configuration'
from /opt/chefdk/embedded/apps/chef/lib/chef/provider/package/rubygems.rb:48:in `<class:GemEnvironment>'
This error is triggered when we call Gem.configuration at load time in our code. I am unable to consistently reproduce this error, so I am not able to say currently what causes it. However, I noticed there are several cases where Gem::Specification.load can return nil, which seems to be part of the problem. I understand the behavior cannot be changed, but if possible I would like this case to issue a warning, which would assist me in debugging the above issue.
I am currently attempting to reproduce the issue using a patched rubygems with the following warnings added:
There is a bug in the ChefDK release installed on the build nodes that
causes an exception when running the unit tests. Reference:
- chef-boneyard/chef-dk#411
- rubygems/rubygems#1287
We think we can run unit phase again after ChefDK 0.7.0 (final
release) is installed on the build nodes.
@danielsdeleo were you ever able to reproduce this bug?
It looks like the current versions of rubygems do warn if Gem::Specification.load is ever going to return nil. So I'm closing for now unless this can be reproduced.
In our test environment for ChefDK packages, we intermittently see errors like:
This error is triggered when we call
Gem.configuration
at load time in our code. I am unable to consistently reproduce this error, so I am not able to say currently what causes it. However, I noticed there are several cases whereGem::Specification.load
can return nil, which seems to be part of the problem. I understand the behavior cannot be changed, but if possible I would like this case to issue a warning, which would assist me in debugging the above issue.I am currently attempting to reproduce the issue using a patched rubygems with the following warnings added:
danielsdeleo@039890d
Is this something that would be acceptable? Or is there valid usage of
Gem::Specification.load
that should returnnil
?The text was updated successfully, but these errors were encountered: