Geo: Don't assume all source records are replicable in the Self-Service Framework
The following discussion from !34248 (merged) should be addressed:
We currently assume none of the replicable-related scopes apply to the primary-side, but some should. It looks like this will also impact at least artifacts after it is migrated since the
not_expired
scope can apply on the primary-side.One way to resolve this is to e.g. add
primary_replicables
which we can reuse in:
replicables_for_geo_node
(which wouldreturn primary_replicables if node.primary?
else apply primary & secondary scopes)primary_total_count
(exposed in the primary GeoNodeStatus and prometheus metrics)- Primary-side checksum success/failure counts and percentages (exposed in the primary GeoNodeStatus and prometheus metrics)
ReplicableModel#needs_checksum?
(I guess this should check if it's inreplicables_for_geo_node
since it will probably be reused during verification implementation)
(Also same for the Merge Request Diffs has_external_diffs
scope)
Also, !34248 (diffs, comment 404842890):
thought: WDYT about raising if not stored externally? The callers of
local?
reasonably assume a falsey value means the file is remotely stored.suggestion: I think we need to modify logic which depends on
local?
to not calllocal?
if not stored externally. E.g.needs_checksum?
andchecksummable?
should return falsey and not calllocal?
.