Geo: Skip project/wiki repo create/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 project/wiki repo create and update events.
Steps to reproduce
- Enable selective sync
- Create a project/wiki outside of selective sync
What is the current bug behavior?
- It will increase the project/wiki repo count on the secondary /admin/geo/nodes UI
- It will sync the project/wiki
Same for updating a project.
What is the expected correct behavior?
- It should not increase the project/wiki count on the secondary /admin/geo/nodes UI
- It should not attempt to sync the project/wiki
Results of GitLab environment info
- staging.gitlab.com
Possible fixes
Skip creating registry and enqueuing a sync job, if outside of selective sync, in these event handlers:
Edited by Michael Kozono