api, client: don't use a pointer-slice for plugins by thaJeztah · Pull Request #51440 · moby/moby · GitHub
Skip to content

api, client: don't use a pointer-slice for plugins - #51440

Merged
vvoland merged 1 commit into
moby:masterfrom
thaJeztah:plugins_no_pointer
Nov 10, 2025
Merged

vvoland merged 1 commit into
moby:masterfrom
thaJeztah:plugins_no_pointer

Conversation

@thaJeztah

Copy link
Copy Markdown
Member

The backend and router don't use a pointer-slice (the server actually doesn't use the plugin.ListResponse type and a straight slice);

l, err := pr.backend.List(pluginFilters)
if err != nil {
return err
}
return httputils.WriteJSON(w, http.StatusOK, l)

Align the type in the API to match, and update the type defined in the client accordingly.

- What I did

- How I did it

- How to verify it

- Human readable description for the release notes

api/types/plugin: change ListResponse to a non-pointer slice
client: PluginListResult: change Items field to a non-pointer slice

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

@thaJeztah thaJeztah added this to the 29.0.0 milestone Nov 7, 2025
@thaJeztah

Copy link
Copy Markdown
Member Author

The backend and router don't use a pointer-slice (the server actually
doesn't use the `plugin.ListResponse` type and a straight slice);
https://github.com/moby/moby/blob/778e5bfad3098bcc1b1457634e14c1c204ebf851/daemon/server/router/plugin/backend.go#L20
https://github.com/moby/moby/blob/6baf274fa3e90731ac653967cb0cea38e82b5e36/daemon/server/router/plugin/plugin_routes.go#L276-L280

Align the type in the API to match, and update the type defined in the
client accordingly.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
@thaJeztah
thaJeztah marked this pull request as ready for review November 7, 2025 21:17
@vvoland
vvoland merged commit a0e4deb into moby:master Nov 10, 2025
254 of 255 checks passed
@thaJeztah
thaJeztah deleted the plugins_no_pointer branch November 10, 2025 11:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants