Skip to content

Commit 435b7e4

Browse files
authored
Merge pull request #378 from niladrih/v3.5.x
Cherry-pick CI fixes to v3.5.x
2 parents 6390e28 + 1cd9b6f commit 435b7e4

File tree

20 files changed

+115
-103
lines changed

20 files changed

+115
-103
lines changed

.github/workflows/build.yml

Lines changed: 24 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333
runs-on: ubuntu-latest
3434
steps:
3535
- name: Checkout
36-
uses: actions/checkout@v2
36+
uses: actions/checkout@v3
3737

3838
- name: Shellcheck
3939
uses: reviewdog/action-shellcheck@v1
@@ -52,12 +52,12 @@ jobs:
5252
needs: ['lint']
5353
steps:
5454
- name: Checkout
55-
uses: actions/checkout@v2
55+
uses: actions/checkout@v3
5656

57-
- name: Set up Go 1.14
58-
uses: actions/setup-go@v3
57+
- name: Set up Go 1.19
58+
uses: actions/setup-go@v4
5959
with:
60-
go-version: '1.14'
60+
go-version: '1.19'
6161
check-latest: true
6262

6363
- name: Set up golint
@@ -74,12 +74,12 @@ jobs:
7474
needs: ['lint']
7575
steps:
7676
- name: Checkout
77-
uses: actions/checkout@v2
77+
uses: actions/checkout@v3
7878

79-
- name: Set up Go 1.14
80-
uses: actions/setup-go@v3
79+
- name: Set up Go 1.19
80+
uses: actions/setup-go@v4
8181
with:
82-
go-version: '1.14'
82+
go-version: '1.19'
8383
check-latest: true
8484

8585
- name: Set up golint
@@ -96,12 +96,12 @@ jobs:
9696
needs: ['lint']
9797
steps:
9898
- name: Checkout
99-
uses: actions/checkout@v2
99+
uses: actions/checkout@v3
100100

101-
- name: Set up Go 1.14
102-
uses: actions/setup-go@v3
101+
- name: Set up Go 1.19
102+
uses: actions/setup-go@v4
103103
with:
104-
go-version: '1.14'
104+
go-version: '1.19'
105105
check-latest: true
106106

107107
- name: Set up golint
@@ -120,7 +120,7 @@ jobs:
120120
needs: ['feature-test', 'resiliency-test', 'functional-test']
121121
steps:
122122
- name: Checkout
123-
uses: actions/checkout@v2
123+
uses: actions/checkout@v3
124124

125125
- name: Set Image Org
126126
# sets the default IMAGE_ORG to openebs
@@ -144,55 +144,54 @@ jobs:
144144
145145
- name: Docker meta
146146
id: docker_meta
147-
uses: crazy-max/ghaction-docker-meta@v1
147+
uses: docker/metadata-action@v4
148148
with:
149149
# add each registry to which the image needs to be pushed here
150150
images: |
151151
${{ env.IMAGE_ORG }}/jiva
152152
quay.io/${{ env.IMAGE_ORG }}/jiva
153153
ghcr.io/${{ env.IMAGE_ORG }}/jiva
154-
tag-latest: false
155-
tag-custom-only: true
156-
tag-custom: |
157-
${{ env.IMAGE_TAG }}
154+
tags: |
155+
type=raw,value=latest,enable=false
156+
type=raw,value=${{ env.IMAGE_TAG }}
158157
159158
- name: Print Tag info
160159
run: |
161160
echo "${{ steps.docker_meta.outputs.tags }}"
162161
163162
- name: Set up QEMU
164-
uses: docker/setup-qemu-action@v1
163+
uses: docker/setup-qemu-action@v2
165164
with:
166165
platforms: all
167166

168167
- name: Set up Docker Buildx
169168
id: buildx
170-
uses: docker/setup-buildx-action@v1
169+
uses: docker/setup-buildx-action@v2
171170
with:
172171
version: v0.5.1
173172

174173
- name: Login to Docker Hub
175-
uses: docker/login-action@v1
174+
uses: docker/login-action@v2
176175
with:
177176
username: ${{ secrets.DOCKERHUB_USERNAME }}
178177
password: ${{ secrets.DOCKERHUB_TOKEN }}
179178

180179
- name: Login to Quay
181-
uses: docker/login-action@v1
180+
uses: docker/login-action@v2
182181
with:
183182
registry: quay.io
184183
username: ${{ secrets.QUAY_USERNAME }}
185184
password: ${{ secrets.QUAY_TOKEN }}
186185

187186
- name: Login to GHCR
188-
uses: docker/login-action@v1
187+
uses: docker/login-action@v2
189188
with:
190189
registry: ghcr.io
191190
username: ${{ github.actor }}
192191
password: ${{ secrets.GITHUB_TOKEN }}
193192

