Closed hangsu-ma closed 3 years ago
I am experiencing the same issue.
I've had to pin back inspec as a short term fix.
gem 'inspec', '~> 4.21.0'
This looks to be the commit that removes it as a valid option:
https://github.com/inspec/inspec/commit/98ae89e6cc747c2b749eb0e761cdc20e1aeb212b
I see it's now a plugin that "included" with inspec but I've no idea how to translate that to my kitchen.yml for use with chef...
I have the same problem. This breaks all my CI server builds unfortunately.
The switch to the plugin has also broken kitchen-inspec when verifying multiple suites.
This error is thrown https://github.com/inspec/inspec/blob/master/lib/inspec/plugin/v2/registry.rb#L75 on all but the first suite, because a unique instance of the Activator
class gets created for every suite.
The same actually applies to other plugins, too.
@fozboz I have created a separate issue for the multiple reporters / multiple suites issue - #262.
This issue was resolved by #261 and released in kitchen-inspec 2.6.1, included in Chef Workstation 20.9.158 - https://discourse.chef.io/t/chef-workstation-20-9-158-released/17758 .
i suspect the problem is happening because junit reporter is a plugin now, and kitchen inspec create runner with reporter options before loading plugins: https://github.com/inspec/kitchen-inspec/blob/80ef8c11acf9fc2b48d24eb3f75c0fdebf9649f1/lib/kitchen/verifier/inspec.rb#L83-L91
Version:
all
Environment:
Ubuntu 18.04 LTS Chef Workstation version: 20.9.136 Chef Infra Client version: 16.4.41 Chef InSpec version: 4.22.22 Chef CLI version: 3.0.27 Chef Habitat version: 1.6.56 Test Kitchen version: 2.6.0 Cookstyle version: 6.16.10
Scenario:
generate junit report from kitchen verify, same kitchen file works with chef workstation 20.8.125
Steps to Reproduce:
Expected Result:
generating junit test report
Actual Result:
error message
see log from below attached:
default-ubuntu-1804.log
interesting part: