Skip to content

client: ContainerListOptions: deprecate Since, Before, and Latest fields#51908

Merged
thaJeztah merged 2 commits intomoby:masterfrom
thaJeztah:client_deprecate_options
Jan 23, 2026
Merged

client: ContainerListOptions: deprecate Since, Before, and Latest fields#51908
thaJeztah merged 2 commits intomoby:masterfrom
thaJeztah:client_deprecate_options

Conversation

@thaJeztah
Copy link
Member

relates to:

client: deprecate ContainerListOptions.Since, ContainerListOptions.Before

The Before and Since options were used for the before and since
query parameters. These parameters were replaced with the before and
since filters in docker 1.10.0 (API 1.22)through moby@1921c62, and
moby@b41dba5.

The query parameters were removed from the CLI and daemon in docker 1.12.0
(API 1.24) through moby@91b7157, however the fields themselves were never
removed.

This patch deprecates the fields as they are non-functional.

client: deprecate ContainerListOptions.Latest

The --latest option was implemented in moby@b295239 as a CLI shortcut
for --last=1.

However, as part of a large refactor of the client in moby@d05aa41, a
ContainerListOptions type was introduced, which contained a Latest
field.

This field was never used, as the Latest option was handled in the CLI,
and had no corresponding option for the API (other than limit).

This patch deprecates the field as it is non-functional.

- Human readable description for the release notes

client: ContainerListOptions: deprecate `Since`, `Before`, and `Latest` fields.

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

…fore

The `Before` and `Since` options were used for the `before` and `since`
query parameters. These parameters were replaced with the `before` and
`since` filters in docker 1.10.0 (API 1.22)through [moby/moby@1921c62], and
[moby/moby@b41dba5].

The query parameters were removed from the CLI and daemon in docker 1.12.0
(API 1.24) through [moby/moby@91b7157], however the fields themselves were never
removed.

This patch deprecates the fields as they are non-functional.

[moby/moby@1921c62]: moby@1921c62
[moby/moby@b41dba5]: moby@b41dba5
[moby/moby@91b7157]: moby@91b7157

Signed-off-by: Sebastiaan van Stijn <[email protected]>
The `--latest` option was implemented in [moby/moby@b295239] as a CLI shortcut
for `--last=1`.

However, as part of a large refactor of the client in [moby/moby@d05aa41], a
`ContainerListOptions` type was introduced, which contained a `Latest`
field.

This field was never used, as the `Latest` option was handled in the CLI,
and had no corresponding option for the API (other than `limit`).

This patch deprecates the field as it is non-functional.

[moby/moby@b295239]: moby@b295239
[moby/moby@d05aa41]: moby@d05aa41

Signed-off-by: Sebastiaan van Stijn <[email protected]>
@thaJeztah thaJeztah added area/cli Client impact/changelog impact/deprecation impact/go-sdk Noteworthy (compatibility changes) in the Go SDK labels Jan 23, 2026
@thaJeztah thaJeztah added this to the 29.2.0 milestone Jan 23, 2026
@vvoland vvoland added the kind/refactor PR's that refactor, or clean-up code label Jan 23, 2026
@thaJeztah thaJeztah merged commit 8be1f7a into moby:master Jan 23, 2026
262 of 268 checks passed
@thaJeztah thaJeztah deleted the client_deprecate_options branch January 23, 2026 15:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/cli Client impact/changelog impact/deprecation impact/go-sdk Noteworthy (compatibility changes) in the Go SDK kind/refactor PR's that refactor, or clean-up code module/client

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants