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

Add puppet-blacksmith puppet_spec_helper gems/rake tasks #472

Merged
merged 1 commit into from
Nov 13, 2017

Conversation

mcdonaldseanp
Copy link
Contributor

This commit updates the Gemfile to include puppet-blacksmith and updates the
Rakefile to include requiring the rake tasks for both puppet_spec_helper and
puppet-blacksmith.

This will allow use of rake tasks from both projects useful in testing and
publishing this module

@mcdonaldseanp
Copy link
Contributor Author

mcdonaldseanp commented Oct 17, 2017

Hi there!

I will introduce myself in this PR, I work for Puppet :)

Right now we are working on improving the pipelines we use to test/build the Cisco module, and this commit would be of particular help.

If you have any questions, let me know.

@mikewiebe
Copy link
Contributor

@mcdonaldseanp Thanks for the submission! Just returned from being out of the office last week so I will take a look and let you know if I have any questions.

@mikewiebe
Copy link
Contributor

@mcdonaldseanp Finally got some time to run your changes in our CI environment. We use beaker to validate our modules but the following error happens with your changes but not without them.

2017-11-01T14:27:16: %LIB-INFO: beaker --host ~/beaker_host_configs/beaker_host_n9k-109.cisco.com.cfg --tests ./cisco_interface/test_interface_L2.rb --no-color --log-level trace
2017-11-01T14:27:17: %LIB-INFO: Exit Call Status Check failed - lastCmdStatus(1) - /usr/local/rvm/gems/ruby-2.2.1/gems/bundler-1.14.3/lib/bundler/rubygems_ext.rb:45:in `full_gem_path': uninitialized constant Bundler::Plugin::API::Source (NameError)
2017-11-01T14:27:17: %LIB-INFO: 	from /usr/local/rvm/rubies/ruby-2.2.1/lib/ruby/site_ruby/2.2.0/rubygems/basic_specification.rb:144:in `block in full_require_paths'
2017-11-01T14:27:17: %LIB-INFO: 	from /usr/local/rvm/rubies/ruby-2.2.1/lib/ruby/site_ruby/2.2.0/rubygems/basic_specification.rb:143:in `map'
2017-11-01T14:27:17: %LIB-INFO: 	from /usr/local/rvm/rubies/ruby-2.2.1/lib/ruby/site_ruby/2.2.0/rubygems/basic_specification.rb:143:in `full_require_paths'
2017-11-01T14:27:17: %LIB-INFO: 	from /usr/local/rvm/rubies/ruby-2.2.1/lib/ruby/site_ruby/2.2.0/rubygems/basic_specification.rb:76:in `contains_requirable_file?'
2017-11-01T14:27:17: %LIB-INFO: 	from /usr/local/rvm/rubies/ruby-2.2.1/lib/ruby/site_ruby/2.2.0/rubygems/specification.rb:949:in `block in find_in_unresolved'
2017-11-01T14:27:17: %LIB-INFO: 	from /usr/local/rvm/rubies/ruby-2.2.1/lib/ruby/site_ruby/2.2.0/rubygems/specification.rb:949:in `each'
2017-11-01T14:27:17: %LIB-INFO: 	from /usr/local/rvm/rubies/ruby-2.2.1/lib/ruby/site_ruby/2.2.0/rubygems/specification.rb:949:in `find_all'
2017-11-01T14:27:17: %LIB-INFO: 	from /usr/local/rvm/rubies/ruby-2.2.1/lib/ruby/site_ruby/2.2.0/rubygems/specification.rb:949:in `find_in_unresolved'
2017-11-01T14:27:17: %LIB-INFO: 	from /usr/local/rvm/rubies/ruby-2.2.1/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:74:in `require'
2017-11-01T14:27:17: %LIB-INFO: 	from /usr/local/rvm/gems/ruby-2.2.1/gems/bundler-1.14.3/lib/bundler/plugin/api/source.rb:2:in `<top (required)>'
2017-11-01T14:27:17: %LIB-INFO: 	from /usr/local/rvm/gems/ruby-2.2.1/gems/bundler-1.14.3/lib/bundler/rubygems_ext.rb:45:in `full_gem_path'
2017-11-01T14:27:17: %LIB-INFO: 	from /usr/local/rvm/rubies/ruby-2.2.1/lib/ruby/site_ruby/2.2.0/rubygems/basic_specification.rb:144:in `block in full_require_paths'
2017-11-01T14:27:17: %LIB-INFO: 	from /usr/local/rvm/rubies/ruby-2.2.1/lib/ruby/site_ruby/2.2.0/rubygems/basic_specification.rb:143:in `map'
2017-11-01T14:27:17: %LIB-INFO: 	from /usr/local/rvm/rubies/ruby-2.2.1/lib/ruby/site_ruby/2.2.0/rubygems/basic_specification.rb:143:in `full_require_paths'
2017-11-01T14:27:17: %LIB-INFO: 	from /usr/local/rvm/rubies/ruby-2.2.1/lib/ruby/site_ruby/2.2.0/rubygems/specification.rb:1370:in `add_self_to_load_path'
2017-11-01T14:27:17: %LIB-INFO: 	from /usr/local/rvm/rubies/ruby-2.2.1/lib/ruby/site_ruby/2.2.0/rubygems/specification.rb:1283:in `activate'
2017-11-01T14:27:17: %LIB-INFO: 	from /usr/local/rvm/rubies/ruby-2.2.1/lib/ruby/site_ruby/2.2.0/rubygems/specification.rb:1314:in `block in activate_dependencies'
2017-11-01T14:27:17: %LIB-INFO: 	from /usr/local/rvm/rubies/ruby-2.2.1/lib/ruby/site_ruby/2.2.0/rubygems/specification.rb:1300:in `each'
2017-11-01T14:27:17: %LIB-INFO: 	from /usr/local/rvm/rubies/ruby-2.2.1/lib/ruby/site_ruby/2.2.0/rubygems/specification.rb:1300:in `activate_dependencies'
2017-11-01T14:27:17: %LIB-INFO: 	from /usr/local/rvm/rubies/ruby-2.2.1/lib/ruby/site_ruby/2.2.0/rubygems/specification.rb:1282:in `activate'
2017-11-01T14:27:17: %LIB-INFO: 	from /usr/local/rvm/rubies/ruby-2.2.1/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_gem.rb:67:in `block in gem'
2017-11-01T14:27:17: %LIB-INFO: 	from /usr/local/rvm/rubies/ruby-2.2.1/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_gem.rb:66:in `synchronize'
2017-11-01T14:27:17: %LIB-INFO: 	from /usr/local/rvm/rubies/ruby-2.2.1/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_gem.rb:66:in `gem'
2017-11-01T14:27:17: %LIB-INFO: 	from /usr/local/rvm/gems/ruby-2.2.1/bin/beaker:22:in `<main>'
2017-11-01T14:27:17: %LIB-INFO: 	from /usr/local/rvm/gems/ruby-2.2.1/bin/ruby_executable_hooks:15:in `eval'
2017-11-01T14:27:17: %LIB-INFO: 	from /usr/local/rvm/gems/ruby-2.2.1/bin/ruby_executable_hooks:15:in `<main>'
2017-11-01T14:27:17: %LIB-INFO: Completed Beaker Suite: ./cisco_interface/test_interface_L2.rb

It's entirely possible I am missing something that I need to add to my CI environment based on these changes but don't feel good about merging this until we sort things out. Let me know if you have time this week to help debug.

@mcdonaldseanp
Copy link
Contributor Author

@mikewiebe interesting, I wonder if it has to do with the if Bundler.rubygems.find_name lines in the rakefile.

I have updated the PR to remove those if statements. It would be awesome if you could try one more time with the updated changes. If that doesn't work I am definitely available this week to debug.

@mikewiebe
Copy link
Contributor

@mcdonaldseanp I re-ran with your latest update but I still see the problem.

@mcdonaldseanp
Copy link
Contributor Author

Hrmm, some looking around has surfaced these:

rubygems/bundler#4981

rubygems/bundler#5409

what version of bundler do you have installed?

@mikewiebe
Copy link
Contributor

I am using version Bundler version 1.14.3. Looks like I need to update and re-test.

@mikewiebe
Copy link
Contributor

@mcdonaldseanp I updated to bundler version 1.16.0 and that appears to have resolved the issue. I want to upgrade across my test infra to make sure there are no more gotchas but should be able to merge this on Monday. Thanks!

@shermdog
Copy link
Contributor

@mcdonaldseanp per the internal release docs, looks like we also need to add vendor/ to .gitignore

This commit updates the Gemfile to include puppet-blacksmith and updates the
Rakefile to include requiring the rake tasks for both puppet_spec_helper and
puppet-blacksmith.

This will allow use of rake tasks from both projects useful in testing and
publishing this module
@mcdonaldseanp
Copy link
Contributor Author

@shermdog updated

@mikewiebe
Copy link
Contributor

👍

@mikewiebe mikewiebe merged commit b3efa30 into cisco:develop Nov 13, 2017
mikewiebe pushed a commit that referenced this pull request Nov 16, 2017
This commit updates the Gemfile to include puppet-blacksmith and updates the
Rakefile to include requiring the rake tasks for both puppet_spec_helper and
puppet-blacksmith.

This will allow use of rake tasks from both projects useful in testing and
publishing this module
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.

3 participants