Skip to content

Commit

Permalink
Merge pull request #3061 from corhere/v2
Browse files Browse the repository at this point in the history
Swarmkit v2
  • Loading branch information
dperny authored Apr 20, 2022
2 parents 676f45f + 3fb8c6b commit 6068d18
Show file tree
Hide file tree
Showing 420 changed files with 4,889 additions and 3,302 deletions.
5 changes: 2 additions & 3 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ jobs:
# Needed to install go
OS: linux
ARCH: amd64
GOVERSION: 1.17
GO111MODULE: "off"
GOVERSION: 1.17.9
GO111MODULE: "on"
# Needed to install protoc
PROTOC_VERSION: 3.6.1

Expand Down Expand Up @@ -77,7 +77,6 @@ jobs:
environment:
# ensure GOPATH is set to single directory so the make target doesn't need to handle a column-separated list
GOPATH: /home/circleci/.go_workspace
GO111MODULE: "on"
command: |
git fetch origin
if test -n "`git diff --stat=1000 origin/master | grep -E \"^[[:space:]]*vendor\"`"; then
Expand Down
2 changes: 0 additions & 2 deletions .gitattributes

This file was deleted.

3 changes: 0 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,3 @@ bin/swarmkitstate

# dev sync, if used
/.docker-sync/

# top-level go.mod is not meant to be checked in yet
/go.mod
2 changes: 1 addition & 1 deletion BUILDING.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ for details.

### Update vendored dependencies

To update dependency you need just change `vendor.mod` file and run:
To update dependency you need just change `go.mod` file and run:
```
make go-mod-vendor
```
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ RUN curl --silent --show-error --location --output protoc.zip \
&& unzip -d /usr/local protoc.zip include/\* bin/\* \
&& rm -f protoc.zip

ENV GO111MODULE=off
ENV GO111MODULE=on
WORKDIR /go/src/github.com/docker/swarmkit/

# install the dependencies from `make setup`
Expand Down
2 changes: 0 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
# Root directory of the project (absolute path).
ROOTDIR=$(dir $(abspath $(lastword $(MAKEFILE_LIST))))

PROJECT_ROOT=github.com/docker/swarmkit

SHELL := /bin/bash

