Skip to content

Rake task to populate job traces

Max Fan requested to merge populate_traces_for_rca_staging into master

What does this MR do and why?

Rake task to populate job traces

This rake task will populate existing failed builds with traces pulled from failing jobs in production

Also has custom params to support pulling from a specific project on production

This will mainly be used on STAGING to populate traces for RootCauseAnalysis benchmarking. We need this checked in before we can have an SRE run it on staging.

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Tested this locally, it takes ~1.5 hours to run the whole thing (non-trial) portion

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

Before After

How to set up and validate locally

  1. Suggested to run the gitlab:populate_job_traces:populate_trial so you don't end up populating 4k traces locally.
  2. Prerequisite:
    1. Need at least 10 failed builds for a project to start the rake task
    2. Need an gitlab access token
  3. locally with your project_id run bundle exec rake "gitlab:populate_job_traces:populate[project_id,glpat-restOfToken]" 
  4. This should populate that project with job traces off production
Edited by Max Fan

Merge request reports