194193
- name: Build & Push Image
195-
uses: docker/build-push-action@v2
194+
uses: docker/build-push-action@v4
196195
with:
197196
context: .
198197
file: ./package/jiva.Dockerfile

.github/workflows/pull_request.yml

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
runs-on: ubuntu-latest
3333
steps:
3434
- name: Checkout
35-
uses: actions/checkout@v2
35+
uses: actions/checkout@v3
3636

3737
- name: Shellcheck
3838
uses: reviewdog/action-shellcheck@v1
@@ -42,26 +42,26 @@ jobs:
4242
path: '.'
4343
pattern: '*.sh'
4444
exclude: './vendor/*'
45-
45+
4646
feature-test:
4747
runs-on: ubuntu-latest
4848
needs: ['lint']
4949
steps:
5050
- name: Checkout
51-
uses: actions/checkout@v2
51+
uses: actions/checkout@v3
5252

53-
- name: Set up Go 1.14
54-
uses: actions/setup-go@v3
53+
- name: Set up Go 1.19
54+
uses: actions/setup-go@v4
5555
with:
56-
go-version: '1.14'
56+
go-version: '1.19'
5757
check-latest: true
5858

5959
- name: Set up golint
6060
run: go get -u golang.org/x/lint/golint
6161

6262
- name: Build
6363
run: make build
64-
64+
6565
- name: Test
6666
run: make test_features
6767

@@ -70,20 +70,20 @@ jobs:
7070
needs: ['lint']
7171
steps:
7272
- name: Checkout
73-
uses: actions/checkout@v2
73+
uses: actions/checkout@v3
7474

75-
- name: Set up Go 1.14
76-
uses: actions/setup-go@v3
75+
- name: Set up Go 1.19
76+
uses: actions/setup-go@v4
7777
with:
78-
go-version: '1.14'
78+
go-version: '1.19'
7979
check-latest: true
8080

8181
- name: Set up golint
8282
run: go get -u golang.org/x/lint/golint
8383

8484
- name: Build
8585
run: make build
86-
86+
8787
- name: Test
8888
run: make test_resiliency
8989

@@ -92,45 +92,45 @@ jobs:
9292
needs: ['lint']
9393
steps:
9494
- name: Checkout
95-
uses: actions/checkout@v2
95+
uses: actions/checkout@v3
9696

97-
- name: Set up Go 1.14
98-
uses: actions/setup-go@v3
97+
- name: Set up Go 1.19
98+
uses: actions/setup-go@v4
9999
with:
100-
go-version: '1.14'
100+
go-version: '1.19'
101101
check-latest: true
102102

103103
- name: Set up golint
104104
run: go get -u golang.org/x/lint/golint
105105

106106
- name: Build
107107
run: make build
108-
108+
109109
- name: Test
110110
run: |
111111
sudo docker network create --subnet=172.18.0.0/16 stg-net;
112112
make test_functional;
113-
113+
114114
jiva:
115115
runs-on: ubuntu-latest
116116
needs: ['feature-test', 'resiliency-test', 'functional-test']
117117
steps:
118118
- name: Checkout
119-
uses: actions/checkout@v2
119+
uses: actions/checkout@v3
120120

121121
- name: Set up QEMU
122-
uses: docker/setup-qemu-action@v1
122+
uses: docker/setup-qemu-action@v2
123123
with:
124124
platforms: all
125125

126126
- name: Set up Docker Buildx
127127
id: buildx
128-
uses: docker/setup-buildx-action@v1
128+
uses: docker/setup-buildx-action@v2
129129
with:
130130
version: v0.5.1
131131

132132
- name: Build Image
133-
uses: docker/build-push-action@v2
133+
uses: docker/build-push-action@v4
134134
with:
135135
context: .
136136
file: ./package/jiva.Dockerfile

.github/workflows/release.yml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
runs-on: ubuntu-latest
2626
steps:
2727
- name: Checkout
28-
uses: actions/checkout@v1
28+
uses: actions/checkout@v3
2929

