Skip to content
This repository has been archived by the owner on Oct 24, 2023. It is now read-only.

chore: update go compiler to 1.14.2 #2839

Merged
merged 16 commits into from
Apr 22, 2020
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion .devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "Go for aks-engine",
"image": "quay.io/deis/go-dev:v1.25.0-go113",
"image": "quay.io/deis/go-dev:v1.26.2",
"extensions": [
"ms-vscode.go"
],
Expand Down
2 changes: 1 addition & 1 deletion .go-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.13.0
1.14.2
3 changes: 1 addition & 2 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
run:
deadline: 3m
deadline: 5m
skip-dirs:
- test/i18n
- pkg/test
Expand All @@ -10,7 +10,6 @@ run:
linters:
disable-all: true
enable:
- gofmt
- goimports
- gosimple
- golint
Expand Down
2 changes: 1 addition & 1 deletion .pipelines/pr-e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ pr:
resources:
containers:
- container: dev1
image: quay.io/deis/go-dev:v1.25.0-go113
image: quay.io/deis/go-dev:v1.26.2

jobs:
- job: unit_tests
Expand Down
2 changes: 1 addition & 1 deletion .pipelines/vhd-builder-ubuntu-gen2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ trigger: none
# - POST a new SKU to azure marketplace

variables:
CONTAINER_IMAGE: 'quay.io/deis/go-dev:v1.25.0-go113'
CONTAINER_IMAGE: 'quay.io/deis/go-dev:v1.26.2'

phases:
- phase: build_vhd
Expand Down
2 changes: 1 addition & 1 deletion .pipelines/vhd-builder.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ trigger: none
# - POST a new SKU to azure marketplace

variables:
CONTAINER_IMAGE: 'quay.io/deis/go-dev:v1.25.0-go113'
CONTAINER_IMAGE: 'quay.io/deis/go-dev:v1.26.2'

phases:
- phase: build_vhd
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ ifeq ($(GITTAG),)
GITTAG := $(VERSION_SHORT)
endif

DEV_ENV_IMAGE := quay.io/deis/go-dev:v1.25.0-go113
DEV_ENV_IMAGE := quay.io/deis/go-dev:v1.26.2
DEV_ENV_WORK_DIR := /aks-engine
DEV_ENV_OPTS := --rm -v $(GOPATH)/pkg/mod:/go/pkg/mod -v $(CURDIR):$(DEV_ENV_WORK_DIR) -w $(DEV_ENV_WORK_DIR) $(DEV_ENV_VARS)
DEV_ENV_CMD := docker run $(DEV_ENV_OPTS) $(DEV_ENV_IMAGE)
Expand Down
2 changes: 1 addition & 1 deletion docs/community/developer-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ This guide explains how to set up your environment for development on AKS Engine
## Prerequisites

