Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/release/v22.11' into release/v22.11
Browse files Browse the repository at this point in the history
  • Loading branch information
Vincent Planchenault committed Dec 19, 2022
2 parents b3454aa + 583d6f6 commit 3e66eab
Show file tree
Hide file tree
Showing 125 changed files with 3,208 additions and 3,751 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/bugs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:

strategy:
matrix:
go: [ 1.17.12, 1.18.4 ]
go: [ 1.18.4 ]
tags: [ debug, tunnel ]

runs-on: ubuntu-latest
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:

strategy:
matrix:
go: [ 1.17.12, 1.18.4 ]
go: [ 1.18.4 ]
tags: [ releasetags, debug, tunnel ]

runs-on: ubuntu-latest
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/go-mac.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:

strategy:
matrix:
go: [ 1.17.12, 1.18.4, 1.19 ]
go: [ 1.18.4, 1.19 ]
tags: [ releasetags, tunnel ]

runs-on: macos-latest
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/go-releases.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:

strategy:
matrix:
go: [ 1.17.12, 1.18.4 ]
go: [ 1.18.4 ]
tags: [ releasetags ]

runs-on: ubuntu-latest
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:

strategy:
matrix:
go: [ 1.17.12, 1.18.4 ]
go: [ 1.18.4 ]
tags: [ releasetags, debug, tunnel ]

runs-on: ubuntu-latest
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:

strategy:
matrix:
go: [ 1.17.12, 1.18.4 ]
go: [ 1.18.4 ]
tags: [ releasetags, integration, allintegration ]

runs-on: ubuntu-latest
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/licenses.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ on:
- 'release/**'

env:
GOVERSION: '1.17.12' # The Go version to download (if necessary) and use.
GOVERSION: '1.18.4' # The Go version to download (if necessary) and use.
PROTOCVERSION: 3.17.3

jobs:
Expand Down
12 changes: 6 additions & 6 deletions Dockerfile.current
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ ARG LANG=C.UTF-8
ENV DEBIAN_FRONTEND noninteractive
ENV BUILD_ENV docker
ENV BRANCH_NAME develop
ENV GOVERSION 1.17.12
ENV GOVERSION 1.18.4
ENV PROTOVERSION 3.17.3

RUN apt-get update -y \
Expand All @@ -17,11 +17,11 @@ wget unzip apt-utils
WORKDIR /tmp

# ----------------------
# Install GO 1.17.12
# Install GO 1.18.4
# ----------------------
RUN wget --no-check-certificate https://dl.google.com/go/go1.17.12.linux-amd64.tar.gz \
&& tar -C /usr/local -xzf go1.17.12.linux-amd64.tar.gz \
&& rm /tmp/go1.17.12.linux-amd64.tar.gz
RUN wget --no-check-certificate https://dl.google.com/go/go1.18.4.linux-amd64.tar.gz \
&& tar -C /usr/local -xzf go1.18.4.linux-amd64.tar.gz \
&& rm /tmp/go1.18.4.linux-amd64.tar.gz
ENV PATH $PATH:/usr/local/go/bin:/go/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin

# ----------------------
Expand Down Expand Up @@ -85,7 +85,7 @@ RUN cd /opt && ./build-safescale-local.sh

# --

FROM golang:1.17.12-alpine
FROM golang:1.18.4-alpine
LABEL maintainer="CS SI"
ARG http_proxy=""
ARG https_proxy=""
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ common: begin ground getdevdeps mod sdk generate

versioncut:
@printf "%b" "$(OK_COLOR)$(INFO_STRING) Go version check$(NO_COLOR)\n";
@(($(GO) version | grep go1.19) || ($(GO) version | grep go1.18) || ($(GO) version | grep go1.17)) || (printf "%b" "$(ERROR_COLOR)$(ERROR_STRING) Minimum go version is 1.17 ! $(NO_COLOR)\n" && false);
@(($(GO) version | grep go1.19) || ($(GO) version | grep go1.18)) || (printf "%b" "$(ERROR_COLOR)$(ERROR_STRING) Minimum go version is 1.17 ! $(NO_COLOR)\n" && false);