3030
- name: Set Image Org
3131
# sets the default IMAGE_ORG to openebs
@@ -43,58 +43,58 @@ jobs:
4343
id: date
4444
run: |
4545
echo "::set-output name=DATE::$(date -u +'%Y-%m-%dT%H:%M:%S%Z')"
46-
46+
4747
- name: Docker meta
4848
id: docker_meta
49-
uses: crazy-max/ghaction-docker-meta@v1
49+
uses: docker/metadata-action@v4
5050
with:
5151
# add each registry to which the image needs to be pushed here
5252
images: |
5353
${{ env.IMAGE_ORG }}/jiva
5454
quay.io/${{ env.IMAGE_ORG }}/jiva
5555
ghcr.io/${{ env.IMAGE_ORG }}/jiva
56-
tag-latest: true
57-
tag-semver: |
58-
{{version}}
56+
tags: |
57+
type=raw,value=latest,enable=true
58+
type=raw,value={{version}}
5959
6060
- name: Print Tag info
6161
run: |
6262
echo "${{ steps.docker_meta.outputs.tags }}"
6363
echo "RELEASE TAG: ${IMAGE_TAG}"
6464
6565
- name: Set up QEMU
66-
uses: docker/setup-qemu-action@v1
66+
uses: docker/setup-qemu-action@v2
6767
with:
6868
platforms: all
6969

7070
- name: Set up Docker Buildx
7171
id: buildx
72-
uses: docker/setup-buildx-action@v1
72+
uses: docker/setup-buildx-action@v2
7373
with:
7474
version: v0.5.1
7575

7676
- name: Login to Docker Hub
77-
uses: docker/login-action@v1
77+
uses: docker/login-action@v2
7878
with:
7979
username: ${{ secrets.DOCKERHUB_USERNAME }}
8080
password: ${{ secrets.DOCKERHUB_TOKEN }}
8181

8282
- name: Login to Quay
83-
uses: docker/login-action@v1
83+
uses: docker/login-action@v2
8484
with:
8585
registry: quay.io
8686
username: ${{ secrets.QUAY_USERNAME }}
8787
password: ${{ secrets.QUAY_TOKEN }}
8888

8989
- name: Login to GHCR
90-
uses: docker/login-action@v1
90+
uses: docker/login-action@v2
9191
with:
9292
registry: ghcr.io
9393
username: ${{ github.actor }}
9494
password: ${{ secrets.GITHUB_TOKEN }}
9595

9696
- name: Build & Push Image
97-
uses: docker/build-push-action@v2
97+
uses: docker/build-push-action@v4
9898
with:
9999
context: .
100100
file: ./package/jiva.Dockerfile

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
*.pyc
55
*.pyo
66
*.swp
7+
**/.idea
78

89
integration/.idea/
910
integration/.tox/

Makefile

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -75,14 +75,9 @@ _build_check_docker:
7575
&& exit 1; \
7676
fi;
7777

78-
79-
mod: go.mod go.sum
80-
@echo "INFO:\tVendor update"
81-
@GO111MODULE=on go mod download
82-
@GO111MODULE=on go mod vendor
83-
84-
deps: _build_check_go _build_check_docker mod
78+
deps: _build_check_go _build_check_docker
8579
@echo "INFO:\tVerifying dependencies for jiva"
80+
go mod tidy
8681

8782
_run_ci: test_functional test_features test_resiliency
8883
@echo "INFO:\tRun ci over jiva image"

app/backing_disable.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
//go:build !qcow
12
// +build !qcow
23

34
/*

ci/suite.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ verify_controller_quorum() {
271271
verify_go_routine_leak() {
272272
echo "---------------------Verify goroutine leak-------------------------"
273273
i=0
274-
no_of_goroutine=$(curl http://$2:9502/debug/pprof/goroutine?debug=1 | grep goroutine | awk '{ print $4}')
274+
no_of_goroutine=$(curl http://$2:9502/debug/pprof/goroutine?debug=1 | grep "goroutine profile: total" | awk '{ print $4}')
275275
passed=0
276276
req_cnt=0
277277
while [ "$i" != 30 ]; do
@@ -280,7 +280,7 @@ verify_go_routine_leak() {
280280
sleep 2
281281
done
282282
wait
283-
new_no_of_goroutine=$(curl http://$2:9502/debug/pprof/goroutine?debug=1 | grep goroutine | awk '{ print $4}')
283+
new_no_of_goroutine=$(curl http://$2:9502/debug/pprof/goroutine?debug=1 | grep "goroutine profile: total" | awk '{ print $4}')
284284
old=`expr $no_of_goroutine + 3`
285285
if [ $new_no_of_goroutine -lt $old ]; then
286286
echo "Verify_go_routine for " $1 "--passed"

controller/rest/stats.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ import (
2626
"github.com/rancher/go-rancher/api"
2727
)
2828

29-
//ListJournal flushes operation journal (replica read/write, ping, etc.) accumulated since previous flush
29+
// ListJournal flushes operation journal (replica read/write, ping, etc.) accumulated since previous flush
3030
func (s *Server) ListJournal(rw http.ResponseWriter, req *http.Request) error {
3131
var input JournalInput
3232
apiContext := api.GetApiContext(req)

error-inject/default.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
//go:build !debug
12
// +build !debug
23

34
/*

0 commit comments

Comments
 (0)