Skip to content

Join records using repository ID in reconciler

Sami Hiltunen requested to merge smh-cluster-id-reconciler into master

Reconciler is currently joining the records using the virtual storage and relative path. This needs to change as the virtual storage and relative path columns are going to be dropped from the storage_repositories and repository_assignments tables once Praefect begins to generate unique relative paths for repositories. The records are now connected via the repository_id column so this commit updates the query to join the records using the id.

The storage_repositories table is shadowed in the query with a subset of its own columns to hide the columns that are about to be dropped. This makes it possible to do the joins with the USING clause and ensures the query is not using the columns anywhere.

The test setup is modified slightly to correctly connect the assignment records and existing jobs via the repository ID.

Related to #3485 (closed)

Edited by Sami Hiltunen

Merge request reports