begin: versioncut
@printf "%b" "$(OK_COLOR)$(INFO_STRING) Build begins, branch $$(git rev-parse --abbrev-ref HEAD), commit $$(git log --format="%H" -n 1), go '$$($(GO) version)', protoc '$$(protoc --version)' ...$(NO_COLOR)\n";
Expand Down
2 changes: 1 addition & 1 deletion build/create-docker-ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ fi
stamp=$(date +"%s")

[ -z "$BRANCH_NAME" ] && BRANCH_NAME=$(git rev-parse --abbrev-ref HEAD)
[ -z "$GOVERSION" ] && GOVERSION=1.17.12
[ -z "$GOVERSION" ] && GOVERSION=1.18.4
[ -z "$PROTOVERSION" ] && PROTOVERSION=3.17.3

[ -z "$TENANT" ] && {
Expand Down
2 changes: 1 addition & 1 deletion build/create-docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ fi
stamp=$(date +"%s")

[ -z "$BRANCH_NAME" ] && BRANCH_NAME=$(git rev-parse --abbrev-ref HEAD)
[ -z "$GOVERSION" ] && GOVERSION=1.17.12
[ -z "$GOVERSION" ] && GOVERSION=1.18.4
[ -z "$PROTOVERSION" ] && PROTOVERSION=3.17.3

BRANCH_NAME=$BRANCH_NAME PROTOVERSION=$PROTOVERSION GOVERSION=$GOVERSION COMMITSHA=$COMMITSHA envsubst <Dockerfile >Dockerfile.$stamp
Expand Down
20 changes: 20 additions & 0 deletions build/rules/ruleguard.rules.hardened.go
Original file line number Diff line number Diff line change
Expand Up @@ -606,3 +606,23 @@ func jsonUnMarshalIgnored(m dsl.Matcher) {
).
Report("json unmarshalling errors cannot be ignored")
}

func removeDebugCode(m dsl.Matcher) {
m.Match(
"logrus.Warningf($*_, $*_)",
"logrus.Warning($*_, $x)",
"logrus.Warningf($*_)",
"logrus.Warning($*_)",
).
Report("REMOVE debug code before a release")
}

func removeMoreDebugCode(m dsl.Matcher) {
m.Match(
"logrus.WithContext($*_).Warningf($*_, $*_)",
"logrus.WithContext($*_).Warning($*_, $x)",
"logrus.WithContext($*_).Warningf($*_)",
"logrus.WithContext($*_).Warning($*_)",
).
Report("REMOVE ctx debug code before a release")
}
10 changes: 10 additions & 0 deletions build/rules/ruleguard.rules.style.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,3 +82,13 @@ func removeDebugCode(m dsl.Matcher) {
).
Report("REMOVE debug code before a release")
}

func removeMoreDebugCode(m dsl.Matcher) {
m.Match(
"logrus.WithContext($*_).Warningf($*_, $*_)",
"logrus.WithContext($*_).Warning($*_, $x)",
"logrus.WithContext($*_).Warningf($*_)",
"logrus.WithContext($*_).Warning($*_)",
).
Report("REMOVE ctx debug code before a release")
}
9 changes: 8 additions & 1 deletion cli/safescale/commands/network.go
Original file line number Diff line number Diff line change
Expand Up @@ -1352,7 +1352,14 @@ var subnetInspect = cli.Command{
}

mapped["state_label"] = subnetstate.Enum(mapped["state"].(float64)).String()
mapped["gateway-failover"] = len(mapped["gateways"].(map[string]string)) > 1
mapped["gateway-failover"] = false
if gws, ok := mapped["gateways"]; ok {
if ok {
if gws != nil {
mapped["gateway-failover"] = len(mapped["gateways"].(map[string]string)) > 1
}
}
}
return clitools.SuccessResponse(mapped)
},
}
Expand Down
2 changes: 1 addition & 1 deletion common.mk
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
VERSION=22.11.0
VERSION=22.11.1
export VERSION

ifeq ($(MAKE_LEVEL),)
Expand Down
2 changes: 1 addition & 1 deletion create-local-cover-docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ fi

stamp=`date +"%s"`

[ -z "$GOVERSION" ] && GOVERSION=1.17.12
[ -z "$GOVERSION" ] && GOVERSION=1.18.4
[ -z "$PROTOVERSION" ] && PROTOVERSION=3.17.3

