Skip to content

Commit

Permalink
chore: update golang toolchain to v1.19 (#90)
Browse files Browse the repository at this point in the history
* chore: update golang toolchain to v1.19

* update e2e modules

* fixed devcontainer definition
  • Loading branch information
jadarsie committed Feb 22, 2023
1 parent 83f4d9b commit d9c969c
Show file tree
Hide file tree
Showing 292 changed files with 40,844 additions and 23,401 deletions.
27 changes: 12 additions & 15 deletions .devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,13 @@
{
"name": "Go for aks-engine",
"image": "mcr.microsoft.com/oss/azcu/go-dev:v1.34.7",
"extensions": [
"ms-vscode.go"
],
"runArgs": [
"--cap-add=SYS_PTRACE",
"--security-opt",
"seccomp=unconfined"
],
"postCreateCommand": "mkdir -p /go/src/github.com/Azure && ln -sf /workspaces/aks-engine-azurestack /go/src/github.com/Azure/aks-engine-azurestack",
"settings": {
"go.gopath": "/go"
}
}
"name": "Go for aks-engine-azurestack",
"image": "mcr.microsoft.com/oss/azcu/go-dev:v1.36.1",
"customizations": {
"vscode": {
"extensions": [
"golang.go",
"eamodio.gitlens"
]
}
},
"postCreateCommand": "mkdir -p /go/src/github.com/Azure && ln -sf /workspaces/aks-engine-azurestack /go/src/github.com/Azure/aks-engine-azurestack"
}
2 changes: 1 addition & 1 deletion .github/workflows/nightly-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
docker run --rm \
-v ${GITHUB_WORKSPACE}:/go/src/github.com/Azure/aks-engine-azurestack \
-w /go/src/github.com/Azure/aks-engine-azurestack \
mcr.microsoft.com/oss/azcu/go-dev:v1.34.7 make dist
mcr.microsoft.com/oss/azcu/go-dev:v1.36.1 make dist
- name: Rename outputs
run: |
mkdir ./outputs
Expand Down
4 changes: 4 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,7 @@ linters:
linters-settings:
govet:
check-shadowing: true
staticcheck:
# Deprecated: use the global `run.go` instead.
go: "1.19"
checks: ["all", "-SA1019"]
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: mcr.microsoft.com/oss/azcu/go-dev:v1.34.7
image: mcr.microsoft.com/oss/azcu/go-dev:v1.36.1

jobs:
- job: unit_tests
Expand Down
2 changes: 1 addition & 1 deletion .pipelines/vhd-builder.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: $(Year:yyyy).$(DayOfYear).$(Rev:r)_Ubuntu_$(UBUNTU_SKU)
trigger: none

variables:
CONTAINER_IMAGE: 'mcr.microsoft.com/oss/azcu/go-dev:v1.34.7'
CONTAINER_IMAGE: 'mcr.microsoft.com/oss/azcu/go-dev:v1.36.1'

pool:
vmImage: 'Ubuntu 20.04'
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ ifeq ($(GITTAG),)
GITTAG := $(VERSION_SHORT)
endif

