XS Add desired sharding key YAML config with backfill from ci_builds.project_id (6 tables)
What we need to do
These tables all have build_id
, so we can add project_id
and use ci_builds.project_id
to backfill
-
ci_builds_needs - #466438 (closed) -
ci_build_pending_states !171427 -
ci_build_trace_chunks !171601 -
p_ci_build_trace_metadata !171604 -
ci_builds_runner_session
Ci Job Variables has job_id
, so we should also be able to backfill project_id
from ci_builds.project_id
-
ci_job_variables
How to do it
Once the designation is set in the db/docs/*.yml
config file,
ASK: Populate the db/docs file and then the automation will handle backfilling of the records. This is assuming the sharding key which it's backfilling is non-nullable. As is the case for ci_builds_needs
. As it's backfilling from build_id
which is already non-nullable.
Edited by Vlad Wolanyk