Add logic to populate new destinations when job is retried
Problem
Another place where we would need to create job definitions and persist intrinsic data to ci_builds is when a job is retried, since we create a clone of the job to retry.
Proposal
Populate new table/columns when jobs are retried - behind a feature flag write_to_new_ci_destinations.
Handle the clone_accessors explicitly. For example: if the data is going to be persisted in the definition or ci_builds then set it explicitly. Do not use setters like options= unless for fallback on writing to p_ci_builds_metadata.
Write to p_ci_builds_metadata anyway until feature flag stop_writing_ci_builds_meatadata is enabled.
Edited by 🤖 GitLab Bot 🤖