Geo - Allow selective sync by organizations for snippets

What does this MR do and why?

This code change enhances the snippet repository system to better support GitLab's Geo replication feature, which keeps data synchronized across multiple GitLab instances.

The main improvements include:

  1. Better selective sync support: The system can now selectively replicate snippet repositories based on organizations, namespaces, or storage shards, giving administrators more control over what data gets replicated to secondary GitLab instances.

  2. Enhanced verification capabilities: Added new methods to verify and validate snippet repositories during replication, ensuring data integrity across different GitLab nodes.

  3. Improved organization handling: The code now properly handles personal snippets that belong to specific organizations, making sure they're included in the correct replication scope when using organization-based selective sync.

  4. More comprehensive testing: The test suite was significantly expanded to cover various selective sync scenarios, including tests for personal snippets, project snippets, and different sync configurations.

The changes make the snippet replication system more flexible and reliable, allowing GitLab administrators to have finer control over which snippet repositories are replicated to secondary instances while ensuring data consistency and integrity throughout the process.

References

MR acceptance checklist

Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Douglas Barbosa Alexandre

Merge request reports

Loading