Filtering for an exact match on service name no longer works #46341
Labels
area/api
area/swarm
kind/bug
Bugs are bugs. The cause may or may not be known at triage time so debugging may be needed.
status/0-triage
version/24.0
Description
I'm using the python API but this seems like something happening on the other side of the docker socket.
Filtering for an existing service (named 'match_me') by it's name with
match_me
as the criteria I get the service. Filtering for the same service by it's exact name with^match_me$
as the criteria I get nothing.At least as of about 6 months ago I'm fairly certain I would have gotten the service. At that time I manually tested the bit of my code that takes advantage of that and I'm 100% certain it worked.
There is no problem filtering containers just services.
Reproduce
This assumes the host is part of a docker swarm.
The above prints this when run:
Expected behavior
The service filters should respect regex.
More concretely the output of the script in steps to reproduce should be two identical lines (assuming there is only one service with 'match_me' in it's name).
docker version
Client: Docker Engine - Community Version: 24.0.5 API version: 1.43 Go version: go1.20.6 Git commit: ced0996 Built: Fri Jul 21 20:35:18 2023 OS/Arch: linux/amd64 Context: default Server: Docker Engine - Community Engine: Version: 24.0.5 API version: 1.43 (minimum version 1.12) Go version: go1.20.6 Git commit: a61e2b4 Built: Fri Jul 21 20:35:18 2023 OS/Arch: linux/amd64 Experimental: false containerd: Version: 1.6.22 GitCommit: 8165feabfdfe38c65b599c4993d227328c231fca runc: Version: 1.1.8 GitCommit: v1.1.8-0-g82f18fe docker-init: Version: 0.19.0 GitCommit: de40ad0
docker info
Additional Info
Maybe I'm doing something wrong but I can't find anything. I'm writing tests so I have direct access to the service object I'm searching for from the beginning. I'm using an f-string to create the filter criteria
f'^{service.name}$'
so it isn't like there is trailing white space or typos making it not match. I take well to RTFM as long as there is a rough pointer to where or what in the FM I should be reading. Thank you for your time.The text was updated successfully, but these errors were encountered: