Skip to content

Draft: Usage ping declarative syntax POC

Alishan Ladhani requested to merge ali/usage-ping-poc into master

What does this MR do?

This MR is a POC of an idea for &3903 (closed).

  • Each metric is calculated in a separate sidekiq job

  • Metric jobs write their resulting data to redis

  • A cron job periodically checks to see of all metric jobs are finished

  • If all are finished, it will gather the data from redis and submit usage ping

  • This cron job can use a waitgroup-like pattern to know if all metric jobs are finished

Unknowns

  • How do we limit concurrency of jobs, to prevent overwhelming the DB?
  • How can the metric jobs share min/max ID?
    • Cache them in redis?

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
Edited by Alishan Ladhani

Merge request reports