rspec:undercoverage ran when no coverage file was created
minimal
pipelines can run rspec jobs that run no specs and do not produce a coverage file like https://gitlab.com/gitlab-org/gitlab/-/pipelines/576945030 which causes rspec:undercoverage
to fail.
bundler: failed to load command: scripts/undercoverage (scripts/undercoverage)
/builds/gitlab-org/gitlab/vendor/ruby/2.7.0/gems/undercover-0.4.4/lib/undercover.rb:32:in `initialize': No such file or directory @ rb_sysopen - /builds/gitlab-org/gitlab/coverage/lcov/gitlab.lcov (Errno::ENOENT)
from /builds/gitlab-org/gitlab/vendor/ruby/2.7.0/gems/undercover-0.4.4/lib/undercover.rb:32:in `open'
from /builds/gitlab-org/gitlab/vendor/ruby/2.7.0/gems/undercover-0.4.4/lib/undercover.rb:32:in `initialize'
from /builds/gitlab-org/gitlab/vendor/ruby/2.7.0/gems/undercover-0.4.4/lib/undercover/cli.rb:26:in `new'
from /builds/gitlab-org/gitlab/vendor/ruby/2.7.0/gems/undercover-0.4.4/lib/undercover/cli.rb:26:in `run_report'
from /builds/gitlab-org/gitlab/vendor/ruby/2.7.0/gems/undercover-0.4.4/lib/undercover/cli.rb:21:in `run'
from scripts/undercoverage:25:in `<top (required)>'
...
The scenario where minimal pipelines do not produce a coverage file should be handled more resiliently with either better information in the job output or not running rspec:undercoverage
for minimal pipelines.
Relates to #363061 (closed)
Workaround
- Apply pipeline:skip-undercoverage until non-minimal pipelines are run
Edited by Kyle Wiebers