Fix NoMethodError in Geo::ContainerRepositorySync#list_blobs for manifests without layers/manifests/blobs

What does this MR do and why?

Geo::ContainerRepositorySync#list_blobs raised NoMethodError: undefined method 'filter_map' for nil when a container manifest had none of layers, manifests, or blobs set. The || chain evaluated to nil, and .filter_map was called on nil.

This affects manifests produced by Cosign/Notation signatures, OCI 1.1 referrers, and other artifact tooling that carry only a config + subject (and optionally annotations), with no blob array. The error was swallowed by the per-tag rescue StandardError block, so sync continued for other tags — but the affected tag never replicated, surfacing only as an error log line.

Fix: Default the descriptor list to [] when all three keys are absent, treating such manifests as "no blobs to pre-sync". The config.digest blob (if present) is still picked up, and push_manifest still runs for the tag.

Test: Added a spec for a bare OCI artifact manifest (config + subject, no layers/manifests/blobs) asserting that sync completes without raising and that both the config blob and the manifest are pushed.

References

Screenshots or screen recordings

N/A — backend-only change.

How to set up and validate locally

  1. In a Geo secondary, identify a container repository that has Cosign signature tags (e.g. tags matching sha256-<digest>.sig).
  2. Before the fix, syncing such a tag logs Error while syncing tag ...: undefined method 'filter_map' for nil.
  3. After the fix, the tag syncs successfully (or is skipped gracefully if the config blob is absent).

MR acceptance checklist

Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Merge request reports

Loading