Filter snippets by shard
Context
As part of migration to new Gitaly servers we need to drain 3 types of repositories off a Gitaly storage:
- Project Repositories: https://docs.gitlab.com/ee/api/project_repository_storage_moves.html#schedule-repository-storage-moves-for-all-projects-on-a-storage-shard
- Snippet Repositories: https://docs.gitlab.com/ee/api/snippet_repository_storage_moves.html#schedule-a-repository-storage-move-for-a-snippet
- Group Repositories: https://docs.gitlab.com/ee/api/group_repository_storage_moves.html#schedule-a-repository-storage-move-for-a-group
Problem
We want to start migrating the snippets off 1 specific storage onto the new Gitaly servers that we are going to create in https://gitlab.com/groups/gitlab-com/gl-infra/-/epics/935. For GET /projects admins can filter by repository_sotrage.
For GET /snippets we don't have a way to filter for the storage, so there is no way for us to control which snippets we migrate.
I also found some strange behavior looking at GET /snippets it only lists snippets for users, not for the whole instance like GET /projects
Availability and Testing
Regression testing, please ensure Create (snippet-related) E2E tests are passing in follow-up-e2e:package-and-test-ee or run a full E2E pipeline by labelling MR with pipeline:run-all-e2e