BRANCH_NAME=$VERNAME PROTOVERSION=$PROTOVERSION GOVERSION=$GOVERSION envsubst <Dockerfile.cover.local > Dockerfile.$stamp
Expand Down
2 changes: 1 addition & 1 deletion create-local-docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ fi

stamp=`date +"%s"`

[ -z "$GOVERSION" ] && GOVERSION=1.17.12
[ -z "$GOVERSION" ] && GOVERSION=1.18.4
[ -z "$PROTOVERSION" ] && PROTOVERSION=3.17.3

BRANCH_NAME=$VERNAME PROTOVERSION=$PROTOVERSION GOVERSION=$GOVERSION envsubst <Dockerfile.local > Dockerfile.$stamp
Expand Down
8 changes: 4 additions & 4 deletions doc/build/DEBIAN_BUILD.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ $ sudo apt-get update -y
$ sudo apt-get install -y build-essential make wget unzip vim git
```

## Install GO 1.17.12
## Install GO 1.18.4
```bash
$ wget https://dl.google.com/go/go1.17.12.linux-amd64.tar.gz
$ sudo tar -C /usr/local -xzf go1.17.12.linux-amd64.tar.gz
$ rm ./go1.17.12.linux-amd64.tar.gz
$ wget https://dl.google.com/go/go1.18.4.linux-amd64.tar.gz
$ sudo tar -C /usr/local -xzf go1.18.4.linux-amd64.tar.gz
$ rm ./go1.18.4.linux-amd64.tar.gz
```

## Install Protoc 3.17.3
Expand Down
2 changes: 1 addition & 1 deletion doc/build/MACOS_BUILD.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ $ ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/maste
```

## Install go
Should be at least `go` version 1.17; at the time this doc is written, it's 1.17.12.
Should be at least `go` version 1.18; at the time this doc is written, it's 1.18.4.
```bash
$ brew update
$ brew install golang
Expand Down
8 changes: 4 additions & 4 deletions doc/build/UBUNTU_BUILD.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ $ sudo apt-get update -y
$ sudo apt-get install -y build-essential make wget unzip vim git
```

## Install GO 1.17.12
## Install GO 1.18.4
```bash
$ wget https://dl.google.com/go/go1.17.12.linux-amd64.tar.gz
$ sudo tar -C /usr/local -xzf go1.17.12.linux-amd64.tar.gz
$ rm ./go1.17.12.linux-amd64.tar.gz
$ wget https://dl.google.com/go/go1.18.4.linux-amd64.tar.gz
$ sudo tar -C /usr/local -xzf go1.18.4.linux-amd64.tar.gz
$ rm ./go1.18.4.linux-amd64.tar.gz
```

## Install Protoc 3.17.3
Expand Down
2 changes: 1 addition & 1 deletion doc/build/golang.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

Safescale is intended to be built with the latest available version of the Go toolchain.

Safescale should build and operate correctly with any go version >= 1.17.
Safescale should build and operate correctly with any go version >= 1.18.
35 changes: 18 additions & 17 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
module github.com/CS-SI/SafeScale/v22

go 1.17
go 1.18

