AsperforMias opened a new pull request, #1156:
URL: https://github.com/apache/dubbo-go-samples/pull/1156

   ## Description
   
   The CI workflow installs Go from `go.mod` (1.25.0) and then runs 
`apache/skywalking-eyes/header@main`. That composite action runs 
`actions/setup-go` with `go-version: "1.27"` and prepends the new toolchain to 
`PATH`. Every step after the license check, including Integration test, 
therefore runs with Go 1.27.3.
   
   This PR moves "Check license header" to immediately after checkout, before 
"Set up Go". `actions/setup-go@v6` prepends its `bin` directory for later steps 
and exports `GOTOOLCHAIN=local`. It does not set `GOROOT` for Go >= 1.9; the 
`go` binary derives `GOROOT` from its own location. The `go.mod` toolchain is 
installed last, so "Check tool versions" and Integration test both use Go 
1.25.x.
   
   Re-running `actions/setup-go` after the license step would also put 1.25 
back on `PATH`, but "Check tool versions" would still execute before that 
second setup and would not show the toolchain the integration test actually 
uses. It would also restore the module cache twice. Pinning `skywalking-eyes` 
to a commit from before 
[7f98a36a](https://github.com/apache/skywalking-eyes/commit/7f98a36a3cbbb2b876b6a05ddc24315b82c77737)
 would hide the mismatch only until `@main` moves again, and it would freeze 
header-check fixes. Reordering does not pin the action.
   
   The license check does not need the module toolchain. `.licenserc.yaml` 
ignores `go.mod`, `go.sum`, and `.github/**`, so scanning the checkout (before 
`go mod tidy`) checks the committed sources.
   
   ## Root cause
   
   
[apache/skywalking-eyes@7f98a36a](https://github.com/apache/skywalking-eyes/commit/7f98a36a3cbbb2b876b6a05ddc24315b82c77737)
 (2026-10-18, "chore(deps): bump Go to 1.27") hardcodes `go-version: "1.27"` in 
`header/action.yml`. `actions/setup-go@v6` calls `core.addPath` on the 
toolchain `bin` (and on `GOPATH/bin`) and exports `GOTOOLCHAIN=local`. A later 
`addPath` is first on `PATH` for subsequent steps. `GOROOT` is set only for Go 
< 1.9, so no stale `GOROOT` is involved; whichever `go` is first on `PATH` is 
the toolchain.
   
   On Go 1.27, `encoding/json` is the json/v2 implementation. `dubbo-go` 
`protocol/jsonrpc`'s `serverRequest.UnmarshalJSON` (`type req *serverRequest`) 
recurses until the provider hits `fatal error: stack overflow`. The jsonrpc 
listener dies and the consumer fails with connection refused. Upstream report: 
[golang/go#75361](https://github.com/golang/go/issues/75361).
   
   The samples workflow replaces `dubbo-go` with 
`dubbo.apache.org/dubbo-go/v3@<base branch>` (`main` for pull requests). A fix 
on `apache/dubbo-go` `develop` does not reach this CI until it is on `dubbo-go` 
`main`. The workflow still has to test with the Go version in `go.mod`.
   
   ## Severity
   
   The CI workflow runs on every `push` and every `pull_request`.
   
   Verified with `gh run list -R apache/dubbo-go-samples --workflow CI`:
   
   | Run | When | Event | License-step Go | Result |
   | --- | --- | --- | --- | --- |
   | 
[38816838734](https://github.com/apache/dubbo-go-samples/actions/runs/38816838734)
 | 2026-10-15 | `pull_request` | go1.25.14 | success |
   | 
[40064625227](https://github.com/apache/dubbo-go-samples/actions/runs/40064625227)
 | 2026-10-24 05:01 | `pull_request` | go1.27.3 | failure, 
`rpc/multi-protocols` |
   | 
[40073781121](https://github.com/apache/dubbo-go-samples/actions/runs/40073781121)
 | 2026-10-24 07:21 | `pull_request` | go1.27.3 | failure, 
`rpc/multi-protocols` |
   | 
[40075757874](https://github.com/apache/dubbo-go-samples/actions/runs/40075757874)
 | 2026-10-24 07:51 | `pull_request` | go1.27.3 | failure, 
`rpc/multi-protocols` |
   
   Those three failures are every CI workflow run since the 2026-10-18 
skywalking-eyes change. All three are `pull_request` runs of 
`feature/3767-observability-capture`. No `push` run of this workflow, including 
`main`, has occurred in that window (`main` is still `ef772f64`). A `main` push 
executes the same job.
   
   `start_integrate_test.sh` exits at the first failing sample, so samples 
listed after `rpc/multi-protocols` were not run. Samples before it passed on 
[run 
40075757874](https://github.com/apache/dubbo-go-samples/actions/runs/40075757874).
 In that log, "Check tool versions" prints `go version go1.25.0`, the license 
step then prints `go version go1.27.3`, and integration-test stacks resolve 
under `/opt/hostedtoolcache/go/1.27.3/`. The client failure is `panic: jsonrpc 
service call failed: dial tcp ...:20002: connect: connection refused`. The 
provider's `fatal error: stack overflow` is not in the job log: 
`integrate_test.sh` redirects the server log and prints it only when the server 
is already dead at the startup check.
   
   `golangci-lint` does not use skywalking-eyes. Its runs on the same commits 
succeeded.
   
   ## Impact scope
   
   CI workflow only (`.github/workflows/github-actions.yml`). No sample code, 
module, or runtime change.
   
   The `dubbo-go` jsonrpc bug is tracked separately and is not fixed here. This 
PR only stops CI from compiling samples with a Go newer than `go.mod`.
   
   ## Fix
   
   Move "Check license header" to immediately after "Check out code", and leave 
"Set up Go" (`go-version-file: go.mod`) where it is, ahead of the module cache, 
Java setup, format, `go mod tidy`, and Integration test.
   
   Cache: the license action's `setup-go` caches against that action's own 
`go.sum`, not this repo's. This repo's `setup-go` cache and the 
`~/.cache/go-build` / `~/go/bin` cache step still restore after "Set up Go", on 
the `go.mod` toolchain.
   
   ## Verification
   
   - `python3 -c "yaml.safe_load"` on `.github/workflows/github-actions.yml`
   - `actionlint` v1.7.12 reports no findings
   - Only this workflow file changes
   - This PR's own CI run (`pull_request` runs the workflow from the PR head) 
is expected to show `go1.25.x` in "Check tool versions", which runs after the 
license step, and Integration test should pass `rpc/multi-protocols`
   
   ## Related
   
   - Failing run: 
https://github.com/apache/dubbo-go-samples/actions/runs/40075757874
   - skywalking-eyes change: 
https://github.com/apache/skywalking-eyes/commit/7f98a36a3cbbb2b876b6a05ddc24315b82c77737
   - Go issue: https://github.com/golang/go/issues/75361
   - Dubbo-go fix PR: (link to be added)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to