From 6e4315f599069c2172a51615da9e4469c5878b10 Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Mon, 31 Mar 2025 17:45:54 +0200 Subject: [PATCH] search: remove deprecated "IsAutomated" placeholder IsAutomated was deprecated in 4fc3f0e6f6b93cebe591a22e9b4d514f599c2520 (docker v25.0), and marked for removal in docker 26.0 (which we missed). This removes it. Signed-off-by: Sebastiaan van Stijn --- cli/command/registry/formatter_search.go | 8 -------- cli/command/registry/formatter_search_test.go | 19 +++---------------- docs/deprecated.md | 6 +++--- 3 files changed, 6 insertions(+), 27 deletions(-) diff --git a/cli/command/registry/formatter_search.go b/cli/command/registry/formatter_search.go index 3f557dea6a..23f56ac69e 100644 --- a/cli/command/registry/formatter_search.go +++ b/cli/command/registry/formatter_search.go @@ -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). -} diff --git a/cli/command/registry/formatter_search_test.go b/cli/command/registry/formatter_search_test.go index 071bc70fed..082b0377e0 100644 --- a/cli/command/registry/formatter_search_test.go +++ b/cli/command/registry/formatter_search_test.go @@ -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 { diff --git a/docs/deprecated.md b/docs/deprecated.md index 30fe60f0ea..ce4de636be 100644 --- a/docs/deprecated.md +++ b/docs/deprecated.md @@ -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