require (
github.com/Masterminds/sprig/v3 v3.2.2
github.com/antihax/optional v1.0.0
github.com/aws/aws-sdk-go v1.44.121
github.com/aws/aws-sdk-go v1.44.155
github.com/davecgh/go-spew v1.1.1
github.com/deckarep/golang-set v1.8.0
github.com/denisbrodbeck/machineid v1.0.1
Expand All @@ -14,7 +14,7 @@ require (
github.com/farmergreg/rfsnotify v0.0.0-20200716145600-b37be6e4177f
github.com/felixge/fgprof v0.9.3
github.com/go-ozzo/ozzo-validation/v4 v4.3.0
github.com/gofrs/uuid v4.3.0+incompatible
github.com/gofrs/uuid v4.3.1+incompatible
github.com/gojuno/minimock/v3 v3.0.10
github.com/golang/protobuf v1.5.2
github.com/google/gofuzz v1.2.0
Expand All @@ -35,7 +35,7 @@ require (
github.com/pkg/sftp v1.13.5
github.com/quasilyte/go-ruleguard/dsl v0.3.21
github.com/sanity-io/litter v1.5.5
github.com/schollz/progressbar/v3 v3.11.0
github.com/schollz/progressbar/v3 v3.12.2
github.com/sethvargo/go-password v0.2.0
github.com/sirupsen/logrus v1.9.0
github.com/spf13/viper v1.11.0
Expand All @@ -44,21 +44,22 @@ require (
github.com/zserge/metric v0.1.0
golang.org/x/crypto v0.0.0-20220411220226-7b82a4e95df4
golang.org/x/exp v0.0.0-20210916165020-5cb4fee858ee
golang.org/x/net v0.0.0-20220909164309-bea034e7d591
golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1
golang.org/x/net v0.4.0
golang.org/x/oauth2 v0.0.0-20221014153046-6fdb5e3db783
golang.org/x/sync v0.1.0
golang.org/x/sys v0.0.0-20221010170243-090e33056c14
golang.org/x/term v0.0.0-20220722155259-a9ba230a4035
golang.org/x/text v0.4.0
golang.org/x/sys v0.3.0
golang.org/x/term v0.3.0
golang.org/x/text v0.5.0
gomodules.xyz/stow v0.2.4
google.golang.org/api v0.101.0
google.golang.org/grpc v1.50.1
google.golang.org/api v0.104.0
google.golang.org/grpc v1.51.0
google.golang.org/protobuf v1.28.1
gopkg.in/fsnotify.v1 v1.4.7
)

require (
cloud.google.com/go/compute v1.10.0 // indirect
cloud.google.com/go/compute v1.13.0 // indirect
cloud.google.com/go/compute/metadata v0.2.2 // indirect
github.com/Masterminds/goutils v1.1.1 // indirect
github.com/Masterminds/semver/v3 v3.1.1 // indirect
github.com/StackExchange/wmi v0.0.0-20190523213315-cbe66965904d // indirect
Expand All @@ -79,15 +80,15 @@ require (
github.com/google/pprof v0.0.0-20211214055906-6f57359322fd // indirect
github.com/google/uuid v1.3.0 // indirect
github.com/googleapis/enterprise-certificate-proxy v0.2.0 // indirect
github.com/googleapis/gax-go/v2 v2.6.0 // indirect
github.com/googleapis/gax-go/v2 v2.7.0 // indirect
github.com/hashicorp/hcl v1.0.0 // indirect
github.com/huandu/xstrings v1.3.1 // indirect
github.com/imdario/mergo v0.3.11 // indirect
github.com/itchyny/timefmt-go v0.1.4 // indirect
github.com/jmespath/go-jmespath v0.4.0 // indirect
github.com/keybase/go-ps v0.0.0-20190827175125-91aafc93ba19 // indirect
github.com/kr/fs v0.1.0 // indirect
github.com/mattn/go-runewidth v0.0.13 // indirect
github.com/mattn/go-runewidth v0.0.14 // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.1 // indirect
github.com/mitchellh/colorstring v0.0.0-20190213212951-d06e56a500db // indirect
github.com/mitchellh/copystructure v1.0.0 // indirect
Expand All @@ -102,7 +103,7 @@ require (
github.com/prometheus/client_model v0.2.0 // indirect
github.com/prometheus/common v0.33.0 // indirect
github.com/prometheus/procfs v0.7.3 // indirect
github.com/rivo/uniseg v0.2.0 // indirect
github.com/rivo/uniseg v0.4.3 // indirect
github.com/russross/blackfriday/v2 v2.1.0 // indirect
github.com/shirou/gopsutil v2.20.9+incompatible // indirect
github.com/shopspring/decimal v1.2.0 // indirect
Expand All @@ -111,9 +112,9 @@ require (
github.com/spf13/jwalterweatherman v1.1.0 // indirect
github.com/spf13/pflag v1.0.5 // indirect
github.com/subosito/gotenv v1.2.0 // indirect
go.opencensus.io v0.23.0 // indirect
go.opencensus.io v0.24.0 // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/genproto v0.0.0-20221018160656-63c7b68cfc55 // indirect
google.golang.org/genproto v0.0.0-20221206210731-b1a01be3a5f6 // indirect
gopkg.in/ini.v1 v1.66.4 // indirect
gopkg.in/natefinch/lumberjack.v2 v2.0.0 // indirect
gopkg.in/tomb.v2 v2.0.0-20161208151619-d5d1b5820637 // indirect
Expand Down
Loading

0 comments on commit 3e66eab

Please sign in to comment.