Skip to content

Commit 7ca6afe

Browse files
authored
Merge pull request #696 from devhindo/fixgolanglint
fix: update GitHub Actions to use latest setup-go and golangci-lint versions; improve error handling in Istio package; fixing golangci-lint failures
2 parents 9fcd633 + 1d77cb1 commit 7ca6afe

File tree

4 files changed

+13
-12
lines changed

4 files changed

+13
-12
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,12 @@ jobs:
1616
name: golangci-lint
1717
runs-on: ubuntu-22.04
1818
steps:
19-
- uses: actions/setup-go@v4
19+
- uses: actions/setup-go@v5
2020
with:
2121
go-version: 1.23
2222
- uses: actions/checkout@v4
2323
- name: golangci-lint
24-
uses: golangci/golangci-lint-action@v3
24+
uses: golangci/golangci-lint-action@v6
2525
with:
2626
# Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version.
2727
version: latest
@@ -38,7 +38,7 @@ jobs:
3838
with:
3939
fetch-depth: 1
4040
- name: Setup Go
41-
uses: actions/setup-go@v4
41+
uses: actions/setup-go@v5
4242
with:
4343
go-version: 1.23
4444
- name: Create cluster using KinD

.github/workflows/e2etests.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ jobs:
4040
yq e -i '.services.istio.version="${{ steps.gettag.outputs.release }}"' ./.github/install/deploy.yaml
4141
cat ./.github/install/deploy.yaml
4242
- name: Uploading file
43-
uses: actions/upload-artifact@v3
43+
uses: actions/upload-artifact@v4
4444
with:
4545
name: patternfile
4646
path: ./.github/install/deploy.yaml
@@ -83,7 +83,7 @@ jobs:
8383
repository: meshery/meshery
8484
token: ${{ secrets.GH_ACCESS_TOKEN }}
8585
- name: DownloadJSON
86-
uses: actions/download-artifact@v3
86+
uses: actions/download-artifact@v4
8787
with:
8888
name: data.json
8989
- name: Add commit SHORT_SHA
@@ -155,7 +155,7 @@ jobs:
155155
yq e -i '.services.prometheus.version="${{ steps.gettag.outputs.release }}"' ./.github/install/deploywithaddons.yaml
156156
cat ./.github/install/deploywithaddons.yaml
157157
- name: Uploading file
158-
uses: actions/upload-artifact@v3
158+
uses: actions/upload-artifact@v4
159159
with:
160160
name: patternfile
161161
path: ./.github/install/deploywithaddons.yaml
@@ -198,7 +198,7 @@ jobs:
198198
repository: meshery/meshery
199199
token: ${{ secrets.GH_ACCESS_TOKEN }}
200200
- name: DownloadJSON
201-
uses: actions/download-artifact@v3
201+
uses: actions/download-artifact@v4
202202
with:
203203
name: data.json
204204
- name: Add commit SHORT_SHA
@@ -270,7 +270,7 @@ jobs:
270270
yq e -i '.services.istioinstallation.settings.istioVersion="${{ steps.gettag.outputs.release }}"' ./.github/install/deploywithsampleapp.yaml
271271
cat ./.github/install/deploywithsampleapp.yaml
272272
- name: Uploading file
273-
uses: actions/upload-artifact@v3
273+
uses: actions/upload-artifact@v4
274274
with:
275275
name: patternfile
276276
path: ./.github/install/deploywithsampleapp.yaml
@@ -313,7 +313,7 @@ jobs:
313313
repository: meshery/meshery
314314
token: ${{ secrets.GH_ACCESS_TOKEN }}
315315
- name: DownloadJSON
316-
uses: actions/download-artifact@v3
316+
uses: actions/download-artifact@v4
317317
with:
318318
name: data.json
319319
- name: Add commit SHORT_SHA

istio/istio.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ package istio
33
import (
44
"context"
55
"fmt"
6+
stderrors "errors"
67

78
"github.com/layer5io/meshery-adapter-library/adapter"
89
"github.com/layer5io/meshery-adapter-library/common"
@@ -214,9 +215,9 @@ func (istio *Istio) ApplyOperation(ctx context.Context, opReq adapter.OperationR
214215
for msg := range responseChan {
215216
switch msg.EventType {
216217
case meshes.EventType_ERROR:
217-
istio.StreamErr(msg, ErrIstioVet(fmt.Errorf(msg.Details)))
218+
istio.StreamErr(msg, ErrIstioVet(stderrors.New(msg.Details)))
218219
case meshes.EventType_WARN:
219-
istio.StreamWarn(msg, ErrIstioVet(fmt.Errorf(msg.Details)))
220+
istio.StreamWarn(msg, ErrIstioVet(stderrors.New(msg.Details)))
220221
default:
221222
istio.StreamInfo(msg)
222223
}

istio/oam.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ func mergeErrors(errs []error) error {
262262
errMsgs = append(errMsgs, err.Error())
263263
}
264264

265-
return fmt.Errorf(strings.Join(errMsgs, "\n"))
265+
return fmt.Errorf("%s", strings.Join(errMsgs, "\n"))
266266
}
267267

268268
func mergeMsgs(strs []string) string {

0 commit comments

Comments
 (0)