GNU bug report logs - #76950
tramp caches non-existing podman containers

Previous Next

Package: emacs;

Reported by: Konstantin Kharlamov <Hi-Angel <at> yandex.ru>

Date: Tue, 11 Mar 2025 17:37:02 UTC

Severity: normal

Fixed in version 31.1

Done: Michael Albinus <michael.albinus <at> gmx.de>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Konstantin Kharlamov <Hi-Angel <at> yandex.ru>
To: Michael Albinus <michael.albinus <at> gmx.de>
Cc: 76950 <at> debbugs.gnu.org
Subject: bug#76950: tramp caches non-existing podman containers
Date: Wed, 12 Mar 2025 17:07:50 +0300
On Wed, 2025-03-12 at 13:42 +0100, Michael Albinus wrote:
> Konstantin Kharlamov <Hi-Angel <at> yandex.ru> writes:
> 
> Hi Konstantin,
> 
> > Figured, I'd clarify for people who don't work with
> > containerization:
> > the docker and podman completion is about auto-generated names like
> > vibrant_hopper, frosty_northcutt, etc. Caching them has no use
> > whatsoever, because:
> 
> That's not always the case. You can run a container with the
> '--name="NAME"' argument.
> 
> > 1. The command that receives possible completions always fetches
> > the
> > current list, so even if cached containers still exist, the cache
> > only
> > wastes space.
> 
> Right. It doesn't make sense to offer container names which do not
> run,
> but are cached.
> 
> > 2. When containers quit, the names become useless (the bug).
> 
> Not always (see above).
> 
> > So cache should not be working at all for both Podman and Docker.
> 
> Well, I've assembled a patch with disables completion of cached
> container
> names for the docker, dockercp, podman and podmancp methods. See
> appended. Could you, pls test?
> 
> It can be extended for other methods easily, which are offered by
> tramp-container.el.

Thank you! The patch seems to work, but it behaves a bit oddly. If I go
over steps-to-reproduce, I quit container, do C-x C-f and check
containers name not there anymore… I still see it cached! However, if I
do that again in a few seconds, the container disappears.

It's as if cache still there, but it gets removed after a delay.

Other than that, the patch is definitely an improvement, so if it's not
clear why this "cache removal with delay" happens, I think patch still
may be worth installing.




This bug report was last modified 128 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.