- [`git`](https://git-scm.com/)
- [`go`](https://golang.org/dl) 1.13
- [`go`](https://golang.org/dl) 1.14.2 or later
- [`dep`](https://github.com/golang/dep) 0.5.1 or later
- An [Azure](https://azure.microsoft.com/en-us/) subscription
- [`kubectl`](https://kubernetes.io/docs/tasks/tools/install-kubectl/)
Expand Down
5 changes: 3 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/Azure/aks-engine

go 1.13
go 1.14

require (
github.com/Azure/azure-sdk-for-go v41.0.0+incompatible
Expand Down Expand Up @@ -49,8 +49,9 @@ require (
github.com/spf13/pflag v1.0.3
github.com/x-cray/logrus-prefixed-formatter v0.5.2
golang.org/x/crypto v0.0.0-20191206172530-e9b2fee46413
golang.org/x/net v0.0.0-20190620200207-3b0461eec859 // indirect
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45 // indirect
golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4
golang.org/x/sync v0.0.0-20190423024810-112230192c58
golang.org/x/sys v0.0.0-20191104094858-e8c54fb511f6 // indirect
golang.org/x/time v0.0.0-20190921001708-c4c64cad1fd0 // indirect
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 // indirect
Expand Down
9 changes: 4 additions & 5 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -138,10 +138,6 @@ github.com/x-cray/logrus-prefixed-formatter v0.5.2 h1:00txxvfBM9muc0jiLIEAkAcIMJ
github.com/x-cray/logrus-prefixed-formatter v0.5.2/go.mod h1:2duySbKsL6M18s5GU7VPsoEPHyzalCE06qoARUCeBBE=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2 h1:VklqNMn3ovrHsnt90PveolxSbWFaJdECFbxSq0Mqo2M=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/crypto v0.0.0-20191105034135-c7e5f84aec59 h1:PyXRxSVbvzDGuqYXjHndV7xDzJ7w2K8KD9Ef8GB7KOE=
golang.org/x/crypto v0.0.0-20191105034135-c7e5f84aec59/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
golang.org/x/crypto v0.0.0-20200302210943-78000ba7a073 h1:xMPOj6Pz6UipU1wXLkrtqpHbR0AVFnyPEQq/wRWz9lM=
golang.org/x/crypto v0.0.0-20200323165209-0ec3e9974c59 h1:3zb4D3T4G8jdExgVU/95+vQXfpEPiMdCaZgmGVxjNHM=
golang.org/x/crypto v0.0.0-20191206172530-e9b2fee46413 h1:ULYEB3JvPRE/IfO+9uO7vKV/xzVTO7XPAwm8xbf4w2g=
golang.org/x/crypto v0.0.0-20191206172530-e9b2fee46413/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
Expand All @@ -151,11 +147,15 @@ golang.org/x/net v0.0.0-20190311183353-d8887717615a h1:oWX7TPOiFAMXLq8o0ikBYfCJV
golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3 h1:0GoQqolDA55aaLxZyTzK/Y2ePZzZTUrRacwib7cNsYQ=
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/net v0.0.0-20190620200207-3b0461eec859 h1:R/3boaszxrf1GEUWTVDzSKVwLmSJpwZ1yqXm8j0v2QI=
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45 h1:SVwTIAaPC2U/AvvLNZ2a7OVsmBpC8L5BlwK1whH3hm0=
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4 h1:YUO/7uOKsKeq9UokNS62b8FYywz3ker1l1vDZRCRefw=
golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20190423024810-112230192c58 h1:8gQV6CLnAEikrhgkHFbMAEhagSSnXWGV915qUMm9mrU=
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
Expand Down Expand Up @@ -194,7 +194,6 @@ k8s.io/api v0.0.0-20190222213804-5cb15d344471 h1:MzQGt8qWQCR+39kbYRd0uQqsvSidpYq
k8s.io/api v0.0.0-20190222213804-5cb15d344471/go.mod h1:iuAfoD4hCxJ8Onx9kaTIt30j7jUFS00AXQi6QMi99vA=
k8s.io/apimachinery v0.0.0-20190221213512-86fb29eff628 h1:UYfHH+KEF88OTg+GojQUwFTNxbxwmoktLwutUzR0GPg=
k8s.io/apimachinery v0.0.0-20190221213512-86fb29eff628/go.mod h1:ccL7Eh7zubPUSh9A3USN90/OzHNSVN6zxzde07TDCL0=
k8s.io/apimachinery v0.17.3 h1:f+uZV6rm4/tHE7xXgLyToprg6xWairaClGVkm2t8omg=
k8s.io/client-go v10.0.0+incompatible h1:F1IqCqw7oMBzDkqlcBymRq1450wD0eNqLE9jzUrIi34=
k8s.io/client-go v10.0.0+incompatible/go.mod h1:7vJpHMYJwNQCWgzmNV+VYUl1zCObLyodBc8nIyt8L5s=
k8s.io/klog v1.0.0 h1:Pt+yjF5aB1xDSVbau4VsWe+dQNzA0qv1LlXdC2dF6Q8=
Expand Down
2 changes: 1 addition & 1 deletion hack/tools/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ $(LOCALBIN)/ginkgo:
GOBIN=$(LOCALBIN) $(GO) get github.com/onsi/ginkgo/ginkgo/...@v1.10.1

$(LOCALBIN)/golangci-lint:
curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b $(LOCALBIN) v1.23.7
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(LOCALBIN) v1.24.0

$(LOCALBIN)/pub:
GOBIN=$(LOCALBIN) $(GO) get github.com/devigned/pub/...@v0.2.0
Expand Down
2 changes: 1 addition & 1 deletion makedev.ps1
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
$DEV_ENV_IMAGE = "quay.io/deis/go-dev:v1.25.0-go113"
$DEV_ENV_IMAGE = "quay.io/deis/go-dev:v1.26.2"
$DEV_ENV_WORK_DIR = "/aks-engine"

# Ensure docker is configured for linux containers
Expand Down
7 changes: 1 addition & 6 deletions pkg/api/agentPoolOnlyApi/v20180331/apiloader_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,13 @@ import (
)

func TestRegisterHandler(t *testing.T) {
//RegisterFailHandler(Fail)
RunSpecsWithReporters(t, "apiloader", "v20180331 Suite")
}

var _ = Describe("v20180331 test suite", func() {
locale := gotext.NewLocale(path.Join("../../..", "../../..", "translations"), "en_US")
i18n.Initialize(locale)
apiloader := &api.Apiloader{
Translator: &i18n.Translator{
Locale: locale,
},
}
apiloader := &api.Apiloader{}
k8sVersions := common.GetAllSupportedKubernetesVersions(false, false)
defaultK8sVersion := common.GetDefaultKubernetesVersion(false)

Expand Down
12 changes: 6 additions & 6 deletions pkg/api/vlabs/validate_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3873,7 +3873,7 @@ func TestAgentPoolProfile_ValidateAvailabilityProfile(t *testing.T) {
cs := getK8sDefaultContainerService(false)
agentPoolProfiles := cs.Properties.AgentPoolProfiles
agentPoolProfiles[0].SinglePlacementGroup = to.BoolPtr(true)
expectedMsg := fmt.Sprintf("singlePlacementGroup is only supported with VirtualMachineScaleSets")
expectedMsg := "singlePlacementGroup is only supported with VirtualMachineScaleSets"
if err := cs.Properties.validateAgentPoolProfiles(true); err.Error() != expectedMsg {
t.Errorf("expected error with message : %s, but got %s", expectedMsg, err.Error())
}
Expand All @@ -3884,7 +3884,7 @@ func TestAgentPoolProfile_ValidateAvailabilityProfile(t *testing.T) {
cs := getK8sDefaultContainerService(false)
agentPoolProfiles := cs.Properties.AgentPoolProfiles
agentPoolProfiles[0].SinglePlacementGroup = to.BoolPtr(false)
expectedMsg := fmt.Sprintf("singlePlacementGroup is only supported with VirtualMachineScaleSets")
expectedMsg := "singlePlacementGroup is only supported with VirtualMachineScaleSets"
if err := cs.Properties.validateAgentPoolProfiles(true); err.Error() != expectedMsg {
t.Errorf("expected error with message : %s, but got %s", expectedMsg, err.Error())
}
Expand Down Expand Up @@ -3934,7 +3934,7 @@ func TestAgentPoolProfile_ValidateVirtualMachineScaleSet(t *testing.T) {
cs.Properties.MasterProfile.AvailabilityProfile = VirtualMachineScaleSets
cs.Properties.MasterProfile.VnetSubnetID = "vnet"
cs.Properties.MasterProfile.FirstConsecutiveStaticIP = "10.10.10.240"
expectedMsg := fmt.Sprintf("when masterProfile's availabilityProfile is VirtualMachineScaleSets and a vnetSubnetID is specified, the firstConsecutiveStaticIP should be empty and will be determined by an offset from the first IP in the vnetCidr")
expectedMsg := "when masterProfile's availabilityProfile is VirtualMachineScaleSets and a vnetSubnetID is specified, the firstConsecutiveStaticIP should be empty and will be determined by an offset from the first IP in the vnetCidr"
if err := cs.Properties.validateMasterProfile(false); err.Error() != expectedMsg {
t.Errorf("expected error with message : %s, but got %s", expectedMsg, err.Error())
}
Expand All @@ -3946,7 +3946,7 @@ func TestAgentPoolProfile_ValidateVirtualMachineScaleSet(t *testing.T) {
cs.Properties.MasterProfile.AvailabilityProfile = VirtualMachineScaleSets
agentPoolProfiles := cs.Properties.AgentPoolProfiles
agentPoolProfiles[0].AvailabilityProfile = AvailabilitySet
expectedMsg := fmt.Sprintf("VirtualMachineScaleSets for master profile must be used together with virtualMachineScaleSets for agent profiles. Set \"availabilityProfile\" to \"VirtualMachineScaleSets\" for agent profiles")
expectedMsg := "VirtualMachineScaleSets for master profile must be used together with virtualMachineScaleSets for agent profiles. Set \"availabilityProfile\" to \"VirtualMachineScaleSets\" for agent profiles"
if err := cs.Properties.validateMasterProfile(false); err.Error() != expectedMsg {
t.Errorf("expected error with message : %s, but got %s", expectedMsg, err.Error())
}
Expand Down Expand Up @@ -3976,7 +3976,7 @@ func TestAgentPoolProfile_ValidateVirtualMachineScaleSet(t *testing.T) {
agentPoolProfiles := cs.Properties.AgentPoolProfiles
agentPoolProfiles[0].AvailabilityProfile = VirtualMachineScaleSets
agentPoolProfiles[1].AvailabilityProfile = AvailabilitySet
expectedMsg := fmt.Sprintf("mixed mode availability profiles are not allowed. Please set either VirtualMachineScaleSets or AvailabilitySet in availabilityProfile for all agent pools")
expectedMsg := "mixed mode availability profiles are not allowed. Please set either VirtualMachineScaleSets or AvailabilitySet in availabilityProfile for all agent pools"
if err := cs.Properties.validateAgentPoolProfiles(false); err.Error() != expectedMsg {
t.Errorf("expected error with message : %s, but got %s", expectedMsg, err.Error())
}
Expand Down Expand Up @@ -4028,7 +4028,7 @@ func TestMasterProfile_ValidateAuditDEnabled(t *testing.T) {
masterProfile.AuditDEnabled = to.BoolPtr(true)
switch distro {
case RHEL:
expectedMsg := fmt.Sprintf("You have enabled auditd for master vms, but you did not specify an Ubuntu-based distro.")
expectedMsg := "You have enabled auditd for master vms, but you did not specify an Ubuntu-based distro."
if err := cs.Properties.validateMasterProfile(false); err.Error() != expectedMsg {
t.Errorf("expected error with message : %s, but got %s", expectedMsg, err.Error())
}
Expand Down
4 changes: 2 additions & 2 deletions pkg/engine/armvariables.go
Original file line number Diff line number Diff line change
Expand Up @@ -613,8 +613,8 @@ func getK8sAgentVars(cs *api.ContainerService, profile *api.AgentPoolProfile) ma
agentVars[agentSubnetName] = fmt.Sprintf("[parameters('%s')]", agentVnetSubnetID)
agentVars[agentVnetParts] = fmt.Sprintf("[split(parameters('%sVnetSubnetID'),'/subnets/')]", agentName)
} else {
agentVars[agentVnetSubnetID] = fmt.Sprintf("[variables('vnetSubnetID')]")
agentVars[agentSubnetName] = fmt.Sprintf("[variables('subnetName')]")
agentVars[agentVnetSubnetID] = "[variables('vnetSubnetID')]"
agentVars[agentSubnetName] = "[variables('subnetName')]"
}

agentVars[agentSubnetResourceGroup] = fmt.Sprintf("[split(variables('%sVnetSubnetID'), '/')[4]]", agentName)
Expand Down
12 changes: 6 additions & 6 deletions pkg/engine/engine.go
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@ func getDCOSWindowsAgentCustomAttributes(profile *api.AgentPoolProfile) string {
if len(profile.OSType) > 0 {
attrstring = fmt.Sprintf("os:%s", profile.OSType)
} else {
attrstring = fmt.Sprintf("os:windows")
attrstring = "os:windows"
}
if len(profile.Ports) > 0 {
attrstring += ";public_ip:yes"
Expand Down Expand Up @@ -848,19 +848,19 @@ func getClusterAutoscalerAddonFuncMap(addon api.KubernetesAddon, cs *api.Contain
},
"GetVolumeMounts": func() string {
if cs.Properties.OrchestratorProfile.KubernetesConfig.UseManagedIdentity {
return fmt.Sprintf("\n - mountPath: /var/lib/waagent/\n name: waagent\n readOnly: true")
return "\n - mountPath: /var/lib/waagent/\n name: waagent\n readOnly: true"
}
return ""
},
"GetVolumes": func() string {
if cs.Properties.OrchestratorProfile.KubernetesConfig.UseManagedIdentity {
return fmt.Sprintf("\n - hostPath:\n path: /var/lib/waagent/\n name: waagent")
return "\n - hostPath:\n path: /var/lib/waagent/\n name: waagent"
}
return ""
},
"GetHostNetwork": func() string {
if cs.Properties.OrchestratorProfile.KubernetesConfig.UseManagedIdentity {
return fmt.Sprintf("\n hostNetwork: true")
return "\n hostNetwork: true"
}
return ""
},
Expand Down Expand Up @@ -1247,7 +1247,7 @@ func getSSHPublicKeysPowerShell(linuxProfile *api.LinuxProfile) string {

func getWindowsMasterSubnetARMParam(masterProfile *api.MasterProfile) string {
if masterProfile != nil && masterProfile.IsCustomVNET() {
return fmt.Sprintf("',parameters('vnetCidr'),'")
return "',parameters('vnetCidr'),'"
}
return fmt.Sprintf("',parameters('masterSubnet'),'")
return "',parameters('masterSubnet'),'"
}