Skip to content

Fix failing tests

Sami Hiltunen requested to merge smh-assignment-repo-id into master
  • !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 from GetHostAssignments 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 the RepositoryReplicas 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.

Edited by Sami Hiltunen

Merge request reports