Skip to content

Commit cb07734

Browse files
authored
Merge 0.4.x to development (#57)
1 parent 9fcafe3 commit cb07734

File tree

24 files changed

+778
-267
lines changed

24 files changed

+778
-267
lines changed

.github/workflows/ci.yaml

Lines changed: 21 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,17 @@ jobs:
2121
name: Lint
2222
runs-on: ubuntu-latest
2323
steps:
24-
- uses: actions/checkout@v2
24+
- uses: actions/checkout@v3
2525

26-
- uses: actions/setup-go@v2
26+
- uses: actions/setup-go@v3
2727
with:
28-
go-version: "1.14"
28+
go-version: "1.17"
2929

30-
- uses: actions/cache@v2
30+
- uses: actions/cache@v3
3131
with:
32-
path: ~/go/pkg/mod
32+
path: |
33+
~/.cache/go-build
34+
~/go/pkg/mod
3335
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
3436
restore-keys: |
3537
${{ runner.os }}-go-
@@ -41,15 +43,17 @@ jobs:
4143
name: Test
4244
runs-on: ubuntu-latest
4345
steps:
44-
- uses: actions/checkout@v2
46+
- uses: actions/checkout@v3
4547

46-
- uses: actions/setup-go@v2
48+
- uses: actions/setup-go@v3
4749
with:
48-
go-version: "1.14"
50+
go-version: "1.17"
4951

50-
- uses: actions/cache@v2
52+
- uses: actions/cache@v3
5153
with:
52-
path: ~/go/pkg/mod
54+
path: |
55+
~/.cache/go-build
56+
~/go/pkg/mod
5357
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
5458
restore-keys: |
5559
${{ runner.os }}-go-
@@ -61,15 +65,17 @@ jobs:
6165
name: Build docker images
6266
runs-on: ubuntu-latest
6367
steps:
64-
- uses: actions/checkout@v2
68+
- uses: actions/checkout@v3
6569

66-
- uses: actions/setup-go@v2
70+
- uses: actions/setup-go@v3
6771
with:
68-
go-version: "1.14"
72+
go-version: "1.17"
6973

70-
- uses: actions/cache@v2
74+
- uses: actions/cache@v3
7175
with:
72-
path: ~/go/pkg/mod
76+
path: |
77+
~/.cache/go-build
78+
~/go/pkg/mod
7379
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
7480
restore-keys: |
7581
${{ runner.os }}-go-

.github/workflows/release.yaml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -62,15 +62,17 @@ jobs:
6262
run: |
6363
echo "SCALER_LABEL=${{ steps.release_info.outputs.REF_TAG }}" >> $GITHUB_ENV
6464
65-
- uses: actions/checkout@v2
65+
- uses: actions/checkout@v3
6666

67-
- uses: actions/setup-go@v2
67+
- uses: actions/setup-go@v3
6868
with:
69-
go-version: "1.14"
69+
go-version: "1.17"
7070

71-
- uses: actions/cache@v2
71+
- uses: actions/cache@v3
7272
with:
73-
path: ~/go/pkg/mod
73+
path: |
74+
~/.cache/go-build
75+
~/go/pkg/mod
7476
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
7577
restore-keys: |
7678
${{ runner.os }}-go-

.golangci.yml

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,9 @@ linters:
1818
- deadcode
1919
- goconst
2020
- gofmt
21-
- golint
21+
- revive
2222
- gosimple
2323
- ineffassign
24-
- interfacer
2524
- misspell
2625
- staticcheck
2726
- unconvert
@@ -30,8 +29,8 @@ linters:
3029
- vetshadow
3130
- errcheck
3231
- govet
33-
- structcheck
3432
- typecheck
33+
- gocritic
3534

3635
run:
3736

@@ -45,10 +44,3 @@ issues:
4544
- "comment on"
4645
- "error should be the last"
4746
- "should have comment"
48-
49-
exclude-rules:
50-
51-
# list of excluded linters applied on test files
52-
- path: _test\.go
53-
linters:
54-
- goconst

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ lint: modules
8181
| tr -d \" \
8282
| wget -O $(GOPATH)/bin/impi -qi -
8383
@test -e $(GOPATH)/bin/golangci-lint || \
84-
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(GOPATH)/bin v1.24.0
84+
(curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(GOPATH)/bin v1.41.1)
8585

8686
@echo Verifying imports...
8787
chmod +x $(GOPATH)/bin/impi && $(GOPATH)/bin/impi \
@@ -101,7 +101,7 @@ fmt:
101101

102102
.PHONY: test-undockerized
103103
test-undockerized: modules
104-
go test -v ./pkg/... -p 1
104+
go test -race -v ./pkg/... -p 1
105105

106106
.PHONY: test
107107
test:

cmd/autoscaler/Dockerfile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414
#
15-
FROM golang:1.14.3-alpine3.11 AS builder
15+
16+
FROM gcr.io/iguazio/golang:1.17-alpine3.15 AS builder
1617

1718
RUN apk --update --no-cache add \
1819
git \
@@ -29,6 +30,6 @@ COPY . .
2930

3031
RUN GOOS=linux GOARCH=amd64 go build -a -installsuffix cgo -ldflags="-s -w" -o autoscaler cmd/autoscaler/main.go
3132

32-
FROM alpine:3.11
33+
FROM gcr.io/iguazio/alpine:3.16
3334

3435
COPY --from=builder /autoscaler/autoscaler /home/v3io/bin/autoscaler

cmd/autoscaler/app/autoscaler.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ illegal under applicable law, and the grant of the foregoing license
1717
under the Apache 2.0 license is conditioned upon your compliance with
1818
such restriction.
1919
*/
20+
2021
package app
2122

2223
import (

cmd/autoscaler/main.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ illegal under applicable law, and the grant of the foregoing license
1717
under the Apache 2.0 license is conditioned upon your compliance with
1818
such restriction.
1919
*/
20+
2021
package main
2122

2223
import (

cmd/dlx/Dockerfile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414
#
15-
FROM golang:1.14.3-alpine3.11 AS builder
15+
16+
FROM gcr.io/iguazio/golang:1.17-alpine3.15 AS builder
1617

1718
RUN apk --update --no-cache add \
1819
git \
@@ -29,6 +30,6 @@ COPY . .
2930

3031
RUN GOOS=linux GOARCH=amd64 go build -a -installsuffix cgo -ldflags="-s -w" -o dlx cmd/dlx/main.go
3132

32-
FROM alpine:3.11
33+
FROM gcr.io/iguazio/alpine:3.16
3334

3435
COPY --from=builder /dlx/dlx /home/v3io/bin/dlx

cmd/dlx/app/dlx.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ illegal under applicable law, and the grant of the foregoing license
1717
under the Apache 2.0 license is conditioned upon your compliance with
1818
such restriction.
1919
*/
20+
2021
package app
2122

2223
import (

cmd/dlx/main.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ illegal under applicable law, and the grant of the foregoing license
1717
under the Apache 2.0 license is conditioned upon your compliance with
1818
such restriction.
1919
*/
20+
2021
package main
2122

2223
import (

0 commit comments

Comments
 (0)