Skip to content

Commit a693946

Browse files
migrate to moby/moby/v2
Signed-off-by: Swapnanil Gupta <swpnlg@amazon.com>
1 parent 730c0d6 commit a693946

32 files changed

Lines changed: 602 additions & 154 deletions

File tree

.github/dependabot.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,13 @@ updates:
1111
docker:
1212
patterns:
1313
- "github.com/docker/docker"
14+
- "github.com/moby/moby"
1415
- "github.com/docker/cli"
1516
project-dependency:
1617
exclude-patterns:
1718
- "github.com/containerd/nerdctl/v2"
1819
- "github.com/docker/docker"
20+
- "github.com/moby/moby"
1921
- "github.com/docker/cli"
2022
- package-ecosystem: "github-actions"
2123
directory: "/"

api/handlers/container/attach.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ import (
1414
"syscall"
1515

1616
"github.com/gorilla/mux"
17-
"github.com/moby/moby/api/server/httputils"
18-
"github.com/moby/moby/api/types/versions"
17+
"github.com/moby/moby/client/pkg/versions"
18+
"github.com/moby/moby/v2/daemon/server/httputils"
1919

2020
"github.com/runfinch/finch-daemon/api/response"
2121
"github.com/runfinch/finch-daemon/api/types"

api/handlers/container/attach_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import (
1616
"strings"
1717

1818
"github.com/gorilla/mux"
19-
"github.com/moby/moby/api/server/httputils"
19+
"github.com/moby/moby/v2/daemon/server/httputils"
2020

2121
"github.com/runfinch/finch-daemon/api/types"
2222

api/handlers/container/logs.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import (
1212
"syscall"
1313

1414
"github.com/gorilla/mux"
15-
"github.com/moby/moby/api/server/httputils"
15+
"github.com/moby/moby/v2/daemon/server/httputils"
1616

1717
"github.com/runfinch/finch-daemon/api/response"
1818
"github.com/runfinch/finch-daemon/api/types"

api/handlers/container/put_archive.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import (
77
"net/http"
88

99
"github.com/gorilla/mux"
10-
"github.com/moby/moby/api/server/httputils"
10+
"github.com/moby/moby/v2/daemon/server/httputils"
1111

1212
"github.com/runfinch/finch-daemon/api/response"
1313
"github.com/runfinch/finch-daemon/api/types"

api/handlers/container/stats_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@ import (
1111
"time"
1212

1313
"github.com/containerd/nerdctl/v2/pkg/config"
14-
dockertypes "github.com/docker/docker/api/types/container"
15-
"go.uber.org/mock/gomock"
1614
"github.com/gorilla/mux"
15+
dockertypes "github.com/moby/moby/api/types/container"
1716
. "github.com/onsi/ginkgo/v2"
1817
. "github.com/onsi/gomega"
18+
"go.uber.org/mock/gomock"
1919

2020
"github.com/runfinch/finch-daemon/api/types"
2121
"github.com/runfinch/finch-daemon/mocks/mocks_container"

api/handlers/distribution/distribution.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ import (
1111
"github.com/containerd/containerd/v2/pkg/namespaces"
1212
"github.com/containerd/nerdctl/v2/pkg/config"
1313
dockertypes "github.com/docker/cli/cli/config/types"
14-
registrytypes "github.com/docker/docker/api/types/registry"
1514
"github.com/gorilla/mux"
15+
registrytypes "github.com/moby/moby/api/types/registry"
1616
"github.com/runfinch/finch-daemon/api/auth"
1717
"github.com/runfinch/finch-daemon/api/response"
1818
"github.com/runfinch/finch-daemon/api/types"

api/handlers/distribution/distribution_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@ import (
1111
"testing"
1212

1313
"github.com/containerd/nerdctl/v2/pkg/config"
14-
registrytypes "github.com/docker/docker/api/types/registry"
15-
"go.uber.org/mock/gomock"
1614
"github.com/gorilla/mux"
15+
registrytypes "github.com/moby/moby/api/types/registry"
1716
. "github.com/onsi/ginkgo/v2"
1817
. "github.com/onsi/gomega"
1918
ocispec "github.com/opencontainers/image-spec/specs-go/v1"
19+
"go.uber.org/mock/gomock"
2020

2121
"github.com/runfinch/finch-daemon/mocks/mocks_distribution"
2222
"github.com/runfinch/finch-daemon/mocks/mocks_logger"

api/handlers/exec/start.go

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,14 @@ import (
1212

1313
"github.com/containerd/containerd/v2/pkg/namespaces"
1414
"github.com/gorilla/mux"
15-
"github.com/moby/moby/api/server/httputils"
16-
"github.com/moby/moby/api/types/versions"
17-
"github.com/moby/moby/pkg/stdcopy"
15+
"github.com/moby/moby/api/pkg/stdcopy"
16+
"github.com/moby/moby/client/pkg/versions"
17+
"github.com/moby/moby/v2/daemon/server/httputils"
1818

1919
"github.com/runfinch/finch-daemon/api/response"
2020
"github.com/runfinch/finch-daemon/api/types"
2121
"github.com/runfinch/finch-daemon/pkg/errdefs"
22+
"github.com/runfinch/finch-daemon/pkg/stdcopymux"
2223
)
2324

2425
func (h *handler) start(w http.ResponseWriter, r *http.Request) {
@@ -85,8 +86,8 @@ func (h *handler) start(w http.ResponseWriter, r *http.Request) {
8586
}
8687

8788
stdin = conn
88-
stdout = stdcopy.NewStdWriter(conn, stdcopy.Stdout)
89-
stderr = stdcopy.NewStdWriter(conn, stdcopy.Stderr)
89+
stdout = stdcopymux.NewStdWriter(conn, stdcopy.Stdout)
90+
stderr = stdcopymux.NewStdWriter(conn, stdcopy.Stderr)
9091
}
9192

9293
startOptions := &types.ExecStartOptions{

api/handlers/image/pull_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ import (
1515

1616
"github.com/containerd/nerdctl/v2/pkg/config"
1717
dockertypes "github.com/docker/cli/cli/config/types"
18-
"github.com/docker/docker/pkg/jsonmessage"
19-
"go.uber.org/mock/gomock"
18+
"github.com/moby/moby/api/types/jsonstream"
2019
. "github.com/onsi/ginkgo/v2"
2120
. "github.com/onsi/gomega"
21+
"go.uber.org/mock/gomock"
2222

2323
"github.com/runfinch/finch-daemon/api/response"
2424
"github.com/runfinch/finch-daemon/mocks/mocks_image"
@@ -317,7 +317,7 @@ var _ = Describe("Image Pull API", func() {
317317
Expect(outputs[0]).Should(Equal(response.StreamResponse{Stream: "resolved image\n"}))
318318
Expect(outputs[1]).Should(Equal(response.StreamResponse{Stream: "pulling image\n"}))
319319
Expect(outputs[2]).Should(Equal(response.StreamResponse{
320-
Error: &jsonmessage.JSONError{Code: http.StatusInternalServerError, Message: "error pulling"},
320+
Error: &jsonstream.Error{Code: http.StatusInternalServerError, Message: "error pulling"},
321321
ErrorMessage: "error pulling",
322322
}))
323323
})

0 commit comments

Comments
 (0)