Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: update GitHub Actions to use latest setup-go and golangci-lint versions; improve error handling in Istio package; fixing golangci-lint failures #696

Merged
merged 3 commits into from
Dec 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ jobs:
name: golangci-lint
runs-on: ubuntu-22.04
steps:
- uses: actions/setup-go@v4
- uses: actions/setup-go@v5
with:
go-version: 1.23
- uses: actions/checkout@v4
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
uses: golangci/golangci-lint-action@v6
with:
# Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version.
version: latest
Expand All @@ -38,7 +38,7 @@ jobs:
with:
fetch-depth: 1
- name: Setup Go
uses: actions/setup-go@v4
uses: actions/setup-go@v5
with:
go-version: 1.23
- name: Create cluster using KinD
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/e2etests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
yq e -i '.services.istio.version="${{ steps.gettag.outputs.release }}"' ./.github/install/deploy.yaml
cat ./.github/install/deploy.yaml
- name: Uploading file
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: patternfile
path: ./.github/install/deploy.yaml
Expand Down Expand Up @@ -83,7 +83,7 @@ jobs:
repository: meshery/meshery
token: ${{ secrets.GH_ACCESS_TOKEN }}
- name: DownloadJSON
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: data.json
- name: Add commit SHORT_SHA
Expand Down Expand Up @@ -155,7 +155,7 @@ jobs:
yq e -i '.services.prometheus.version="${{ steps.gettag.outputs.release }}"' ./.github/install/deploywithaddons.yaml
cat ./.github/install/deploywithaddons.yaml
- name: Uploading file
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: patternfile
path: ./.github/install/deploywithaddons.yaml
Expand Down Expand Up @@ -198,7 +198,7 @@ jobs:
repository: meshery/meshery
token: ${{ secrets.GH_ACCESS_TOKEN }}
- name: DownloadJSON
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: data.json
- name: Add commit SHORT_SHA
Expand Down Expand Up @@ -270,7 +270,7 @@ jobs:
yq e -i '.services.istioinstallation.settings.istioVersion="${{ steps.gettag.outputs.release }}"' ./.github/install/deploywithsampleapp.yaml
cat ./.github/install/deploywithsampleapp.yaml
- name: Uploading file
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: patternfile
path: ./.github/install/deploywithsampleapp.yaml
Expand Down Expand Up @@ -313,7 +313,7 @@ jobs:
repository: meshery/meshery
token: ${{ secrets.GH_ACCESS_TOKEN }}
- name: DownloadJSON
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: data.json
- name: Add commit SHORT_SHA
Expand Down
5 changes: 3 additions & 2 deletions istio/istio.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package istio
import (
"context"
"fmt"
stderrors "errors"

"github.com/layer5io/meshery-adapter-library/adapter"
"github.com/layer5io/meshery-adapter-library/common"
Expand Down Expand Up @@ -214,9 +215,9 @@ func (istio *Istio) ApplyOperation(ctx context.Context, opReq adapter.OperationR
for msg := range responseChan {
switch msg.EventType {
case meshes.EventType_ERROR:
istio.StreamErr(msg, ErrIstioVet(fmt.Errorf(msg.Details)))
istio.StreamErr(msg, ErrIstioVet(stderrors.New(msg.Details)))
case meshes.EventType_WARN:
istio.StreamWarn(msg, ErrIstioVet(fmt.Errorf(msg.Details)))
istio.StreamWarn(msg, ErrIstioVet(stderrors.New(msg.Details)))
default:
istio.StreamInfo(msg)
}
Expand Down
2 changes: 1 addition & 1 deletion istio/oam.go
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ func mergeErrors(errs []error) error {
errMsgs = append(errMsgs, err.Error())
}

return fmt.Errorf(strings.Join(errMsgs, "\n"))
return fmt.Errorf("%s", strings.Join(errMsgs, "\n"))
}

func mergeMsgs(strs []string) string {
Expand Down
Loading