Container Scanning integration tests failing which prevent DB update
Summary
Integration tests fail with
$ bundle exec rake $SPEC_NAME
/usr/local/bin/ruby -I/builds/gitlab-org/security-products/analyzers/container-scanning/vendor/ruby/ruby/3.1.0/gems/rspec-core-3.11.0/lib:/builds/gitlab-org/security-products/analyzers/container-scanning/vendor/ruby/ruby/3.1.0/gems/rspec-support-3.11.1/lib /builds/gitlab-org/security-products/analyzers/container-scanning/vendor/ruby/ruby/3.1.0/gems/rspec-core-3.11.0/exe/rspec --pattern spec/\*\*\{,/\*/\*\*\}/\*_spec.rb --tag integration:generic --format progress --format RspecJunitFormatter --out /builds/gitlab-org/security-products/analyzers/container-scanning/rspec.xml
Run options: include {:integration=>"generic"}
Randomized with seed 50463
sh: 1: git: not found
Failures:
1) registry.gitlab.com/gitlab-org/security-products/analyzers/container-scanning/tmp/alpine when scanning a registry.gitlab.com/gitlab-org/security-products/analyzers/container-scanning/tmp/alpine image when EE
Failure/Error: system(env, *args, exception: true)
Errno::ENOENT:
No such file or directory - git
Shared Example Group: "as container scanner" called from ./spec/integration/generic_spec.rb:17
# ./spec/support/integration_test_helper.rb:92:in `system'
# ./spec/support/integration_test_helper.rb:92:in `block in execute'
# ./vendor/ruby/ruby/3.1.0/gems/bundler-2.4.19/lib/bundler.rb:411:in `block in with_unbundled_env'
# ./vendor/ruby/ruby/3.1.0/gems/bundler-2.4.19/lib/bundler.rb:657:in `with_env'
# ./vendor/ruby/ruby/3.1.0/gems/bundler-2.4.19/lib/bundler.rb:411:in `with_unbundled_env'
# ./spec/support/integration_test_helper.rb:91:in `execute'
# ./spec/support/integration_test_helper.rb:38:in `block in mount'
# ./spec/support/integration_test_helper.rb:61:in `chdir'
# ./spec/support/integration_test_helper.rb:61:in `chdir'
# ./spec/support/integration_test_helper.rb:37:in `mount'
# ./spec/support/shared/with_scanner.rb:10:in `block (2 levels) in <top (required)>'
# ./vendor/ruby/ruby/3.1.0/gems/webmock-3.18.1/lib/webmock/rspec.rb:37:in `block (2 levels) in <top (required)>'
Steps to reproduce
Example Project
https://gitlab.com/gitlab-org/security-products/analyzers/container-scanning/-/jobs/5906598751
What is the current bug behavior?
What is the expected correct behavior?
Relevant logs and/or screenshots
Output of checks
Results of GitLab environment info
Expand for output related to GitLab environment info
(For installations with omnibus-gitlab package run and paste the output of: `sudo gitlab-rake gitlab:env:info`) (For installations from source run and paste the output of: `sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production`)
Results of GitLab application Check
Expand for output related to the GitLab application check
(For installations with omnibus-gitlab package run and paste the output of:
sudo gitlab-rake gitlab:check SANITIZE=true
)(For installations from source run and paste the output of:
sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production SANITIZE=true
)(we will only investigate if the tests are passing)