Skip to content

Add named alias support for digest-based sync - #2639

Open
parmstro wants to merge 3 commits into
pulp:mainfrom
parmstro:feature/digest-alias-tags
Open

parmstro wants to merge 3 commits into
pulp:mainfrom
parmstro:feature/digest-alias-tags

Conversation

@parmstro

Copy link
Copy Markdown

Summary

  • Builds on Skip /tags/list enumeration for digest-only sync #2568 (tag list bypass optimization) to add named alias support
  • Entries in includes using the format name=sha256:<digest> create human-readable tags alongside the digest, enabling friendly image references in disconnected environments
  • Useful for operators who want to pull by a meaningful name (e.g. cli, cluster-dns-operator) rather than a raw sha256 digest

Implementation

  • _parse_include_entry() static method validates and parses both plain digests and name=sha256:digest entries
  • _can_bypass_taglist() updated to accept alias entries
  • _process_manifests creates Tag DeclarativeContent for each alias alongside the digest-tagged manifest
  • Unit tests cover parsing, bypass decision logic, and edge cases (hyphens in names, non-digest values, wildcards)

Depends on

Test plan

  • Unit tests: TestParseIncludeEntry, updated TestCanBypassTaglist with alias cases
  • Verified locally against large OCP repos on Satellite 6.19.5
  • CI integration tests

Changelog

CHANGES/2474.1.feature — new changelog entry for alias support

When all entries in a remote's includes field are sha256 digests,
bypass the expensive /tags/list enumeration and fetch manifests
directly by digest. Cosign companion tags are discovered via cached
HEAD probes filtered through the remote's excludes, fixing the
signed_only ordering bug where signature checks ran before cosign
discovery. Only HTTP 404 is treated as tag absence; auth failures
and rate limits propagate.

Tested against Satellite 6.19.5 with openshift-release-dev/ocp-v4.0-art-dev
(50,000+ tags). SAT-49501
Extends the tag list bypass to support name=sha256:digest entries in
the remote's includes field. When a digest has an alias, a local tag
with the alias name is created alongside the digest reference,
enabling friendly image names in disconnected environments.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant