License_scout misprobes `gitlab-monitor` as though it's a bundler project rather than a gem
I see this in branch builds on dev:
[Licensing] W | 2018-03-07T14:54:53+00:00 | Unexpected error while running license_scout for 'gitlab-monitor': 'Expected process to exit with [0], but received '1'
---- Begin output of /opt/gitlab/embedded/bin/ruby /builds/gitlab/omnibus-gitlab/gems/ruby/2.3.0/gems/license_scout-1.0.0/lib/license_scout/dependency_manager/bundler/_bundler_script.rb ----
STDOUT:
STDERR: /opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/bundler-1.13.7/lib/bundler/definition.rb:179:in `rescue in specs': Your bundle is locked to ast (2.3.0), but that version could not be found in any of the sources listed in your Gemfile. If you haven't changed sources, that means the author of ast (2.3.0) has removed it. You'll need to update your bundle to a different version of ast (2.3.0) that hasn't been removed in order to install. (Bundler::GemNotFound)
from /opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/bundler-1.13.7/lib/bundler/definition.rb:173:in `specs'
from /opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/bundler-1.13.7/lib/bundler/definition.rb:233:in `specs_for'
from /opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/bundler-1.13.7/lib/bundler/definition.rb:222:in `requested_specs'
from /opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/bundler-1.13.7/lib/bundler/runtime.rb:118:in `block in definition_method'
from /opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/bundler-1.13.7/lib/bundler/runtime.rb:19:in `setup'
from /opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/bundler-1.13.7/lib/bundler.rb:99:in `setup'
from /opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/bundler-1.13.7/lib/bundler/setup.rb:20:in `<top (required)>'
from /opt/gitlab/embedded/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:133:in `require'
from /opt/gitlab/embedded/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:133:in `rescue in require'
from /opt/gitlab/embedded/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:39:in `require'
from /builds/gitlab/omnibus-gitlab/gems/ruby/2.3.0/gems/license_scout-1.0.0/lib/license_scout/dependency_manager/bundler/_bundler_script.rb:30:in `<main>'
---- End output of /opt/gitlab/embedded/bin/ruby /builds/gitlab/omnibus-gitlab/gems/ruby/2.3.0/gems/license_scout-1.0.0/lib/license_scout/dependency_manager/bundler/_bundler_script.rb ----
Ran /opt/gitlab/embedded/bin/ruby /builds/gitlab/omnibus-gitlab/gems/ruby/2.3.0/gems/license_scout-1.0.0/lib/license_scout/dependency_manager/bundler/_bundler_script.rb returned 1'
That's not right - /opt/gitlab/embedded/bin/ruby
is not the ruby that should be being used to run omnibus, it should be the ruby installed on the builder.
It appears to be due to license_scout
(the gem used by omnibus to automatically extract licensing information) mis-probing the gitlab-monitor
component as a bundler-based ruby application, rather than a gem with a local build/install.
Possibly we're losing licensing information, as these processes are allowed to fail by omnibus.
Edited by Richard Clamp