DEV_ENV_IMAGE := mcr.microsoft.com/oss/azcu/go-dev:v1.34.7
DEV_ENV_IMAGE := mcr.microsoft.com/oss/azcu/go-dev:v1.36.1
DEV_ENV_WORK_DIR := /aks-engine-azurestack
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
6 changes: 5 additions & 1 deletion cmd/get_logs.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ import (
"strings"
"time"

"golang.org/x/text/cases"
"golang.org/x/text/language"

"github.com/Azure/aks-engine-azurestack/pkg/api"
"github.com/Azure/aks-engine-azurestack/pkg/helpers"
"github.com/Azure/aks-engine-azurestack/pkg/helpers/ssh"
Expand Down Expand Up @@ -287,7 +290,8 @@ func getClusterNodes(glc *getLogsCmd, kubeClient kubernetes.NodeLister) (nodes [
}
for _, node := range nodeList.Items {
if isMasterNode(node.Name, glc.cs.Properties.GetMasterVMPrefix()) || !glc.controlPlaneOnly {
switch api.OSType(strings.Title(node.Status.NodeInfo.OperatingSystem)) {
caser := cases.Title(language.English)
switch api.OSType(caser.String(node.Status.NodeInfo.OperatingSystem)) {
case api.Linux:
nodes = append(nodes, &ssh.RemoteHost{
URI: node.Name, Port: 22, OperatingSystem: api.Linux, AuthConfig: glc.linuxAuthConfig, Jumpbox: glc.jumpbox})
Expand Down
6 changes: 5 additions & 1 deletion cmd/rotate_certs.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ import (
"strings"
"time"

"golang.org/x/text/cases"
"golang.org/x/text/language"

ops "github.com/Azure/aks-engine-azurestack/cmd/rotatecerts"
"github.com/Azure/aks-engine-azurestack/pkg/api"
"github.com/Azure/aks-engine-azurestack/pkg/api/common"
Expand Down Expand Up @@ -346,7 +349,8 @@ func (rcc *rotateCertsCmd) getAgentNodes() (nodeMap, error) {
Port: 22,
Jumpbox: rcc.jumpbox,
}
switch api.OSType(strings.Title(nli.Status.NodeInfo.OperatingSystem)) {
caser := cases.Title(language.English)
switch api.OSType(caser.String(nli.Status.NodeInfo.OperatingSystem)) {
case api.Linux:
node.OperatingSystem = api.Linux
node.AuthConfig = rcc.linuxAuthConfig
Expand Down
6 changes: 3 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/Azure/aks-engine-azurestack

go 1.17
go 1.19

require (
github.com/Azure/azure-sdk-for-go v43.0.0+incompatible
Expand Down Expand Up @@ -32,6 +32,7 @@ require (
github.com/x-cray/logrus-prefixed-formatter v0.5.2
golang.org/x/crypto v0.0.0-20210220033148-5ea612d1eb83
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9
golang.org/x/text v0.7.0
gopkg.in/go-playground/validator.v9 v9.25.0
gopkg.in/ini.v1 v1.41.0
k8s.io/api v0.21.10
Expand Down Expand Up @@ -70,9 +71,8 @@ require (
github.com/smartystreets/goconvey v0.0.0-20190731233626-505e41936337 // indirect
golang.org/x/net v0.0.0-20211209124913-491a49abca63 // indirect
golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d // indirect
golang.org/x/sys v0.0.0-20210426230700-d19ff857e887 // indirect
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f // indirect
golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d // indirect
golang.org/x/text v0.3.6 // indirect
golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba // indirect
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect
google.golang.org/appengine v1.6.5 // indirect
Expand Down
6 changes: 4 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -381,8 +381,9 @@ golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7w
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210426230700-d19ff857e887 h1:dXfMednGJh/SUUFjTLsWJz3P+TQt9qnR11GgeI3vWKs=
golang.org/x/sys v0.0.0-20210426230700-d19ff857e887/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f h1:v4INt8xihDGvnrfjMDVXGxw9wrfxYyCjk0KbXjhR55s=
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d h1:SZxvLBoTP5yHO3Frd4z4vrF+DBX9vMVanchswa69toE=
Expand All @@ -392,8 +393,9 @@ golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.6 h1:aRYxNxv6iGQlyVaZmk6ZgYEDa+Jg18DxebPSrd6bg1M=
golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.7.0 h1:4BRB4x83lYWy72KwLD/qYDuTu7q9PjSagHvijDw7cLo=
golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
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 = "mcr.microsoft.com/oss/azcu/go-dev:v1.34.7"
$DEV_ENV_IMAGE = "mcr.microsoft.com/oss/azcu/go-dev:v1.36.1"
$DEV_ENV_WORK_DIR = "/aks-engine"

# Ensure docker is configured for linux containers
Expand Down
12 changes: 7 additions & 5 deletions pkg/engine/templates_generated.go

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

Loading

0 comments on commit d9c969c

Please sign in to comment.