Skip to content

Commit 8fcf29a

Browse files
committed
search: remove deprecated "IsAutomated" placeholder
IsAutomated was deprecated in 4fc3f0e (docker v25.0), and marked for removal in docker 26.0 (which we missed). This removes it. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
1 parent 97e060e commit 8fcf29a

3 files changed

Lines changed: 5 additions & 26 deletions

File tree

cli/command/registry/formatter_search.go

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ func SearchWrite(ctx formatter.Context, results []registrytypes.SearchResult) er
4242
"Description": formatter.DescriptionHeader,
4343
"StarCount": starsHeader,
4444
"IsOfficial": officialHeader,
45-
"IsAutomated": automatedHeader,
4645
}
4746
return ctx.Write(&searchCtx, render)
4847
}
@@ -92,10 +91,3 @@ func (c *searchContext) formatBool(value bool) string {
9291
func (c *searchContext) IsOfficial() string {
9392
return c.formatBool(c.s.IsOfficial)
9493
}
95-
96-
// IsAutomated formats the IsAutomated field for printing.
97-
//
98-
// Deprecated: the "is_automated" field is deprecated and will always be "false" in the future.
99-
func (c *searchContext) IsAutomated() string {
100-
return c.formatBool(c.s.IsAutomated) //nolint:nolintlint,staticcheck // ignore SA1019 (IsAutomated is deprecated).
101-
}

cli/command/registry/formatter_search_test.go

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -45,19 +45,6 @@ func TestSearchContext(t *testing.T) {
4545
},
4646
call: ctx.IsOfficial,
4747
},
48-
{
49-
searchCtx: searchContext{
50-
s: registrytypes.SearchResult{IsAutomated: true}, //nolint:nolintlint,staticcheck // ignore SA1019 (IsAutomated is deprecated).
51-
},
52-
expValue: "[OK]",
53-
call: ctx.IsAutomated, //nolint:nolintlint,staticcheck // ignore SA1019 (IsAutomated is deprecated).
54-
},
55-
{
56-
searchCtx: searchContext{
57-
s: registrytypes.SearchResult{},
58-
},
59-
call: ctx.IsAutomated, //nolint:nolintlint,staticcheck // ignore SA1019 (IsAutomated is deprecated).
60-
},
6148
}
6249

6350
for _, c := range cases {
@@ -158,7 +145,7 @@ func TestSearchContextWrite(t *testing.T) {
158145
doc: "JSON format",
159146
format: "{{json .}}",
160147
expected: `{"Description":"Official build","IsAutomated":"false","IsOfficial":"true","Name":"result1","StarCount":"5000"}
161-
{"Description":"Not official","IsAutomated":"true","IsOfficial":"false","Name":"result2","StarCount":"5"}
148+
{"Description":"Not official","IsAutomated":"false","IsOfficial":"false","Name":"result2","StarCount":"5"}
162149
`,
163150
},
164151
{
@@ -199,7 +186,7 @@ result2 5
199186

200187
results := []registrytypes.SearchResult{
201188
{Name: "result1", Description: "Official build", StarCount: 5000, IsOfficial: true},
202-
{Name: "result2", Description: "Not official", StarCount: 5, IsAutomated: true},
189+
{Name: "result2", Description: "Not official", StarCount: 5},
203190
}
204191

205192
for _, tc := range cases {

docs/deprecated.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ The following table provides an overview of the current status of deprecated fea
6262
| Deprecated | [`Container` and `ContainerConfig` fields in Image inspect](#container-and-containerconfig-fields-in-image-inspect) | v25.0 | v26.0 |
6363
| Deprecated | [Deprecate legacy API versions](#deprecate-legacy-api-versions) | v25.0 | v26.0 |
6464
| Removed | [Container short ID in network Aliases field](#container-short-id-in-network-aliases-field) | v25.0 | v26.0 |
65-
| Deprecated | [IsAutomated field, and `is-automated` filter on `docker search`](#isautomated-field-and-is-automated-filter-on-docker-search) | v25.0 | v26.0 |
65+
| Deprecated | [IsAutomated field, and `is-automated` filter on `docker search`](#isautomated-field-and-is-automated-filter-on-docker-search) | v25.0 | v28.2 |
6666
| Removed | [logentries logging driver](#logentries-logging-driver) | v24.0 | v25.0 |
6767
| Removed | [OOM-score adjust for the daemon](#oom-score-adjust-for-the-daemon) | v24.0 | v25.0 |
6868
| 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.
359359
### IsAutomated field, and `is-automated` filter on `docker search`
360360

361361
**Deprecated in Release: v25.0**
362-
**Target For Removal In Release: v26.0**
362+
**Removed In Release: v28.2**
363363

364364
The `is_automated` field has been deprecated by Docker Hub's search API.
365365
Consequently, the `IsAutomated` field in image search will always be set
@@ -368,7 +368,7 @@ results.
368368

369369
The `AUTOMATED` column has been removed from the default `docker search`
370370
and `docker image search` output in v25.0, and the corresponding `IsAutomated`
371-
templating option will be removed in v26.0.
371+
templating has been removed in v28.2.
372372

373373
### Logentries logging driver
374374

0 commit comments

Comments
 (0)