Geo: Skip container repo update events based on selective sync
Summary
From #230505 (closed):
This is because all design update events are creating registry records for designs, without checking if they are e.g. outside of selective sync.
The
RegistryConsistencyWorker
eventually removes them, but in the meantime, they impact the counts, and if the shard is healthy, a sync job is enqueued and executed.It looks like this may affect all the legacy update/create events. (Design repo, project repo, wiki repo, container repository)
This issue is to fix container (Docker) repository update events (which are reused for creation as well).
Steps to reproduce
- Enable selective sync
- Create a container outside of selective sync
What is the current bug behavior?
- It will increase the container count on the secondary /admin/geo/nodes UI
- It will sync the container
What is the expected correct behavior?
- It should not increase the container count on the secondary /admin/geo/nodes UI
- It should not attempt to sync the container
Results of GitLab environment info
- staging.gitlab.com
Possible fixes
Skip creating registry and enqueuing a sync job, if outside of selective sync, or if container repositories are disabled in this machine's configuration, in these event handlers:
Edited by Michael Kozono