This is an automated email from the ASF dual-hosted git repository. kezhenxu94 pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/skywalking-satellite.git
The following commit(s) were added to refs/heads/main by this push: new 192c245 build: bump up go to 1.24.6 (#206) 192c245 is described below commit 192c245aa3c8afc3468df7a175bec37e5d98163f Author: kezhenxu94 <kezhenx...@apache.org> AuthorDate: Thu Aug 21 15:03:17 2025 +0700 build: bump up go to 1.24.6 (#206) --- .github/workflows/build-and-test.yaml | 2 +- .github/workflows/e2e-istio.yaml | 4 +- .golangci.yml | 116 +++++++++++---------- CHANGES.md | 2 +- Makefile | 2 +- docker/Dockerfile | 2 +- docs/en/guides/compile/How-to-compile.md | 2 +- go.mod | 4 +- .../satellite/telemetry/metricservice/server.go | 4 +- plugins/client/grpc/client_sniffer.go | 5 +- .../nativeasyncprofiler/async_profiler_service.go | 7 +- plugins/receiver/grpc/nativecds/cds_service.go | 2 +- .../continuous_profiling_service.go | 4 +- .../profiling_report_service.go | 2 +- .../grpc/nativeprocess/process_report_service.go | 2 +- .../receiver/grpc/nativeprofile/profile_service.go | 4 +- test/e2e/base/satellite/Dockerfile | 2 +- 17 files changed, 86 insertions(+), 80 deletions(-) diff --git a/.github/workflows/build-and-test.yaml b/.github/workflows/build-and-test.yaml index 13387b1..c92c906 100644 --- a/.github/workflows/build-and-test.yaml +++ b/.github/workflows/build-and-test.yaml @@ -28,7 +28,7 @@ jobs: timeout-minutes: 30 strategy: matrix: - go-version: [ 1.23 ] + go-version: [ 1.24 ] runner: [ ubuntu, windows ] fail-fast: true steps: diff --git a/.github/workflows/e2e-istio.yaml b/.github/workflows/e2e-istio.yaml index 83e7467..0863e49 100644 --- a/.github/workflows/e2e-istio.yaml +++ b/.github/workflows/e2e-istio.yaml @@ -43,7 +43,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v5 with: - go-version: 1.23 + go-version: 1.24 id: go - uses: actions/checkout@v2 with: @@ -75,7 +75,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v5 with: - go-version: 1.23 + go-version: 1.24 id: go - uses: actions/checkout@v2 with: diff --git a/.golangci.yml b/.golangci.yml index 466d7f1..deda168 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -1,10 +1,10 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # @@ -13,69 +13,75 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +# -linters-settings: - govet: - check-shadowing: true - gocyclo: - min-complexity: 15 - maligned: - suggest-new: true - dupl: - threshold: 200 - goconst: - min-len: 2 - min-occurrences: 2 - misspell: - locale: US - lll: - line-length: 150 - goimports: - local-prefixes: github.com/apache/skywalking-satellite - gocritic: - enabled-tags: - - diagnostic - - experimental - - opinionated - - performance - - style - disabled-checks: - - ifElseChain - funlen: - lines: 100 - statements: 50 - whitespace: - multi-if: false - multi-func: false - +version: "2" linters: enable: - bodyclose - dogsled - dupl - - errcheck - funlen - goconst - gocritic - gocyclo - - gofmt - - goimports - gosec - - gosimple - - govet - - ineffassign - lll - misspell - nakedret - staticcheck - - stylecheck - - typecheck - unconvert - unparam - - unused - whitespace - -service: - golangci-lint-version: 1.20.x - prepare: - - echo "here I can run custom commands, but no preparation needed for this repo" + settings: + dupl: + threshold: 200 + funlen: + lines: 100 + statements: 50 + goconst: + min-len: 2 + min-occurrences: 2 + gocritic: + disabled-checks: + - ifElseChain + enabled-tags: + - diagnostic + - experimental + - opinionated + - performance + - style + gocyclo: + min-complexity: 15 + lll: + line-length: 150 + misspell: + locale: US + whitespace: + multi-if: false + multi-func: false + exclusions: + generated: lax + presets: + - comments + - common-false-positives + - legacy + - std-error-handling + paths: + - third_party$ + - builtin$ + - examples$ +formatters: + enable: + - gofmt + - goimports + settings: + goimports: + local-prefixes: + - github.com/apache/skywalking-satellite + exclusions: + generated: lax + paths: + - third_party$ + - builtin$ + - examples$ diff --git a/CHANGES.md b/CHANGES.md index 1f2716b..819d424 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -6,7 +6,7 @@ Release Notes. ------------------ #### Features * Support native eBPF Access Log protocol. -* Update go library to `1.23`. +* Update go library to `1.24`. * Support async profiler protocol. #### Bug Fixes diff --git a/Makefile b/Makefile index ce81ab2..e2044a5 100644 --- a/Makefile +++ b/Makefile @@ -53,7 +53,7 @@ all: deps verify build gen-docs check .PHONY: tools tools: - $(GO_LINT) version || curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(GO_PATH)/bin v1.62.0 + $(GO_LINT) version || curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(GO_PATH)/bin v2.4.0 deps: tools $(GO_GET) -v -t -d ./... diff --git a/docker/Dockerfile b/docker/Dockerfile index dbee457..4fff895 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -14,7 +14,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -FROM golang:1.23 as build +FROM golang:1.24 as build ARG VERSION="latest" ARG TARGETARCH diff --git a/docs/en/guides/compile/How-to-compile.md b/docs/en/guides/compile/How-to-compile.md index 11df4b8..69fafc1 100644 --- a/docs/en/guides/compile/How-to-compile.md +++ b/docs/en/guides/compile/How-to-compile.md @@ -2,7 +2,7 @@ ## Go version -Go version `1.23` is required for compilation. +Go version `1.24` is required for compilation. ## Platform Linux, MacOS and Windows are supported in SkyWalking Satellite. However, some components don't fit the Windows platform, including: diff --git a/go.mod b/go.mod index d5d4e25..33f4f89 100644 --- a/go.mod +++ b/go.mod @@ -1,8 +1,6 @@ module github.com/apache/skywalking-satellite -go 1.23.0 - -toolchain go1.23.6 +go 1.24.6 require ( github.com/Shopify/sarama v1.27.2 diff --git a/internal/satellite/telemetry/metricservice/server.go b/internal/satellite/telemetry/metricservice/server.go index 9619576..8ee6bae 100644 --- a/internal/satellite/telemetry/metricservice/server.go +++ b/internal/satellite/telemetry/metricservice/server.go @@ -64,9 +64,9 @@ func (s *Server) Start(config *telemetry.Config) error { } func (s *Server) AfterSharingStart() error { - plugin := sharing.Manager[s.MetricsServiceConfig.ClientName] + plugin := sharing.Manager[s.ClientName] if plugin == nil { - return fmt.Errorf("could not fould client %s", s.MetricsServiceConfig.ClientName) + return fmt.Errorf("could not fould client %s", s.ClientName) } grpcClient, ok := plugin.(client.Client) if !ok { diff --git a/plugins/client/grpc/client_sniffer.go b/plugins/client/grpc/client_sniffer.go index e909410..09a0ac8 100644 --- a/plugins/client/grpc/client_sniffer.go +++ b/plugins/client/grpc/client_sniffer.go @@ -39,9 +39,10 @@ func (c *Client) snifferChannelStatus() { case <-timeTicker.C: state := c.client.GetState() log.Logger.Debugf("current grpc client state: %s", state) - if state == connectivity.Shutdown || state == connectivity.TransientFailure { + switch state { + case connectivity.Shutdown, connectivity.TransientFailure: c.updateStatus(api.Disconnect) - } else if state == connectivity.Ready || state == connectivity.Idle { + case connectivity.Ready, connectivity.Idle: c.updateStatus(api.Connected) } case <-ctx.Done(): diff --git a/plugins/receiver/grpc/nativeasyncprofiler/async_profiler_service.go b/plugins/receiver/grpc/nativeasyncprofiler/async_profiler_service.go index cda9c59..5cad8ab 100644 --- a/plugins/receiver/grpc/nativeasyncprofiler/async_profiler_service.go +++ b/plugins/receiver/grpc/nativeasyncprofiler/async_profiler_service.go @@ -40,13 +40,14 @@ type AsyncProfilerService struct { } func (p *AsyncProfilerService) GetAsyncProfilerTaskCommands(_ context.Context, - query *asyncprofiler.AsyncProfilerTaskCommandQuery) (*common.Commands, error) { + query *asyncprofiler.AsyncProfilerTaskCommandQuery, +) (*common.Commands, error) { event := &v1.SniffData{ Data: &v1.SniffData_AsyncProfilerTaskCommandQuery{ AsyncProfilerTaskCommandQuery: query, }, } - data, _, err := p.SyncInvoker.SyncInvoke(event) + data, _, err := p.SyncInvoke(event) if err != nil { return nil, err } @@ -68,7 +69,7 @@ func (p *AsyncProfilerService) Collect(clientStream asyncprofiler.AsyncProfilerT }, } // send metadata to server - serverStreamAndResp, serverStream, err := p.SyncInvoker.SyncInvoke(event) + serverStreamAndResp, serverStream, err := p.SyncInvoke(event) if err != nil { return fmt.Errorf("satellite send metadata to server but get err: %s", err) } diff --git a/plugins/receiver/grpc/nativecds/cds_service.go b/plugins/receiver/grpc/nativecds/cds_service.go index 2f3b6ad..4210671 100644 --- a/plugins/receiver/grpc/nativecds/cds_service.go +++ b/plugins/receiver/grpc/nativecds/cds_service.go @@ -42,7 +42,7 @@ func (p *CDSService) FetchConfigurations(_ context.Context, req *v3.Configuratio ConfigurationSyncRequest: req, }, } - data, _, err := p.SyncInvoker.SyncInvoke(event) + data, _, err := p.SyncInvoke(event) if err != nil { return nil, err } diff --git a/plugins/receiver/grpc/nativeebpfprofiling/continuous_profiling_service.go b/plugins/receiver/grpc/nativeebpfprofiling/continuous_profiling_service.go index 2fee19c..45146ae 100644 --- a/plugins/receiver/grpc/nativeebpfprofiling/continuous_profiling_service.go +++ b/plugins/receiver/grpc/nativeebpfprofiling/continuous_profiling_service.go @@ -39,7 +39,7 @@ func (c *ContinuousProfilingReportService) QueryPolicies(ctx context.Context, qu ContinuousProfilingPolicyQuery: query, }, } - data, _, err := c.SyncInvoker.SyncInvoke(event) + data, _, err := c.SyncInvoke(event) if err != nil { return nil, err } @@ -53,7 +53,7 @@ func (c *ContinuousProfilingReportService) ReportProfilingTask(ctx context.Conte ContinuousProfilingReport: report, }, } - data, _, err := c.SyncInvoker.SyncInvoke(event) + data, _, err := c.SyncInvoke(event) if err != nil { return nil, err } diff --git a/plugins/receiver/grpc/nativeebpfprofiling/profiling_report_service.go b/plugins/receiver/grpc/nativeebpfprofiling/profiling_report_service.go index 77fe33c..fe5b8e7 100644 --- a/plugins/receiver/grpc/nativeebpfprofiling/profiling_report_service.go +++ b/plugins/receiver/grpc/nativeebpfprofiling/profiling_report_service.go @@ -44,7 +44,7 @@ func (p *ProfilingReportService) QueryTasks(ctx context.Context, d *v3.EBPFProfi EBPFProfilingTaskQuery: d, }, } - data, _, err := p.SyncInvoker.SyncInvoke(event) + data, _, err := p.SyncInvoke(event) if err != nil { return nil, err } diff --git a/plugins/receiver/grpc/nativeprocess/process_report_service.go b/plugins/receiver/grpc/nativeprocess/process_report_service.go index 52be68a..1e7298d 100644 --- a/plugins/receiver/grpc/nativeprocess/process_report_service.go +++ b/plugins/receiver/grpc/nativeprocess/process_report_service.go @@ -43,7 +43,7 @@ func (p *ProcessReportService) ReportProcesses(ctx context.Context, d *v3.EBPFPr EBPFProcessReportList: d, }, } - data, _, err := p.SyncInvoker.SyncInvoke(event) + data, _, err := p.SyncInvoke(event) if err != nil { return nil, err } diff --git a/plugins/receiver/grpc/nativeprofile/profile_service.go b/plugins/receiver/grpc/nativeprofile/profile_service.go index d430fad..6da16ab 100644 --- a/plugins/receiver/grpc/nativeprofile/profile_service.go +++ b/plugins/receiver/grpc/nativeprofile/profile_service.go @@ -45,7 +45,7 @@ func (p *ProfileService) GetProfileTaskCommands(_ context.Context, q *profile.Pr ProfileTaskQuery: q, }, } - data, _, err := p.SyncInvoker.SyncInvoke(event) + data, _, err := p.SyncInvoke(event) if err != nil { return nil, err } @@ -80,7 +80,7 @@ func (p *ProfileService) ReportTaskFinish(_ context.Context, report *profile.Pro ProfileTaskFinish: report, }, } - data, _, err := p.SyncInvoker.SyncInvoke(event) + data, _, err := p.SyncInvoke(event) if err != nil { return nil, err } diff --git a/test/e2e/base/satellite/Dockerfile b/test/e2e/base/satellite/Dockerfile index c990166..138bed0 100644 --- a/test/e2e/base/satellite/Dockerfile +++ b/test/e2e/base/satellite/Dockerfile @@ -14,7 +14,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -FROM golang:1.23 +FROM golang:1.24 ADD . /satellite_code WORKDIR /satellite_code