From eff0c29098fe988327112c37884d57a7b244ac40 Mon Sep 17 00:00:00 2001 From: Matthew Heon Date: Tue, 4 Aug 2020 15:51:13 -0400 Subject: Unconditionally retrieve pod names via API The ListContainers API previously had a Pod parameter, which determined if pod name was returned (but, notably, not Pod ID, which was returned unconditionally). This was fairly confusing, so we decided to deprecate/remove the parameter and return it unconditionally. To do this without serious performance implications, we need to avoid expensive JSON decodes of pod configuration in the DB. The way our Bolt tables are structured, retrieving name given ID is actually quite cheap, but we did not expose this via the Libpod API. Add a new GetName API to do this. Fixes #7214 Signed-off-by: Matthew Heon --- pkg/api/server/register_containers.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'pkg/api/server') diff --git a/pkg/api/server/register_containers.go b/pkg/api/server/register_containers.go index 18ff2f423..a0c9ac574 100644 --- a/pkg/api/server/register_containers.go +++ b/pkg/api/server/register_containers.go @@ -661,11 +661,10 @@ func (s *APIServer) registerContainersHandlers(r *mux.Router) error { // type: boolean // description: Include namespace information // default: false - // - in: query // name: pod // type: boolean // default: false - // description: Include Pod ID and Name if applicable + // description: Ignored. Previously included details on pod name and ID that are currently included by default. // - in: query // name: size // type: boolean -- cgit v1.2.3-54-g00ecf