Skip to content

Draft: Secure scan usage metrics count non successful builds

What does this MR do?

Update Secure Usage Ping metrics user_[analyzer name]_scans and [analyzer name]_pipeline to count scans associated with non-successful builds or retried builds. Previously these would not be counted.

The purpose of this MR is to reduce load on the GitLab Rails database by removing a join with the ci_builds table. This frees up the database sharding team to move the table to a new database.

Scans that are part of failed builds are still scans, so arguably this change is conceptually correct. For example, some users prefer to fail CI builds that run a scan where the scan finds vulnerabilities. These are valid scans, and therefore should be counted in Secure metrics.

This MR resolves issue #336170 (closed).

Conformity

Availability and Testing

Edited by Cameron Swords

Merge request reports