Skip to content

Disable simplecov before rspec retries

What does this MR do?

Closes #365379 (closed).

Disables SimpleCov during rspec retries, so the coverage report doesn't get overriden by retried specs.

Took me a while to verify this in the pipelines, but I was able to confirm the fix with the following builds by forcing the pipeline_replicator spec to fail:

Before the fix:

  • The coverage artifactshows the following incorrect coverage result for pipeline_replicator.rb
"/builds/gitlab-org/gitlab/ee/app/replicators/geo/pipeline_replicator.rb": {
        "lines": [
          null,
          null,
          1,
          1,
          1,
          null,
          1,
          0,
          null,
          null,
          1,
          0,
          null,
          0,
          null,
          null,
          1,
          0,
          null,
          null,
          null
        ]
      },
undercover: 👮‍♂️ some methods have no test coverage! Please add specs for methods listed below
🚨 1) node `model` type: class method,
      loc: ee/app/replicators/geo/pipeline_replicator.rb:7:9, coverage: 0.0%
7:     def self.model hits: n/a
8:       ::Ci::Pipeline hits: 0
9:     end hits: n/a

After the fix:

"/builds/gitlab-org/gitlab/ee/app/replicators/geo/pipeline_replicator.rb": {
        "lines": [
          null,
          null,
          1,
          1,
          1,
          null,
          1,
          4,
          null,
          null,
          1,
          3,
          null,
          1,
          null,
          null,
          1,
          1,
          null,
          null,
          null
        ]
      }
undercover: ✅ No coverage is missing in latest changes

Related issues

#365379 (closed)

Checklist

Pre-merge

Consider the effect of the changes in this merge request on the following:

If new jobs are added:

This will help keep track of expected cost increases to the GitLab project average pipeline cost per merge request RPI

Post-merge

Edited by Jennifer Li

Merge request reports

Loading