# stop here. do we want to run everything inside of a container, or do we want
Expand Down
1 change: 1 addition & 0 deletions Protobuild.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ plugins = ["grpc", "deepcopy", "storeobject", "raftproxy", "authenticatedwrapper
"google/protobuf/timestamp.proto" = "github.com/gogo/protobuf/types"
"google/protobuf/duration.proto" = "github.com/gogo/protobuf/types"
"google/protobuf/wrappers.proto" = "github.com/gogo/protobuf/types"
"github.com/docker/swarmkit/protobuf/plugin/plugin.proto" = "github.com/moby/swarmkit/v2/protobuf/plugin"

[[descriptors]]
prefix = "github.com/docker/swarmkit/api"
Expand Down
6 changes: 3 additions & 3 deletions agent/agent.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ import (
"sync"
"time"

"github.com/docker/swarmkit/agent/exec"
"github.com/docker/swarmkit/api"
"github.com/docker/swarmkit/log"
"github.com/moby/swarmkit/v2/agent/exec"
"github.com/moby/swarmkit/v2/api"
"github.com/moby/swarmkit/v2/log"
"github.com/pkg/errors"
)

Expand Down
18 changes: 9 additions & 9 deletions agent/agent_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@ import (
"google.golang.org/grpc/credentials"

events "github.com/docker/go-events"
agentutils "github.com/docker/swarmkit/agent/testutils"
"github.com/docker/swarmkit/api"
"github.com/docker/swarmkit/ca"
cautils "github.com/docker/swarmkit/ca/testutils"
"github.com/docker/swarmkit/connectionbroker"
"github.com/docker/swarmkit/log"
"github.com/docker/swarmkit/remotes"
"github.com/docker/swarmkit/testutils"
"github.com/docker/swarmkit/xnet"
agentutils "github.com/moby/swarmkit/v2/agent/testutils"
"github.com/moby/swarmkit/v2/api"
"github.com/moby/swarmkit/v2/ca"
cautils "github.com/moby/swarmkit/v2/ca/testutils"
"github.com/moby/swarmkit/v2/connectionbroker"
"github.com/moby/swarmkit/v2/log"
"github.com/moby/swarmkit/v2/remotes"
"github.com/moby/swarmkit/v2/testutils"
"github.com/moby/swarmkit/v2/xnet"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
Expand Down
6 changes: 3 additions & 3 deletions agent/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ package agent

import (
"github.com/docker/go-events"
"github.com/docker/swarmkit/agent/exec"
"github.com/docker/swarmkit/api"
"github.com/docker/swarmkit/connectionbroker"
"github.com/moby/swarmkit/v2/agent/exec"
"github.com/moby/swarmkit/v2/api"
"github.com/moby/swarmkit/v2/connectionbroker"
"github.com/pkg/errors"
bolt "go.etcd.io/bbolt"
"google.golang.org/grpc/credentials"
Expand Down
4 changes: 2 additions & 2 deletions agent/configs/configs.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"fmt"
"sync"

"github.com/docker/swarmkit/agent/exec"
"github.com/docker/swarmkit/api"
"github.com/moby/swarmkit/v2/agent/exec"
"github.com/moby/swarmkit/v2/api"
)

// configs is a map that keeps all the currently available configs to the agent
Expand Down
2 changes: 1 addition & 1 deletion agent/csi/plugin/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (

"github.com/docker/docker/pkg/plugingetter"

"github.com/docker/swarmkit/api"
"github.com/moby/swarmkit/v2/api"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion agent/csi/plugin/manager_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"

"github.com/docker/swarmkit/testutils"
"github.com/moby/swarmkit/v2/testutils"
)

var _ = Describe("PluginManager", func() {
Expand Down
4 changes: 2 additions & 2 deletions agent/csi/plugin/plugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ import (

"github.com/container-storage-interface/spec/lib/go/csi"
"github.com/docker/docker/pkg/plugingetter"
"github.com/docker/swarmkit/api"
"github.com/docker/swarmkit/log"
"github.com/moby/swarmkit/v2/api"
"github.com/moby/swarmkit/v2/log"
)

// SecretGetter is a reimplementation of the exec.SecretGetter interface in the
Expand Down
2 changes: 1 addition & 1 deletion agent/csi/plugin/plugin_fake_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (

"github.com/docker/docker/pkg/plugingetter"

"github.com/docker/swarmkit/api"
"github.com/moby/swarmkit/v2/api"
)

// plugin_fake_test.go contains code for faking node plugins in the context of
Expand Down
4 changes: 2 additions & 2 deletions agent/csi/plugin/plugin_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (
"net"
"testing"

"github.com/docker/swarmkit/api"
"github.com/docker/swarmkit/testutils"
"github.com/moby/swarmkit/v2/api"
"github.com/moby/swarmkit/v2/testutils"

"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
Expand Down
4 changes: 2 additions & 2 deletions agent/csi/plugin_manager_fake_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"

"github.com/docker/swarmkit/agent/csi/plugin"
"github.com/docker/swarmkit/api"
"github.com/moby/swarmkit/v2/agent/csi/plugin"
"github.com/moby/swarmkit/v2/api"
)

// fakePluginManager is a fake pluginManager, used for testing the volume
Expand Down
6 changes: 3 additions & 3 deletions agent/csi/volume_manager_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ import (
"testing"
"time"

"github.com/docker/swarmkit/agent/exec"
"github.com/docker/swarmkit/api"
"github.com/docker/swarmkit/volumequeue"
"github.com/moby/swarmkit/v2/agent/exec"
"github.com/moby/swarmkit/v2/api"
"github.com/moby/swarmkit/v2/volumequeue"
"github.com/stretchr/testify/assert"
)

Expand Down
10 changes: 5 additions & 5 deletions agent/csi/volumes.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ import (

"github.com/docker/docker/pkg/plugingetter"

"github.com/docker/swarmkit/agent/csi/plugin"
"github.com/docker/swarmkit/agent/exec"
"github.com/docker/swarmkit/api"
"github.com/docker/swarmkit/log"
"github.com/docker/swarmkit/volumequeue"
"github.com/moby/swarmkit/v2/agent/csi/plugin"
"github.com/moby/swarmkit/v2/agent/exec"
"github.com/moby/swarmkit/v2/api"
"github.com/moby/swarmkit/v2/log"
"github.com/moby/swarmkit/v2/volumequeue"
)

// volumeState keeps track of the state of a volume on this node.
Expand Down
10 changes: 5 additions & 5 deletions agent/dependency.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ package agent
import (
"github.com/docker/docker/pkg/plugingetter"

"github.com/docker/swarmkit/agent/configs"
"github.com/docker/swarmkit/agent/csi"
"github.com/docker/swarmkit/agent/exec"
"github.com/docker/swarmkit/agent/secrets"
"github.com/docker/swarmkit/api"
"github.com/moby/swarmkit/v2/agent/configs"
"github.com/moby/swarmkit/v2/agent/csi"
"github.com/moby/swarmkit/v2/agent/exec"
"github.com/moby/swarmkit/v2/agent/secrets"
"github.com/moby/swarmkit/v2/api"
)

type dependencyManager struct {
Expand Down
8 changes: 4 additions & 4 deletions agent/exec/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ import (
"fmt"
"time"

"github.com/docker/swarmkit/api"
"github.com/docker/swarmkit/api/equality"
"github.com/docker/swarmkit/log"
"github.com/docker/swarmkit/protobuf/ptypes"
"github.com/moby/swarmkit/v2/api"
"github.com/moby/swarmkit/v2/api/equality"
"github.com/moby/swarmkit/v2/log"
"github.com/moby/swarmkit/v2/protobuf/ptypes"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
)
Expand Down
2 changes: 1 addition & 1 deletion agent/exec/controller_stub.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"runtime"
"strings"

"github.com/docker/swarmkit/api"
"github.com/moby/swarmkit/v2/api"
)

// StubController implements the Controller interface,
Expand Down
4 changes: 2 additions & 2 deletions agent/exec/controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (
"runtime"
"testing"

"github.com/docker/swarmkit/api"
"github.com/docker/swarmkit/log"
"github.com/moby/swarmkit/v2/api"
"github.com/moby/swarmkit/v2/log"
gogotypes "github.com/gogo/protobuf/types"
"github.com/stretchr/testify/assert"
)
Expand Down
6 changes: 3 additions & 3 deletions agent/exec/dockerapi/adapter.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ import (
"github.com/docker/docker/api/types"
"github.com/docker/docker/api/types/events"
engineapi "github.com/docker/docker/client"
"github.com/docker/swarmkit/agent/exec"
"github.com/docker/swarmkit/api"
"github.com/docker/swarmkit/log"
"github.com/moby/swarmkit/v2/agent/exec"
"github.com/moby/swarmkit/v2/api"
"github.com/moby/swarmkit/v2/log"
gogotypes "github.com/gogo/protobuf/types"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
Expand Down
10 changes: 5 additions & 5 deletions agent/exec/dockerapi/container.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ import (
"github.com/docker/docker/api/types/volume"
"github.com/docker/go-connections/nat"
"github.com/docker/go-units"
"github.com/docker/swarmkit/agent/exec"
"github.com/docker/swarmkit/api"
"github.com/docker/swarmkit/api/genericresource"
"github.com/docker/swarmkit/api/naming"
"github.com/docker/swarmkit/template"
"github.com/moby/swarmkit/v2/agent/exec"
"github.com/moby/swarmkit/v2/api"
"github.com/moby/swarmkit/v2/api/genericresource"
"github.com/moby/swarmkit/v2/api/naming"
"github.com/moby/swarmkit/v2/template"
gogotypes "github.com/gogo/protobuf/types"
)

Expand Down
2 changes: 1 addition & 1 deletion agent/exec/dockerapi/container_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
enginemount "github.com/docker/docker/api/types/mount"
"github.com/docker/docker/api/types/strslice"
"github.com/docker/go-units"
"github.com/docker/swarmkit/api"
"github.com/moby/swarmkit/v2/api"
gogotypes "github.com/gogo/protobuf/types"
)

Expand Down
6 changes: 3 additions & 3 deletions agent/exec/dockerapi/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ import (
"github.com/docker/docker/api/types/events"
engineapi "github.com/docker/docker/client"
"github.com/docker/go-connections/nat"
"github.com/docker/swarmkit/agent/exec"
"github.com/docker/swarmkit/api"
"github.com/docker/swarmkit/log"
"github.com/moby/swarmkit/v2/agent/exec"
"github.com/moby/swarmkit/v2/api"
"github.com/moby/swarmkit/v2/log"
gogotypes "github.com/gogo/protobuf/types"
"github.com/pkg/errors"
"golang.org/x/time/rate"
Expand Down
6 changes: 3 additions & 3 deletions agent/exec/dockerapi/controller_integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ import (
"testing"

engineapi "github.com/docker/docker/client"
"github.com/docker/swarmkit/agent/exec"
"github.com/docker/swarmkit/api"
"github.com/docker/swarmkit/api/genericresource"
"github.com/moby/swarmkit/v2/agent/exec"
"github.com/moby/swarmkit/v2/api"
"github.com/moby/swarmkit/v2/api/genericresource"
"github.com/stretchr/testify/assert"
)

Expand Down
8 changes: 4 additions & 4 deletions agent/exec/dockerapi/controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ import (
containertypes "github.com/docker/docker/api/types/container"
"github.com/docker/docker/api/types/events"
"github.com/docker/docker/api/types/network"
"github.com/docker/swarmkit/agent/exec"
"github.com/docker/swarmkit/api"
"github.com/docker/swarmkit/identity"
"github.com/docker/swarmkit/log"
"github.com/moby/swarmkit/v2/agent/exec"
"github.com/moby/swarmkit/v2/api"
"github.com/moby/swarmkit/v2/identity"
"github.com/moby/swarmkit/v2/log"
gogotypes "github.com/gogo/protobuf/types"
"github.com/stretchr/testify/assert"
)
Expand Down
8 changes: 4 additions & 4 deletions agent/exec/dockerapi/executor.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ import (

"github.com/docker/docker/api/types/filters"
engineapi "github.com/docker/docker/client"
"github.com/docker/swarmkit/agent/exec"
"github.com/docker/swarmkit/agent/secrets"
"github.com/docker/swarmkit/api"
"github.com/docker/swarmkit/log"
"github.com/moby/swarmkit/v2/agent/exec"
"github.com/moby/swarmkit/v2/agent/secrets"
"github.com/moby/swarmkit/v2/api"
"github.com/moby/swarmkit/v2/log"
)

type executor struct {
Expand Down
2 changes: 1 addition & 1 deletion agent/exec/executor.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package exec
import (
"context"

"github.com/docker/swarmkit/api"
"github.com/moby/swarmkit/v2/api"
)

// Executor provides controllers for tasks.
Expand Down
4 changes: 2 additions & 2 deletions agent/reporter.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (
"reflect"
"sync"

"github.com/docker/swarmkit/api"
"github.com/docker/swarmkit/log"
"github.com/moby/swarmkit/v2/api"
"github.com/moby/swarmkit/v2/log"
)

// StatusReporter receives updates to task status. Method may be called
Expand Down
2 changes: 1 addition & 1 deletion agent/reporter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"sync"
"testing"

"github.com/docker/swarmkit/api"
"github.com/moby/swarmkit/v2/api"
"github.com/stretchr/testify/assert"
)

Expand Down
Loading

0 comments on commit 6068d18

Please sign in to comment.