Skip to content

Commit

Permalink
feat: support filter by container-id prefix matching 12 or more chara…
Browse files Browse the repository at this point in the history
…cters (#218)

Signed-off-by: hengyoush <[email protected]>
  • Loading branch information
hengyoush authored Dec 21, 2024
1 parent e3fa2ee commit b4870fe
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion internal/metadata/container/containerd/containerd.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ func (d *MetaData) GetById(containerId string) types.Container {
id := getContainerId(containerId)
log.Debugf("get by id, id: %s", id)

if len(id) == shortContainerIdLength {
if len(id) >= shortContainerIdLength {
return d.getByShortId(id)
}

Expand Down
2 changes: 1 addition & 1 deletion internal/metadata/container/docker/docker.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ func (d *MetaData) GetById(containerId string) types.Container {

id := getDockerContainerId(containerId)

if len(id) == shortContainerIdLength {
if len(id) >= shortContainerIdLength {
return d.getByShortId(id)
}

Expand Down

0 comments on commit b4870fe

Please sign in to comment.