Fix failing tests
-
!3958 (merged) changed the
AssignmentStore
to use repository ID for querying assignments of a repository. Changes made to address !3958 (comment 702588791) dropped the virtual storage parameter fromGetHostAssignments
method. While this works for the actual implementation, the legacy electors need the virtual storage parameter in place to return correct set of storages if there are no assignments stored for a repository. While it seemed there were no tests in Rails that exercise theRepositoryReplicas
RPC, turns out there were some and they are now failing as the legacy electors need the virtual storage parameter to properly determine configured storages for a virtual storage. -
Praefect is now getting the primary of a repository by the repository ID. Given that, the virtual storage paraemeter was no longer needed and was removed. There are some tests for RepositoryReplicas in Rails' repo which use the legacy election strategies. These legacy election strategies still need the virtual storage parameter to determine the primary node. In order to keep compatibility with the tests, this commit returns the parameter to GetPrimary. While this works for now, we should really configure Praefect properly in the tests to avoid being stuck with legacy implementations.