[go: up one dir, main page]

Draft: POC Deduplicate intrinsic data into Ci::JobInfo

What does this MR do and why?

This is a POC for moving immutable, intrinsic data into a new model Ci::JobInfo.

Details:

  1. Creates ci_job_infos and adds the column job_info_id to ci_builds.

  2. Moves ci_builds.scheduling_type and ci_builds.name --> ci_job_infos as normalized columns.

    • Attempted moving other columns from ci_builds and these were the results:
    • Costs/benefits:
      • Deduplicates scheduling_type value.
      • We can eventually drop ci_builds.scheduling_type column.
  3. Adds search_vector column to ci_job_infos.

    • This combined with copying over ci_builds.name to ci_job_infos replaces the need for ci_build_names.
    • Costs/benefits:
      • Deduplicates name and search_vector values.
      • We can eventually drop ci_build_names.
  4. Moves ci_build_needs --> ci_job_infos.config.

    • Instead of reading job.needs directly, we read needs_attributes from job_info.config and represent it as a collection of needs using Ci::JobNeeds::Collection. This allows us to work with the data in a readable and consistent way.
    • The only potential blocker is the object hierarchy query in !211540 (diffs).
    • Costs/benefits:
      • We can either completely drop ci_build_needs or at least drop the data after pipeline archival.
  5. Moves ci_build_sources --> ci_job_infos.source.

    • Costs/benefits:
      • Deduplicates ci_build_sources.source values.
      • We can eventually drop ci_build_sources.

References

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.

Related to #577211 (closed)

Edited by Leaminn Ma

Merge request reports

Loading