Merge pull request #6091 from thaJeztah/remove_deprecated_isautomated

search: remove deprecated "IsAutomated" placeholder
This commit is contained in:
Paweł Gronowski 2025-05-21 15:43:36 +00:00 committed by GitHub
commit c07cd8aaad
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 6 additions and 27 deletions

View File

@ -42,7 +42,6 @@ func SearchWrite(ctx formatter.Context, results []registrytypes.SearchResult) er
"Description": formatter.DescriptionHeader,
"StarCount": starsHeader,
"IsOfficial": officialHeader,
"IsAutomated": automatedHeader,
}
return ctx.Write(&searchCtx, render)
}
@ -92,10 +91,3 @@ func (c *searchContext) formatBool(value bool) string {
func (c *searchContext) IsOfficial() string {
return c.formatBool(c.s.IsOfficial)
}
// IsAutomated formats the IsAutomated field for printing.
//
// Deprecated: the "is_automated" field is deprecated and will always be "false" in the future.
func (c *searchContext) IsAutomated() string {
return c.formatBool(c.s.IsAutomated) //nolint:nolintlint,staticcheck // ignore SA1019 (IsAutomated is deprecated).
}

View File

@ -45,19 +45,6 @@ func TestSearchContext(t *testing.T) {
},
call: ctx.IsOfficial,
},
{
searchCtx: searchContext{
s: registrytypes.SearchResult{IsAutomated: true}, //nolint:nolintlint,staticcheck // ignore SA1019 (IsAutomated is deprecated).
},
expValue: "[OK]",
call: ctx.IsAutomated, //nolint:nolintlint,staticcheck // ignore SA1019 (IsAutomated is deprecated).
},
{
searchCtx: searchContext{
s: registrytypes.SearchResult{},
},
call: ctx.IsAutomated, //nolint:nolintlint,staticcheck // ignore SA1019 (IsAutomated is deprecated).
},
}
for _, c := range cases {
@ -157,8 +144,8 @@ func TestSearchContextWrite(t *testing.T) {
{
doc: "JSON format",
format: "{{json .}}",
expected: `{"Description":"Official build","IsAutomated":"false","IsOfficial":"true","Name":"result1","StarCount":"5000"}
{"Description":"Not official","IsAutomated":"true","IsOfficial":"false","Name":"result2","StarCount":"5"}
expected: `{"Description":"Official build","IsOfficial":"true","Name":"result1","StarCount":"5000"}
{"Description":"Not official","IsOfficial":"false","Name":"result2","StarCount":"5"}
`,
},
{
@ -199,7 +186,7 @@ result2 5
results := []registrytypes.SearchResult{
{Name: "result1", Description: "Official build", StarCount: 5000, IsOfficial: true},
{Name: "result2", Description: "Not official", StarCount: 5, IsAutomated: true},
{Name: "result2", Description: "Not official", StarCount: 5},
}
for _, tc := range cases {

View File

@ -62,7 +62,7 @@ The following table provides an overview of the current status of deprecated fea
| Deprecated | [`Container` and `ContainerConfig` fields in Image inspect](#container-and-containerconfig-fields-in-image-inspect) | v25.0 | v26.0 |
| Deprecated | [Deprecate legacy API versions](#deprecate-legacy-api-versions) | v25.0 | v26.0 |
| Removed | [Container short ID in network Aliases field](#container-short-id-in-network-aliases-field) | v25.0 | v26.0 |
| Deprecated | [IsAutomated field, and `is-automated` filter on `docker search`](#isautomated-field-and-is-automated-filter-on-docker-search) | v25.0 | v26.0 |
| Deprecated | [IsAutomated field, and `is-automated` filter on `docker search`](#isautomated-field-and-is-automated-filter-on-docker-search) | v25.0 | v28.2 |
| Removed | [logentries logging driver](#logentries-logging-driver) | v24.0 | v25.0 |
| Removed | [OOM-score adjust for the daemon](#oom-score-adjust-for-the-daemon) | v24.0 | v25.0 |
| Removed | [BuildKit build information](#buildkit-build-information) | v23.0 | v24.0 |
@ -359,7 +359,7 @@ introduced in v25.0 and should be used instead of the `Aliases` field.
### IsAutomated field, and `is-automated` filter on `docker search`
**Deprecated in Release: v25.0**
**Target For Removal In Release: v26.0**
**Removed In Release: v28.2**
The `is_automated` field has been deprecated by Docker Hub's search API.
Consequently, the `IsAutomated` field in image search will always be set
@ -368,7 +368,7 @@ results.
The `AUTOMATED` column has been removed from the default `docker search`
and `docker image search` output in v25.0, and the corresponding `IsAutomated`
templating option will be removed in v26.0.
templating has been removed in v28.2.
### Logentries logging driver