Store namespace_path in CH ci_finished_builds and ci_used_minutes tables

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

  • Close this issue

Currently, we're storing root_namespace_id and project_id fields in the ci_finished_builds table. We should revisit the layout to see if it still serves us well. In !154462 (merged), we added project_id in ci_used_minutes to be able to query it for used minutes for a particular group, but this would be easier to achieve if the table contained a namespace_path field (consisting of traversal_ids.join('/') + '/').

Context: !154462 (comment 1930127825)

Implementation plan

  • Create migrations to add column to ci_finished_builds/ci_used_minutes
  • Adapt sync service to fill value on imported ci_finished_builds records
  • Optional: replace any root_namespace_id usages with namespace_path prefix searches.
Edited Sep 12, 2025 by 🤖 GitLab Bot 🤖
Assignee Loading
Time tracking Loading