Skip to content

fix(grpc): support Go 1.25 and 1.26 plugin scenarios - #252

Open
loon-hejw wants to merge 5 commits into
apache:mainfrom
loon-hejw:agent/go125-go126-plugin-compat
Open

fix(grpc): support Go 1.25 and 1.26 plugin scenarios#252
loon-hejw wants to merge 5 commits into
apache:mainfrom
loon-hejw:agent/go125-go126-plugin-compat

Conversation

@loon-hejw

Copy link
Copy Markdown

Why

Go 1.25 and Go 1.26 can build the agent at 754482220284, but the existing
plugin runner and gRPC instrumentation leave several compatibility gaps:

  • Docker Compose releases newer than v2 are rejected by the scenario runner.
  • go mod tidy can rewrite a generated scenario module to go 1.25.0 or
    go 1.26.0 while the generated workspace remains on go 1.25 or go 1.26.
  • gRPC v1.81.1 introduces the split genproto RPC module and passes
    *transport.ServerStream to server internals. The current plugin asserts
    *transport.Stream, causing an intercepted panic and fragmented server
    traces. Unary SendResponse spans are also skipped for the new stream type.

What changed

  • Add Go 1.25/1.26 Gin and gRPC plugin matrices.
  • Accept numeric Docker Compose major versions >= 2.
  • Refresh the generated go.work after go mod tidy.
  • Move the root monolithic genproto dependency to the first post-split version.
  • Match gRPC server streams through their stable Method and Context
    contract instead of a concrete internal type.
  • Add focused runner and gRPC interceptor regression tests.

Validation

  • go test -race ./plugins/grpc/... ./test/plugins/runner-helper/... ./tools/go-agent/instrument/...
  • go test ./...
  • Go 1.25.6 and Go 1.26.5 Agent builds for linux/arm64
  • Official plugin scenarios:
    • Gin v1.10.1: Go 1.25 and Go 1.26
    • native HTTP: Go 1.25 and Go 1.26
    • gRPC v1.81.1: Go 1.25 and Go 1.26, including unary and all streaming modes
    • Toolkit Trace/Log/Metric activation: Go 1.25 and Go 1.26
    • cross-goroutine context: Go 1.25 and Go 1.26

The baseline gRPC reproduction logs:

interface conversion: interface {} is *transport.ServerStream,
not *transport.Stream

The process survives because the agent recovers the interceptor panic, but the
server streaming trace is split into orphan segments. Both patched Go versions
pass the strict scenario validator without the panic.

@wu-sheng
wu-sheng requested review from Copilot and mrproliu and removed request for Copilot July 28, 2026 06:38
@wu-sheng wu-sheng added the enhancement New feature or request label Jul 28, 2026
@wu-sheng wu-sheng added this to the 0.7.0 milestone Jul 28, 2026
mrproliu
mrproliu previously approved these changes Jul 28, 2026

@mrproliu mrproliu left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please update the changes.md and support-plugins.md

@loon-hejw

Copy link
Copy Markdown
Author

Addressed in commit 918c7f1:

  • Updated CHANGES.md with the SpanRef capability, gRPC v1.81.1 support on Go 1.25/1.26, and the recent gRPC server stream compatibility fix.
  • Updated docs/en/agent/support-plugins.md to document gRPC support through v1.81.1.

git diff --check passes.

@loon-hejw
loon-hejw requested a review from mrproliu July 29, 2026 00:24
@loon-hejw

Copy link
Copy Markdown
Author

The latest Plugin Tests / mysql (https://github.com/apache/skywalking-go/actions/runs/30410944583/job/90449826435) job failed while pulling the mysql:5.7 image from Docker Hub:

read: connection reset by peer

The failure occurred before the MySQL test scenario started, and the remaining plugin jobs were cancelled by matrix fail-fast. The main CI, Windows plugin tests, and E2E workflows passed.

This appears to be a transient external network failure unrelated to this PR. Could someone with permission please rerun the failed workflow?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants