Code coverage not being set in one specific repo

Problem to solve

Code coverage is not being set in one specific repo

I’m trying to get our code coverage to show up in Gitlab, for our main repo. We already have the coverage calculation in place, so this looked as easy as setting up the coverage key and the proper regex. I double checked the regex with regex101 dot com.

Steps to reproduce

I couldn’t get it to work so I set out to create a new repo where it would be easier to test and understand how this is supposed to work. I got it running on the first try there. After much fussing around I ended up creating a new branch in our main repo, with the exact same .gitlab-ci.yml file as my test repo, and still I don’t see code coverage in our main repo.
I searched and I didn’t find anything that could be turned off (in the main repo) to prevent this from running.

I guess you can’t really reproduce it without access to my main repo (which is private…)

Configuration

This is my .gitlab-ci.yml which works in the test repo but not on the main one:

services:
  - name: docker:24-dind

stages:
  - test

Test:
  stage: test
  script:
    - echo "Testing done"

Code coverage:
  stage: test
  script:
    - echo "Final Coverage 123/200 (45.23%)"
  coverage: '/^Final Coverage .*\((\d+.\d+)%\)/'

Sleep:
  stage: test
  script:
    - sleep 60

Versions

We’re running self-hosted gitlab on the premium tier. Software version is 17.4
Runners are running 17.2.1

This is a screenshot from my test repo. It’s a brand new repo, no configuration tweaks whatsoever

And this is the screenshot from our main repo, from a pipeline running the exact same gitlab-ci.yml as the test repo:

Please, note that on the test repo the Coverage column is populated but that doesn’t happen in the main repo. Also, if I go into the ‘Code Coverage’ job in the test repo I can see the coverage in there, but the same Coverage line doesn’t show up in the main repo.

Thanks in advance!

Nevermind, I found the issue.
We have FF_TIMESTAMPS turned on in the main repo. My regex was something like /^Final Coverage..../. Apparently the timestamp is part of the line that gets fed into the regex, which fails as it no longer starts with Final Coverage :man_facepalming: .