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.
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_buildsrecords - Optional: replace any
root_namespace_idusages withnamespace_pathprefix searches.
Edited by 🤖 GitLab Bot 🤖