Geo: Inform users about current replication lag on secondaries
Replication delays exist when using Geo, and depending on the situation could be up to a few minutes. This delay could be problematic if CI builds use the secondary because the commits may not yet be available. If we know that there are pending changes that haven't been replicated, we should help the consumer know they are getting stale data. ### Original Proposal When fetching from a geo secondary, check if there are pending tasks in the queue for that repository, and show a warning that the secondary is out of date and that they should fetch from the primary. ## Product discovery conclusion This feature proposal is valuable because it surfaces important information to interested users where and when it is needed. Unfortunately we can't display informational messages on successful fetch over HTTP (see comments below). But it's clear, simple, and still effective to say "Replication lag warnings are provided on git over SSH". And the original customer who requested this uses git over SSH. ### Proposal - [x] Display current replication lag on git push/pull over SSH: https://gitlab.com/gitlab-org/gitlab-ee/issues/9217 - [x] Display current replication lag in the UI on secondaries: https://gitlab.com/gitlab-org/gitlab-ee/issues/9214 ### Additional follow up - [x] Display current replication lag on git push over HTTP: https://gitlab.com/gitlab-org/gitlab-ee/issues/9195
epic