Skip to content

Persist runner_features upon job registration

John Cai requested to merge jc-runner-features-peristence into master

What does this MR do and why?

In !70189 (merged), we added a column in ci_builds_metadata to hold runner features information coming directly from the runner on a call to register a job. This MR contains changes to actually save that information upon job registration.

Issue: #333846

How to set up and validate locally

In GDK, ensure latest version of gitlab-runner is being used.

  1. Kick off any job on any project.
  2. Take note of the job_id in the URL.
  3. In the rails console, find the job.
pry(main)> job = Ci::Build.find(<job_id>)
  1. Check that runner_features has been persisted.
pry(main)> job.runner_features

=> {"cache"=>true,
 "shared"=>true,
 "masking"=>true,
 "session"=>true,
 "refspecs"=>true,
 "terminal"=>true,
 "artifacts"=>true,
 "variables"=>true,
 "cancelable"=>true,
 "trace_size"=>true,
 "trace_reset"=>true,
 "raw_variables"=>true,
 "vault_secrets"=>true,
 "trace_checksum"=>true,
 "return_exit_code"=>true,
 "artifacts_exclude"=>true,
 "multi_build_steps"=>true,
 "upload_raw_artifacts"=>true,
 "upload_multiple_artifacts"=>true}

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Allison Browne

Merge request reports