Add ReportResolvedSourceReference to copy.Options#2967
Closed
justinmir wants to merge 1 commit intocontainers:mainfrom
Closed
Add ReportResolvedSourceReference to copy.Options#2967justinmir wants to merge 1 commit intocontainers:mainfrom
justinmir wants to merge 1 commit intocontainers:mainfrom
Conversation
When registry mirrors are configured via registries.conf, callers of copy.Image() have no way to discover which endpoint was actually contacted. The dockerImageSource already tracks this internally in its physicalRef field, but that information is never surfaced. Introduce a types.ResolvedImageSource optional interface that transports can implement to report the actual endpoint used. The docker transport implements it by returning physicalRef. copy.Image() detects the interface and writes the resolved reference into the new ReportResolvedSourceReference field on Options, following the same pointer-based pattern as the existing ReportResolvedReference for destinations. This enables consumers like CRI-O to expose the resolved registry domain in image pull metrics, giving operators visibility into which mirror or cache endpoint is serving their pulls.
|
This repository has been migrated to https://github.com/containers/container-libs. Please open your PR there. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When registry mirrors are configured via registries.conf, callers of copy.Image() have no way to discover which endpoint was actually contacted. The dockerImageSource already tracks this internally in its physicalRef field, but that information is never surfaced.
Introduce a types.ResolvedImageSource optional interface that transports can implement to report the actual endpoint used. The docker transport implements it by returning physicalRef. copy.Image() detects the interface and writes the resolved reference into the new ReportResolvedSourceReference field on Options, following the same pointer-based pattern as the existing ReportResolvedReference for destinations.
This enables consumers like CRI-O to expose the resolved registry domain in image pull metrics, giving operators visibility into which mirror or cache endpoint is serving their pulls.