Skip to content

Fix remote_mirrors usage ping metric

Alper Akgun requested to merge 325803-usage-ping-syntax-errors into master

What does this MR do?

Fix remote_mirrors usage ping data metric

Old broken query with redundant distinct

    :remote_mirrors: SELECT DISTINCT COUNT(DISTINCT "projects"."creator_id") FROM
      "projects" INNER JOIN "remote_mirrors" ON "remote_mirrors"."project_id" = "projects"."id"
      WHERE "remote_mirrors"."enabled" = TRUE

New query

    :remote_mirrors: SELECT COUNT(DISTINCT "projects"."creator_id") FROM "projects"
      INNER JOIN "remote_mirrors" ON "remote_mirrors"."project_id" = "projects"."id"
      WHERE "remote_mirrors"."enabled" = TRUE

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:

  • Label as security and @ mention @gitlab-com/gl-security/appsec
  • The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • Security reports checked/validated by a reviewer from the AppSec team

Related to #325803 (closed)

Edited by Alper Akgun

Merge request reports