Skip to content

Conversation

@saehejkang
Copy link
Contributor

@saehejkang saehejkang commented Nov 3, 2025

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation update

Motivation and Context

Closes #104

Testing

  • Tested locally
  • Added/updated tests
  • Added/updated docs

@saehejkang saehejkang marked this pull request as ready for review November 4, 2025 03:36
@jglogan
Copy link
Contributor

jglogan commented Dec 2, 2025

@saehejkang What do you think about just prefix matching the image index, more like what Docker does. At the same time we could clean up the tablular output for the commands:

  • When a user supplies an image ID to one of the image commands, the command first tries to match the ID as an image ref. If this fails, it tries to prefix match the ID against all image index hashes. A unique match selects the image, no match is treated as not found, just as today, and a multiple match is treated just as an image not found, but with a different error message.
  • In the tabular presentation, we change the DIGEST (non-verbose) and INDEX DIGEST (verbose mode) fields to just be INDEX PREFIX for both modes, output the 12 digit prefix value, and drop the trailing ellipsis. For MANIFEST DIGEST (verbose), we change to MANIFEST PREFIX, output the 12 digit prefix and remove the ellipsis.

ContainerClient could implement a utility function to facilitate the prefix matching mechanism, but it's the command itself that should implement the policy, rather than building that fuzzy matching into the client calls. Does that make sense?

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add support for referencing images via their 'short sha'

2 participants