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

latest v0.22.0 results in "don't understand inspec profile" error #217

Closed
ilyalavrenov opened this issue Dec 10, 2019 · 7 comments
Closed

Comments

@ilyalavrenov
Copy link

Describe the problem

getting RuntimeError: Don't understand inspec profile in /home/circleci/tf/test/integration/default/vendor/df1466fb617c7c1b51d782deacc38d82361118e226eb61193cdc0286f149548d.tar.gz, it doesn't look like a supported profile structure. on v0.22.0.

$ bundle exec inspec vendor --overwrite --chef-license=accept-silent --log-level=debug test/integration/default
[2019-12-10T21:29:51+00:00] DEBUG: Option backend_cache is enabled
[2019-12-10T21:29:51+00:00] DEBUG: Resolve /home/circleci/tf/test/integration/default into cache /home/circleci/tf/test/integration/default/vendor
[2019-12-10T21:29:51+00:00] DEBUG: Dependency does not exist in the cache /home/circleci/tf/test/integration/default
[2019-12-10T21:29:51+00:00] DEBUG: Starting traversal of dependencies ["inspec-gcp"]
[2019-12-10T21:29:51+00:00] DEBUG: Fetching URL: https://github.com/inspec/inspec-gcp/archive/v0.22.0.tar.gz
[2019-12-10T21:29:53+00:00] DEBUG: Archive stored at temporary location: /tmp/inspec-dl-20191210-686-1z0ftej.tar.gz
[2019-12-10T21:29:53+00:00] DEBUG: Dependency does not exist in the cache {:cwd=>"/home/circleci/tf/test/integration/default", :backend=>Inspec::Backend::Class @transport=Train::Transports::Mock::Connection, :name=>"inspec-gcp", :url=>"https://github.com/inspec/inspec-gcp/archive/v0.22.0.tar.gz"}
[2019-12-10T21:29:53+00:00] DEBUG: Fetched archive moved to: /home/circleci/tf/test/integration/default/vendor/df1466fb617c7c1b51d782deacc38d82361118e226eb61193cdc0286f149548d.tar.gz
[2019-12-10T21:29:53+00:00] DEBUG: Adding dependency inspec-gcp ({:url=>"https://github.com/inspec/inspec-gcp/archive/v0.22.0.tar.gz", :sha256=>"df1466fb617c7c1b51d782deacc38d82361118e226eb61193cdc0286f149548d"})
[2019-12-10T21:29:53+00:00] DEBUG: Using cached dependency for {:cwd=>"/home/circleci/tf/test/integration/default", :backend=>Inspec::Backend::Class @transport=Train::Transports::Mock::Connection, :name=>"inspec-gcp", :url=>"https://github.com/inspec/inspec-gcp/archive/v0.22.0.tar.gz"}
bundler: failed to load command: inspec (/home/circleci/tf/vendor/bundle/ruby/2.6.0/bin/inspec)
RuntimeError: Don't understand inspec profile in /home/circleci/tf/test/integration/default/vendor/df1466fb617c7c1b51d782deacc38d82361118e226eb61193cdc0286f149548d.tar.gz, it doesn't look like a supported profile structure.
  /home/circleci/tf/vendor/bundle/ruby/2.6.0/gems/inspec-4.3.2/lib/inspec/profile.rb:64:in `for_path'
  /home/circleci/tf/vendor/bundle/ruby/2.6.0/gems/inspec-4.3.2/lib/inspec/profile.rb:74:in `for_fetcher'
  /home/circleci/tf/vendor/bundle/ruby/2.6.0/gems/inspec-4.3.2/lib/inspec/dependencies/requirement.rb:127:in `profile'
  /home/circleci/tf/vendor/bundle/ruby/2.6.0/gems/inspec-4.3.2/lib/inspec/dependencies/requirement.rb:107:in `dependencies'
  /home/circleci/tf/vendor/bundle/ruby/2.6.0/gems/inspec-4.3.2/lib/inspec/dependencies/resolver.rb:79:in `block in resolve'
  /home/circleci/tf/vendor/bundle/ruby/2.6.0/gems/inspec-4.3.2/lib/inspec/dependencies/resolver.rb:61:in `each'
  /home/circleci/tf/vendor/bundle/ruby/2.6.0/gems/inspec-4.3.2/lib/inspec/dependencies/resolver.rb:61:in `resolve'
  /home/circleci/tf/vendor/bundle/ruby/2.6.0/gems/inspec-4.3.2/lib/inspec/dependencies/resolver.rb:32:in `resolve'
  /home/circleci/tf/vendor/bundle/ruby/2.6.0/gems/inspec-4.3.2/lib/inspec/dependencies/dependency_set.rb:89:in `vendor'
  /home/circleci/tf/vendor/bundle/ruby/2.6.0/gems/inspec-4.3.2/lib/inspec/profile.rb:529:in `generate_lockfile'
  /home/circleci/tf/vendor/bundle/ruby/2.6.0/gems/inspec-4.3.2/lib/inspec/profile_vendor.rb:59:in `vendor_dependencies'
  /home/circleci/tf/vendor/bundle/ruby/2.6.0/gems/inspec-4.3.2/lib/inspec/profile_vendor.rb:16:in `vendor!'
  /home/circleci/tf/vendor/bundle/ruby/2.6.0/gems/inspec-4.3.2/lib/inspec/base_cli.rb:248:in `vendor_deps'
  /home/circleci/tf/vendor/bundle/ruby/2.6.0/gems/inspec-4.3.2/lib/inspec/cli.rb:145:in `vendor'
  /home/circleci/tf/vendor/bundle/ruby/2.6.0/gems/thor-0.20.3/lib/thor/command.rb:27:in `run'
  /home/circleci/tf/vendor/bundle/ruby/2.6.0/gems/thor-0.20.3/lib/thor/invocation.rb:126:in `invoke_command'
  /home/circleci/tf/vendor/bundle/ruby/2.6.0/gems/thor-0.20.3/lib/thor.rb:387:in `dispatch'
  /home/circleci/tf/vendor/bundle/ruby/2.6.0/gems/thor-0.20.3/lib/thor/base.rb:466:in `start'
  /home/circleci/tf/vendor/bundle/ruby/2.6.0/gems/inspec-bin-4.3.2/bin/inspec:15:in `<top (required)>'
  /home/circleci/tf/vendor/bundle/ruby/2.6.0/bin/inspec:23:in `load'
  /home/circleci/tf/vendor/bundle/ruby/2.6.0/bin/inspec:23:in `<top (required)>'

rolling back to 0.21.4 seems to work:

$ bundle exec inspec vendor --overwrite --chef-license=accept-silent --log-level=debug test/integration/default
[2019-12-10T21:33:11+00:00] DEBUG: Option backend_cache is enabled
[2019-12-10T21:33:11+00:00] DEBUG: Resolve /home/circleci/tf/test/integration/default into cache /home/circleci/tf/test/integration/default/vendor
[2019-12-10T21:33:11+00:00] DEBUG: Dependency does not exist in the cache /home/circleci/tf/test/integration/default
[2019-12-10T21:33:11+00:00] DEBUG: Starting traversal of dependencies ["inspec-gcp"]
[2019-12-10T21:33:11+00:00] DEBUG: Fetching URL: https://github.com/inspec/inspec-gcp/archive/v0.21.4.tar.gz
[2019-12-10T21:33:12+00:00] DEBUG: Archive stored at temporary location: /tmp/inspec-dl-20191210-689-1koe4a1.tar.gz
[2019-12-10T21:33:12+00:00] DEBUG: Dependency does not exist in the cache {:cwd=>"/home/circleci/tf/test/integration/default", :backend=>Inspec::Backend::Class @transport=Train::Transports::Mock::Connection, :name=>"inspec-gcp", :url=>"https://github.com/inspec/inspec-gcp/archive/v0.21.4.tar.gz"}
[2019-12-10T21:33:12+00:00] DEBUG: Fetched archive moved to: /home/circleci/tf/test/integration/default/vendor/1e929f932d74518d8e195561ff4066a6e29ebd5ea4cd257f22b68ceb4c3eb887.tar.gz
[2019-12-10T21:33:12+00:00] DEBUG: Adding dependency inspec-gcp ({:url=>"https://github.com/inspec/inspec-gcp/archive/v0.21.4.tar.gz", :sha256=>"1e929f932d74518d8e195561ff4066a6e29ebd5ea4cd257f22b68ceb4c3eb887"})
[2019-12-10T21:33:12+00:00] DEBUG: Using cached dependency for {:cwd=>"/home/circleci/tf/test/integration/default", :backend=>Inspec::Backend::Class @transport=Train::Transports::Mock::Connection, :name=>"inspec-gcp", :url=>"https://github.com/inspec/inspec-gcp/archive/v0.21.4.tar.gz"}
[2019-12-10T21:33:27+00:00] DEBUG: Dependency traversal complete.
[2019-12-10T21:33:28+00:00] DEBUG: Extracting '/home/circleci/tf/test/integration/default/vendor/1e929f932d74518d8e195561ff4066a6e29ebd5ea4cd257f22b68ceb4c3eb887.tar.gz' to '/home/circleci/tf/test/integration/default/vendor/1e929f932d74518d8e195561ff4066a6e29ebd5ea4cd257f22b68ceb4c3eb887'
[2019-12-10T21:33:28+00:00] DEBUG: Deleting archive '/home/circleci/tf/test/integration/default/vendor/1e929f932d74518d8e195561ff4066a6e29ebd5ea4cd257f22b68ceb4c3eb887.tar.gz'
Dependencies for profile test/integration/default successfully vendored to /home/circleci/tf/test/integration/default/vendor

Possible Solution

@mattbowes
Copy link
Contributor

We started receiving the same error this morning. Rolling back to a local copy of 0.21.2 worked

Don't understand inspec profile in /root/.inspec/cache/cb2686a2df2dd7813aa9af32f643fcab655f15667af8d732f197292a1ab07b78.tar.gz, it doesn't look like a supported profile structure.

@slevenick
Copy link
Collaborator

#218 Should fix this issue. It is caused by some of the files I added recently having names that are too long, which apparently causes issues in the packaging of the gem.

@pburnet-lbg
Copy link

i am seeing this on version 0.23 as well name:

Don't understand inspec profile in /Users/pauburne/.inspec/cache/7d19da4e07bdc678e9b630b4dbb2ffeb9426f5035f0e3d1f1cf0b7bd64f722b4.tar.gz, it doesn't look like a supported profile structure.

inspec-gcp
title: Google Cloud Platform Resource Pack
maintainer: [email protected],[email protected]
summary: This resource pack provides compliance resources_old_ignore for Google Cloud Platform
copyright: [email protected],[email protected]
copyright_email: [email protected],[email protected]
version: 0.23.0
license: Apache-2.0
inspec_version: '>= 4.7.3'
supports:

  • platform: gcp

@mattbowes
Copy link
Contributor

mattbowes commented Dec 11, 2019

I am also see the error on 0.23.0

[2019-12-11T16:18:09+00:00] DEBUG: Using cached dependency for {:cwd=>".", :backend=>Inspec::Backend::Class @transport=Train::Transports::Gcp::Connection, :name=>"inspec-gcp", :url=>"https://github.com/inspec/inspec-gcp/archive/master.tar.gz"} Don't understand inspec profile in /root/.inspec/cache/7d19da4e07bdc678e9b630b4dbb2ffeb9426f5035f0e3d1f1cf0b7bd64f722b4.tar.gz, it doesn't look like a supported profile structure.

@callppatel
Copy link
Contributor

When we are expecting this to be fix? We are 100% impacted.

@slevenick
Copy link
Collaborator

@callppatel this was fixed with the release of 0.23.1 roughly an hour ago.

@ilyalavrenov
Copy link
Author

@slevenick confirmed working again with v0.23.1. thanks for jumping on this so quickly 🙇

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

No branches or pull requests

5 participants