Skip to content

registry: deprecate APIEndpoint.Official field#49706

Merged
thaJeztah merged 1 commit intomoby:masterfrom
thaJeztah:deprecate_apiendpoint_official
Mar 28, 2025
Merged

registry: deprecate APIEndpoint.Official field#49706
thaJeztah merged 1 commit intomoby:masterfrom
thaJeztah:deprecate_apiendpoint_official

Conversation

@thaJeztah
Copy link
Member

@thaJeztah thaJeztah commented Mar 27, 2025

This field was introduced in 19515a7 when the registry code was replaced for code vendored from docker/distribution.

It was used for v1 registries to update the "TrustStore" for signed manifests;

moby/graph/pull.go

Lines 89 to 93 in 19515a7

if !endpoint.Mirror && (endpoint.Official || endpoint.Version == registry.APIVersion2) {
if repoInfo.Official {
s.trustService.UpdateBase()
}
}

Before that, it used the IndexInfo.Official field;

moby/graph/pull.go

Lines 94 to 97 in 276c640

if len(repoInfo.Index.Mirrors) == 0 && (repoInfo.Index.Official || endpoint.Version == registry.APIVersion2) {
if repoInfo.Official {
s.trustService.UpdateBase()
}

And related to "v2" registries;
88fdcfe

- Human readable description for the release notes

Go SDK: registry: deprecate `APIEndpoint.Official` field

- A picture of a cute animal (not mandatory but encouraged)

This field was introduced in 19515a7 when
the registry code was replaced for code vendored from docker/distribution.

It was used for v1 registries to update the "TrustStore" for signed manifests;
https://github.com/moby/moby/blob/19515a7ad859b28c474d81e756ac245afcd968e3/graph/pull.go#L89-L93

Before that, it used the IndexInfo.Official field;
https://github.com/moby/moby/blob/276c640be4b4335e3b8d684cb3562a56d3337b39/graph/pull.go#L94-L97

And related to "v2" registries;
moby@88fdcfe

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
@thaJeztah thaJeztah added area/distribution Image Distribution status/2-code-review impact/deprecation area/go-sdk impact/go-sdk Noteworthy (compatibility changes) in the Go SDK labels Mar 27, 2025
@thaJeztah thaJeztah added this to the 28.0.5 milestone Mar 27, 2025
@thaJeztah thaJeztah merged commit 4cc249d into moby:master Mar 28, 2025
165 checks passed
@thaJeztah thaJeztah deleted the deprecate_apiendpoint_official branch March 28, 2025 15:24
@thompson-shaun thompson-shaun modified the milestones: 28.0.5, 28.1.0 Apr 7, 2025
@renovate renovate bot mentioned this pull request Sep 9, 2025
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/distribution Image Distribution area/go-sdk impact/deprecation impact/go-sdk Noteworthy (compatibility changes) in the Go SDK status/2-code-review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants