Move build creation tracking from callbacks to pipeline chain
What does this MR do and why?
Move build creation telemetry tracking from after_commit to ..Chain::Metric
This prepares the codebase for some refactoring I am going to do in order to solve #588748, which will be done with bulk insert work.
No performance change or concern - same tracking operations, just moved from callback execution (during save!) to explicit loop (after transaction closes). The builds are already loaded in memory by the pipeline chain.
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Edited by Laura Montemayor