From 3d6b98c3da9becc0215c6c23fff841b3578e54c3 Mon Sep 17 00:00:00 2001 From: Wu Sheng Date: Mon, 13 Apr 2026 21:53:30 +0800 Subject: [PATCH 1/6] Bump Go version from 1.24.2 to 1.26 Co-Authored-By: Claude Opus 4.6 (1M context) --- go.mod | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/go.mod b/go.mod index 4230fda..b45a2f0 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/apache/skywalking-cli -go 1.24.2 +go 1.26 require ( github.com/apache/skywalking-swck/operator v0.0.0-20250424112814-f5c5243fcfb2 From 05a5190bc7f810166c24973334632a6a8fe4b844 Mon Sep 17 00:00:00 2001 From: Wu Sheng Date: Mon, 13 Apr 2026 22:10:13 +0800 Subject: [PATCH 2/6] Bump Go version from 1.24.2 to 1.26 - Update go.mod to Go 1.26 - Update CI and Docker workflows to use Go 1.26 - Migrate golangci-lint from v1.64.0 to v2.11.4 with v2 config format Co-Authored-By: Claude Opus 4.6 (1M context) --- .github/workflows/CI.yaml | 8 +-- .github/workflows/publish-docker.yaml | 2 +- .golangci.yml | 91 ++++++++++++++------------- Makefile | 2 +- 4 files changed, 54 insertions(+), 49 deletions(-) diff --git a/.github/workflows/CI.yaml b/.github/workflows/CI.yaml index af4ad72..50ce38a 100644 --- a/.github/workflows/CI.yaml +++ b/.github/workflows/CI.yaml @@ -46,7 +46,7 @@ jobs: - name: Setup Go uses: actions/setup-go@v5 with: - go-version: "1.24" + go-version: "1.26" - name: Check Dependencies License run: make dependency-license @@ -60,7 +60,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v5 with: - go-version: 1.24 + go-version: "1.26" - name: Check code generation run: make check-codegen @@ -94,7 +94,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v5 with: - go-version: 1.24 + go-version: "1.26" - name: Install swctl run: make install DESTDIR=/usr/local/bin @@ -116,7 +116,7 @@ jobs: - name: setup go uses: actions/setup-go@v5 with: - go-version: '1.24' + go-version: "1.26" - name: run unit tests and report coverage working-directory: ./ diff --git a/.github/workflows/publish-docker.yaml b/.github/workflows/publish-docker.yaml index dbc761b..3030c85 100644 --- a/.github/workflows/publish-docker.yaml +++ b/.github/workflows/publish-docker.yaml @@ -43,7 +43,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v4 with: - go-version: 1.24 + go-version: "1.26" - name: Log in to the Container registry uses: docker/login-action@v1.10.0 with: diff --git a/.golangci.yml b/.golangci.yml index 93a77e9..28c9d9e 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -14,47 +14,10 @@ # See the License for the specific language governing permissions and # limitations under the License. -linters-settings: - govet: - enable: - - shadow - gocyclo: - min-complexity: 15 - dupl: - threshold: 200 - goconst: - min-len: 2 - min-occurrences: 2 - misspell: - locale: US - lll: - line-length: 150 - goimports: - local-prefixes: github.com/apache/skywalking-cli - gocritic: - enabled-tags: - - diagnostic - - experimental - - opinionated - - performance - - style - disabled-checks: - - ifElseChain - funlen: - lines: 100 - statements: 50 - whitespace: - multi-if: false - multi-func: false - depguard: - rules: - prevent_cli_in_pkg: - files: ["**/pkg/**/*.go"] - deny: - - pkg: "github.com/urfave/cli/v2" - desc: "github.com/urfave/cli/v2 is not allowed in pkg module" +version: "2" linters: + default: none enable: - bodyclose - dogsled @@ -64,21 +27,63 @@ linters: - goconst - gocritic - gocyclo - - gofmt - - goimports - revive - gosec - - gosimple - govet - ineffassign - lll - misspell - nakedret - staticcheck - - stylecheck - typecheck - unconvert - unparam - unused - whitespace - depguard + settings: + govet: + enable: + - shadow + gocyclo: + min-complexity: 15 + dupl: + threshold: 200 + goconst: + min-len: 2 + min-occurrences: 2 + misspell: + locale: US + lll: + line-length: 150 + gocritic: + enabled-tags: + - diagnostic + - experimental + - opinionated + - performance + - style + disabled-checks: + - ifElseChain + funlen: + lines: 100 + statements: 50 + whitespace: + multi-if: false + multi-func: false + depguard: + rules: + prevent_cli_in_pkg: + files: ["**/pkg/**/*.go"] + deny: + - pkg: "github.com/urfave/cli/v2" + desc: "github.com/urfave/cli/v2 is not allowed in pkg module" + +formatters: + enable: + - gofmt + - goimports + settings: + goimports: + local-prefixes: + - github.com/apache/skywalking-cli diff --git a/Makefile b/Makefile index 09d9725..e5d9eea 100644 --- a/Makefile +++ b/Makefile @@ -59,7 +59,7 @@ deps: @$(GO_GET) -v -t ./... $(GO_LINT): - @$(GO_LINT) version > /dev/null 2>&1 || go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.64.0 + @$(GO_LINT) version > /dev/null 2>&1 || go install github.com/golangci/golangci-lint/cmd/golangci-lint@v2.11.4 $(LICENSE_EYE): @$(LICENSE_EYE) --version > /dev/null 2>&1 || go install github.com/apache/skywalking-eyes/cmd/license-eye@d38fe05 From 3bf6be181f9f38a01808da4b983170dc630b9cb1 Mon Sep 17 00:00:00 2001 From: Wu Sheng Date: Mon, 13 Apr 2026 23:46:34 +0800 Subject: [PATCH 3/6] Fix golangci-lint v2 compatibility for CI build - Fix Go module path for golangci-lint v2 install in Makefile - Remove typecheck linter (not available in v2) - Move exclusions config under linters key per v2 schema - Add exclusion rules to match v1 default behavior Co-Authored-By: Claude Opus 4.6 (1M context) --- .golangci.yml | 19 ++++++++++++++++++- Makefile | 2 +- 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/.golangci.yml b/.golangci.yml index 28c9d9e..f636f7a 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -35,7 +35,6 @@ linters: - misspell - nakedret - staticcheck - - typecheck - unconvert - unparam - unused @@ -78,6 +77,24 @@ linters: deny: - pkg: "github.com/urfave/cli/v2" desc: "github.com/urfave/cli/v2 is not allowed in pkg module" + exclusions: + generated: lax + presets: + - comments + - common-false-positives + - legacy + - std-error-handling + rules: + - linters: [revive] + text: "exported: exported .* should have comment" + - linters: [gosec] + text: "G104" + - linters: [errcheck] + text: "Error return value of .((os\\.)?std(out|err)\\..*|.*Close|.*Flush|os\\.Remove(All)?|.*printf?|os\\.(Un)?Setenv). is not checked" + paths: + - third_party$ + - builtin$ + - examples$ formatters: enable: diff --git a/Makefile b/Makefile index e5d9eea..d321b1a 100644 --- a/Makefile +++ b/Makefile @@ -59,7 +59,7 @@ deps: @$(GO_GET) -v -t ./... $(GO_LINT): - @$(GO_LINT) version > /dev/null 2>&1 || go install github.com/golangci/golangci-lint/cmd/golangci-lint@v2.11.4 + @$(GO_LINT) version > /dev/null 2>&1 || go install github.com/golangci/golangci-lint/v2/cmd/golangci-lint@v2.11.4 $(LICENSE_EYE): @$(LICENSE_EYE) --version > /dev/null 2>&1 || go install github.com/apache/skywalking-eyes/cmd/license-eye@d38fe05 From 128c1dcb85bb274d3997c81ec4c8d7d44e58e744 Mon Sep 17 00:00:00 2001 From: Wu Sheng Date: Tue, 14 Apr 2026 06:47:54 +0800 Subject: [PATCH 4/6] Bump Go version in Dockerfile from 1.24 to 1.26 Co-Authored-By: Claude Opus 4.6 (1M context) --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 2bd2213..e4c833e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -13,7 +13,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -FROM golang:1.24 AS builder +FROM golang:1.26 AS builder ARG VERSION From e43057676b2a525f8fcfac6dee2b06fb37c78719 Mon Sep 17 00:00:00 2001 From: Wu Sheng Date: Tue, 14 Apr 2026 07:09:18 +0800 Subject: [PATCH 5/6] Update OAP version to latest commit for e2e tests Co-Authored-By: Claude Opus 4.6 (1M context) --- .github/workflows/CI.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/CI.yaml b/.github/workflows/CI.yaml index 50ce38a..b8960e4 100644 --- a/.github/workflows/CI.yaml +++ b/.github/workflows/CI.yaml @@ -88,7 +88,7 @@ jobs: strategy: matrix: oap: - - b55fa2a5193618cdd7d699ad96fa20ceca9d507e + - 42c613bea94999a6cc8e805ed4c8c7659f3a735c steps: - uses: actions/checkout@v4 - name: Set up Go From 88d3df702e7957e672e937d91bc3cc5806c5d384 Mon Sep 17 00:00:00 2001 From: Wu Sheng Date: Tue, 14 Apr 2026 07:23:46 +0800 Subject: [PATCH 6/6] Update expected layer list with new OAP layers Add GENAI, BANYANDB, ENVOY_AI_GATEWAY, and VIRTUAL_GENAI layers to match the latest OAP version. Co-Authored-By: Claude Opus 4.6 (1M context) --- test/cases/basic/expected/layer-list.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/cases/basic/expected/layer-list.yml b/test/cases/basic/expected/layer-list.yml index a099277..360f638 100644 --- a/test/cases/basic/expected/layer-list.yml +++ b/test/cases/basic/expected/layer-list.yml @@ -21,6 +21,8 @@ - FAAS - MESH_CP - AWS_GATEWAY +- GENAI +- BANYANDB - NGINX - SO11Y_JAVA_AGENT - ACTIVEMQ @@ -39,7 +41,9 @@ - CACHE - OS_WINDOWS - SO11Y_GO_AGENT +- ENVOY_AI_GATEWAY - MESH_DP +- VIRTUAL_GENAI - SO11Y_OAP - DATABASE - OS_LINUX