Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[18.09 backport] Bump to golang 1.12.9 #2901

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
# Needed to install go
OS: linux
ARCH: amd64
GOVERSION: 1.10.3
GOVERSION: 1.12
# Needed to install protoc
PROTOC_VERSION: 3.6.1

Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# NOTE(dperny): for some reason, alpine was giving me trouble
FROM golang:1.10.3-stretch
FROM golang:1.12.9-stretch

RUN apt-get update && apt-get install -y make git unzip

Expand Down
12 changes: 5 additions & 7 deletions agent/worker.go
Original file line number Diff line number Diff line change
Expand Up @@ -257,13 +257,11 @@ func reconcileTaskState(ctx context.Context, w *worker, assignments []*api.Assig
}

closeManager := func(tm *taskManager) {
go func(tm *taskManager) {
defer w.closers.Done()
// when a task is no longer assigned, we shutdown the task manager
if err := tm.Close(); err != nil {
log.G(ctx).WithError(err).Error("error closing task manager")
}
}(tm)
defer w.closers.Done()
// when a task is no longer assigned, we shutdown the task manager
if err := tm.Close(); err != nil {
log.G(ctx).WithError(err).Error("error closing task manager")
}

// make an attempt at removing. this is best effort. any errors will be
// retried by the reaper later.
Expand Down
18 changes: 9 additions & 9 deletions api/api.pb.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2491,8 +2491,8 @@ file {
label: LABEL_OPTIONAL
type: TYPE_UINT32
options {
65003: "os.FileMode"
65001: 0
65003: "os.FileMode"
}
json_name: "mode"
}
Expand Down Expand Up @@ -2646,8 +2646,8 @@ file {
type: TYPE_MESSAGE
type_name: ".google.protobuf.Duration"
options {
65011: 1
65001: 0
65011: 1
}
json_name: "delay"
}
Expand Down Expand Up @@ -3090,8 +3090,8 @@ file {
}
}
options {
62023: "PublishMode"
62001: 0
62023: "PublishMode"
}
}
}
Expand Down Expand Up @@ -3790,8 +3790,8 @@ file {
label: LABEL_OPTIONAL
type: TYPE_UINT32
options {
65003: "os.FileMode"
65001: 0
65003: "os.FileMode"
}
json_name: "mode"
}
Expand Down Expand Up @@ -4207,8 +4207,8 @@ file {
}
}
options {
62023: "NodeRole"
62001: 0
62023: "NodeRole"
}
}
syntax: "proto3"
Expand Down Expand Up @@ -8058,8 +8058,8 @@ file {
type: TYPE_MESSAGE
type_name: ".google.protobuf.Duration"
options {
65011: 1
65001: 0
65011: 1
}
json_name: "period"
}
Expand Down Expand Up @@ -9106,11 +9106,11 @@ file {
}
}
options {
63017: 1
63020: 1
63018: 1
63001: 0
63002: 0
63017: 1
63018: 1
63020: 1
}
}
file {
Expand Down
6 changes: 3 additions & 3 deletions api/dispatcher.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions api/logbroker.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion api/raft.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion api/types.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion manager/scheduler/constraint_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ func setupEnv() {
Addr: "186.17.9.41",
},
},
Tasks: make(map[string]*api.Task),
Tasks: make(map[string]*api.Task),
ActiveTasksCountByService: make(map[string]int),
}
}
Expand Down
4 changes: 2 additions & 2 deletions manager/scheduler/nodeinfo.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ type NodeInfo struct {

func newNodeInfo(n *api.Node, tasks map[string]*api.Task, availableResources api.Resources) NodeInfo {
nodeInfo := NodeInfo{
Node: n,
Tasks: make(map[string]*api.Task),
Node: n,
Tasks: make(map[string]*api.Task),
ActiveTasksCountByService: make(map[string]int),
AvailableResources: availableResources.Copy(),
usedHostPorts: make(map[hostPortSpec]struct{}),
Expand Down
6 changes: 3 additions & 3 deletions protobuf/plugin/raftproxy/test/service.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions template/getter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ func TestTemplatedSecret(t *testing.T) {
Data: []byte("SECRET_VAL={{secret \"unknowntarget\"}}\n"),
Templating: &api.Driver{Name: "golang"},
},
expectedErr: `failed to expand templated secret templatedsecret: template: expansion:1:13: executing "expansion" at <secret "unknowntarge...>: error calling secret: secret target unknowntarget not found`,
expectedErr: `failed to expand templated secret templatedsecret: template: expansion:1:13: executing "expansion" at <secret "unknowntarget">: error calling secret: secret target unknowntarget not found`,
task: modifyTask(func(t *api.Task) {
t.Spec = api.TaskSpec{
Runtime: &api.TaskSpec_Container{
Expand All @@ -185,7 +185,7 @@ func TestTemplatedSecret(t *testing.T) {
Data: []byte("CONFIG_VAL={{config \"unknowntarget\"}}\n"),
Templating: &api.Driver{Name: "golang"},
},
expectedErr: `failed to expand templated secret templatedsecret: template: expansion:1:13: executing "expansion" at <config "unknowntarge...>: error calling config: config target unknowntarget not found`,
expectedErr: `failed to expand templated secret templatedsecret: template: expansion:1:13: executing "expansion" at <config "unknowntarget">: error calling config: config target unknowntarget not found`,
task: modifyTask(func(t *api.Task) {
t.Spec = api.TaskSpec{
Runtime: &api.TaskSpec_Container{
Expand Down Expand Up @@ -440,7 +440,7 @@ func TestTemplatedConfig(t *testing.T) {
Data: []byte("SECRET_VAL={{secret \"unknowntarget\"}}\n"),
Templating: &api.Driver{Name: "golang"},
},
expectedErr: `failed to expand templated config templatedconfig: template: expansion:1:13: executing "expansion" at <secret "unknowntarge...>: error calling secret: secret target unknowntarget not found`,
expectedErr: `failed to expand templated config templatedconfig: template: expansion:1:13: executing "expansion" at <secret "unknowntarget">: error calling secret: secret target unknowntarget not found`,
task: modifyTask(func(t *api.Task) {
t.Spec = api.TaskSpec{
Runtime: &api.TaskSpec_Container{
Expand All @@ -465,7 +465,7 @@ func TestTemplatedConfig(t *testing.T) {
Data: []byte("CONFIG_VAL={{config \"unknowntarget\"}}\n"),
Templating: &api.Driver{Name: "golang"},
},
expectedErr: `failed to expand templated config templatedconfig: template: expansion:1:13: executing "expansion" at <config "unknowntarge...>: error calling config: config target unknowntarget not found`,
expectedErr: `failed to expand templated config templatedconfig: template: expansion:1:13: executing "expansion" at <config "unknowntarget">: error calling config: config target unknowntarget not found`,
task: modifyTask(func(t *api.Task) {
t.Spec = api.TaskSpec{
Runtime: &api.TaskSpec_Container{
Expand Down