Cobertura Reports invalidate CI YAML

Hello,

our CI pipeline uses several Cobertura reports to check test coverage. All reports loaded by using:

artifacts:
    paths:
      - <some path>/coverage/*
    reports:
      cobertura: <some path>/coverage/cobertura_rusty.xml

This worked well for several months now. Last successful pipeline ran May 6, 2022 1:00am GMT+0200. There are no CI config changes to the last working version. Since today, all pipelines die with <job>:artifacts:reports config contains unknown keys: cobertura. When pasting the CI YAML into the Linter, we see the same messages. Has this feature been disabled for some reason, without us noticing? Or is this a bug?

3 Likes

Hi!

as a matter of fact, we are also facing the same issue with the pipelines.
After some tests, we were able to confirm that commenting out the cobertura line gets our pipelines working again, but we hope it to be only a quick workaround, not something permanent.

Any news regarding this would be appreciated.
Thanks!

same here…

pipelines were working yesterday… they include the following:

python tests coverage:
  stage: tests
  variables:
    PYTHONPATH: "./:./src/"
  script:
    - |
      pipenv run pytest \
          --cov=sandpit \
          --cov-append \
          --cov-report term \
          --cov-report xml:report-coverage.xml \
          -o log_cli=1 \
          -o log_cli_level=INFO
  coverage: '/TOTAL.*\s([.\d]+)%/'
  artifacts:
    reports:
      cobertura: report-coverage.xml

as per example in (Python example)

is this a small bug related to the latest release?

It looks like the 14.10.2 release accidentally included the deprecation of the cobertura keyword. This deprecation was originally planned for 15.0 release. (source)

The documentation is not completely updated yet. Only the JavaScript example contains the new syntax.

After updating to the new syntax, pipelines are working as usual again.

artifacts:
    paths:
      - <path>/coverage/*
    reports:
      coverage_report:
        coverage_format: cobertura
        path: <path>/cobertura.xml
2 Likes

thank you @felix-rhebo

Yes, I did try the reports:coverage_report:... solution from the JS example and it did work…

However, this feels like a fairly big break in the api/syntax, surely this should have been advertised much better… especially considering that the documentation is inaccurate/outdated

Thanks all for reporting this.

There is an issue about this open here: Removal of artifacts:report:cobertura keyword (#348980) · Issues · GitLab.org / GitLab · GitLab

To ensure product managers are aware of the impact this change had, I’ve added an issue comment linking to this forum post: Removal of artifacts:report:cobertura keyword (#348980) · Issues · GitLab.org / GitLab · GitLab

If you’re still having problems that the workaround doesn’t resolve, please comment in that issue. Thanks!

1 Like