From 43db69da00e8d1ea359dec48210382b1fbc3b4be Mon Sep 17 00:00:00 2001 From: ManManavadaria Date: Thu, 27 Nov 2025 19:54:53 +0530 Subject: [PATCH 1/4] Fix panic: validate Names slice length and use containerID as container name if Names slice is empty in container summary --- pkg/commands/docker.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pkg/commands/docker.go b/pkg/commands/docker.go index 9885d305..35afef2f 100644 --- a/pkg/commands/docker.go +++ b/pkg/commands/docker.go @@ -256,7 +256,11 @@ func (c *DockerCommand) GetContainers(existingContainers []*Container) ([]*Conta if name, ok := ctr.Labels["name"]; ok { newContainer.Name = name } else { - newContainer.Name = strings.TrimLeft(ctr.Names[0], "/") + if len(ctr.Names) > 0 { + newContainer.Name = strings.TrimLeft(ctr.Names[0], "/") + } else { + newContainer.Name = ctr.ID + } } newContainer.ServiceName = ctr.Labels["com.docker.compose.service"] newContainer.ProjectName = ctr.Labels["com.docker.compose.project"] From b38db60ead07801283cc4a7e9db1f616b25207a9 Mon Sep 17 00:00:00 2001 From: Jesse Duffield Date: Sat, 20 Dec 2025 09:25:03 +1100 Subject: [PATCH 2/4] Use new setup-go version --- .github/workflows/cd.yml | 2 +- .github/workflows/ci.yml | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index 66e71608..64ba4d7c 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -14,7 +14,7 @@ jobs: - name: Unshallow repo run: git fetch --prune --unshallow - name: Setup Go - uses: actions/setup-go@v1 + uses: actions/setup-go@v6 with: go-version: 1.21.x - name: Run goreleaser diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 988b8dbc..f70d6753 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -25,7 +25,7 @@ jobs: - name: Checkout code uses: actions/checkout@v2 - name: Setup Go - uses: actions/setup-go@v1 + uses: actions/setup-go@v6 with: go-version: 1.21.x - name: Cache build @@ -47,7 +47,7 @@ jobs: - name: Checkout code uses: actions/checkout@v2 - name: Setup Go - uses: actions/setup-go@v1 + uses: actions/setup-go@v6 with: go-version: 1.21.x - name: Cache build @@ -75,7 +75,7 @@ jobs: - name: Checkout code uses: actions/checkout@v2 - name: Setup Go - uses: actions/setup-go@v1 + uses: actions/setup-go@v6 with: go-version: 1.21.x - name: Cache build @@ -102,7 +102,7 @@ jobs: - name: Checkout code uses: actions/checkout@v2 - name: Setup Go - uses: actions/setup-go@v1 + uses: actions/setup-go@v6 with: go-version: 1.21.x - name: Cache build From 3580e04b8d2523f8e08abea9a0bf5cbe148d3037 Mon Sep 17 00:00:00 2001 From: Jesse Duffield Date: Sat, 20 Dec 2025 09:25:03 +1100 Subject: [PATCH 3/4] Use new go version --- .github/workflows/cd.yml | 2 +- .github/workflows/ci.yml | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index 64ba4d7c..0ed9387b 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -16,7 +16,7 @@ jobs: - name: Setup Go uses: actions/setup-go@v6 with: - go-version: 1.21.x + go-version: 1.22.x - name: Run goreleaser uses: goreleaser/goreleaser-action@v1 with: diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f70d6753..caae44f8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,7 +1,7 @@ name: Continuous Integration env: - GO_VERSION: 1.21 + GO_VERSION: 1.22 on: push: @@ -27,7 +27,7 @@ jobs: - name: Setup Go uses: actions/setup-go@v6 with: - go-version: 1.21.x + go-version: 1.22.x - name: Cache build uses: actions/cache@v4 with: @@ -49,7 +49,7 @@ jobs: - name: Setup Go uses: actions/setup-go@v6 with: - go-version: 1.21.x + go-version: 1.22.x - name: Cache build uses: actions/cache@v4 with: @@ -77,7 +77,7 @@ jobs: - name: Setup Go uses: actions/setup-go@v6 with: - go-version: 1.21.x + go-version: 1.22.x - name: Cache build uses: actions/cache@v4 with: @@ -104,7 +104,7 @@ jobs: - name: Setup Go uses: actions/setup-go@v6 with: - go-version: 1.21.x + go-version: 1.22.x - name: Cache build uses: actions/cache@v4 with: From 322e10dcb5e41b284c6873b9b0fbce2b8a6a57c6 Mon Sep 17 00:00:00 2001 From: Jesse Duffield Date: Sat, 20 Dec 2025 09:39:26 +1100 Subject: [PATCH 4/4] Use even newer Go version --- .github/workflows/cd.yml | 2 +- .github/workflows/ci.yml | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index 0ed9387b..baee58cf 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -16,7 +16,7 @@ jobs: - name: Setup Go uses: actions/setup-go@v6 with: - go-version: 1.22.x + go-version: 1.24.x - name: Run goreleaser uses: goreleaser/goreleaser-action@v1 with: diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index caae44f8..309b2486 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,7 +1,7 @@ name: Continuous Integration env: - GO_VERSION: 1.22 + GO_VERSION: 1.24 on: push: @@ -27,7 +27,7 @@ jobs: - name: Setup Go uses: actions/setup-go@v6 with: - go-version: 1.22.x + go-version: 1.24.x - name: Cache build uses: actions/cache@v4 with: @@ -49,7 +49,7 @@ jobs: - name: Setup Go uses: actions/setup-go@v6 with: - go-version: 1.22.x + go-version: 1.24.x - name: Cache build uses: actions/cache@v4 with: @@ -77,7 +77,7 @@ jobs: - name: Setup Go uses: actions/setup-go@v6 with: - go-version: 1.22.x + go-version: 1.24.x - name: Cache build uses: actions/cache@v4 with: @@ -104,7 +104,7 @@ jobs: - name: Setup Go uses: actions/setup-go@v6 with: - go-version: 1.22.x + go-version: 1.24.x - name: Cache build uses: actions/cache@v4 with: