Skip to content

Conversation

@Kavish-12345
Copy link
Contributor

Fixes #7664

Problem

After the initial fix separated stable Go for tools and gotip for tests, cached standard library packages compiled with Go 1.25.x were still being used by gotip, causing compilation errors.

Root Cause

When gotip runs, it tries to link against pre-compiled standard library packages (like internal/goarch, sync/atomic, etc.) from Go 1.25.x, causing version mismatches.

Changes

  • Added cache: false to disable automatic caching.
  • Added go install std to rebuild standard library with gotip.
  • This allows tools to be built with stable Go while tests run with gotip.

@Kavish-12345 Kavish-12345 requested a review from a team as a code owner November 23, 2025 09:08
@codecov
Copy link

codecov bot commented Nov 23, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.56%. Comparing base (afdc54e) to head (407a067).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7667      +/-   ##
==========================================
+ Coverage   96.54%   96.56%   +0.02%     
==========================================
  Files         384      384              
  Lines       19501    19501              
==========================================
+ Hits        18827    18831       +4     
+ Misses        489      486       -3     
+ Partials      185      184       -1     
Flag Coverage Δ
badger_v1 8.82% <ø> (ø)
badger_v2 1.72% <ø> (ø)
cassandra-4.x-v1-manual 12.54% <ø> (ø)
cassandra-4.x-v2-auto 1.71% <ø> (ø)
cassandra-4.x-v2-manual 1.71% <ø> (ø)
cassandra-5.x-v1-manual 12.54% <ø> (ø)
cassandra-5.x-v2-auto 1.71% <ø> (ø)
cassandra-5.x-v2-manual 1.71% <ø> (ø)
clickhouse 1.65% <ø> (ø)
elasticsearch-6.x-v1 16.74% <ø> (ø)
elasticsearch-7.x-v1 16.77% <ø> (ø)
elasticsearch-8.x-v1 16.92% <ø> (ø)
elasticsearch-8.x-v2 1.72% <ø> (ø)
elasticsearch-9.x-v2 1.72% <ø> (-0.08%) ⬇️
grpc_v1 10.75% <ø> (ø)
grpc_v2 1.72% <ø> (ø)
kafka-3.x-v1 10.25% <ø> (ø)
kafka-3.x-v2 1.72% <ø> (ø)
memory_v2 1.72% <ø> (ø)
opensearch-1.x-v1 16.81% <ø> (ø)
opensearch-2.x-v1 16.81% <ø> (ø)
opensearch-2.x-v2 1.72% <ø> (ø)
opensearch-3.x-v2 1.72% <ø> (ø)
query 1.72% <ø> (ø)
tailsampling-processor 0.49% <ø> (ø)
unittests 95.47% <ø> (+0.02%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions
Copy link

github-actions bot commented Nov 23, 2025

Metrics Comparison Summary

Total changes across all snapshots: 53

Detailed changes per snapshot

summary_metrics_snapshot_cassandra

📊 Metrics Diff Summary

Total Changes: 53

  • 🆕 Added: 53 metrics
  • ❌ Removed: 0 metrics
  • 🔄 Modified: 0 metrics

🆕 Added Metrics

  • http_server_request_body_size_bytes (18 variants)
View diff sample
+http_server_request_body_size_bytes{http_request_method="GET",http_response_status_code="503",le="+Inf",network_protocol_name="http",network_protocol_version="1.1",otel_scope_name="go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp",otel_scope_schema_url="",otel_scope_version="0.63.0",server_address="localhost",server_port="13133",url_scheme="http"}
+http_server_request_body_size_bytes{http_request_method="GET",http_response_status_code="503",le="0",network_protocol_name="http",network_protocol_version="1.1",otel_scope_name="go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp",otel_scope_schema_url="",otel_scope_version="0.63.0",server_address="localhost",server_port="13133",url_scheme="http"}
+http_server_request_body_size_bytes{http_request_method="GET",http_response_status_code="503",le="10",network_protocol_name="http",network_protocol_version="1.1",otel_scope_name="go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp",otel_scope_schema_url="",otel_scope_version="0.63.0",server_address="localhost",server_port="13133",url_scheme="http"}
+http_server_request_body_size_bytes{http_request_method="GET",http_response_status_code="503",le="100",network_protocol_name="http",network_protocol_version="1.1",otel_scope_name="go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp",otel_scope_schema_url="",otel_scope_version="0.63.0",server_address="localhost",server_port="13133",url_scheme="http"}
+http_server_request_body_size_bytes{http_request_method="GET",http_response_status_code="503",le="1000",network_protocol_name="http",network_protocol_version="1.1",otel_scope_name="go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp",otel_scope_schema_url="",otel_scope_version="0.63.0",server_address="localhost",server_port="13133",url_scheme="http"}
+http_server_request_body_size_bytes{http_request_method="GET",http_response_status_code="503",le="10000",network_protocol_name="http",network_protocol_version="1.1",otel_scope_name="go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp",otel_scope_schema_url="",otel_scope_version="0.63.0",server_address="localhost",server_port="13133",url_scheme="http"}
+http_server_request_body_size_bytes{http_request_method="GET",http_response_status_code="503",le="25",network_protocol_name="http",network_protocol_version="1.1",otel_scope_name="go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp",otel_scope_schema_url="",otel_scope_version="0.63.0",server_address="localhost",server_port="13133",url_scheme="http"}
...
- `http_server_request_duration_seconds` (17 variants)
View diff sample
+http_server_request_duration_seconds{http_request_method="GET",http_response_status_code="503",le="+Inf",network_protocol_name="http",network_protocol_version="1.1",otel_scope_name="go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp",otel_scope_schema_url="",otel_scope_version="0.63.0",server_address="localhost",server_port="13133",url_scheme="http"}
+http_server_request_duration_seconds{http_request_method="GET",http_response_status_code="503",le="0.005",network_protocol_name="http",network_protocol_version="1.1",otel_scope_name="go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp",otel_scope_schema_url="",otel_scope_version="0.63.0",server_address="localhost",server_port="13133",url_scheme="http"}
+http_server_request_duration_seconds{http_request_method="GET",http_response_status_code="503",le="0.01",network_protocol_name="http",network_protocol_version="1.1",otel_scope_name="go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp",otel_scope_schema_url="",otel_scope_version="0.63.0",server_address="localhost",server_port="13133",url_scheme="http"}
+http_server_request_duration_seconds{http_request_method="GET",http_response_status_code="503",le="0.025",network_protocol_name="http",network_protocol_version="1.1",otel_scope_name="go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp",otel_scope_schema_url="",otel_scope_version="0.63.0",server_address="localhost",server_port="13133",url_scheme="http"}
+http_server_request_duration_seconds{http_request_method="GET",http_response_status_code="503",le="0.05",network_protocol_name="http",network_protocol_version="1.1",otel_scope_name="go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp",otel_scope_schema_url="",otel_scope_version="0.63.0",server_address="localhost",server_port="13133",url_scheme="http"}
+http_server_request_duration_seconds{http_request_method="GET",http_response_status_code="503",le="0.075",network_protocol_name="http",network_protocol_version="1.1",otel_scope_name="go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp",otel_scope_schema_url="",otel_scope_version="0.63.0",server_address="localhost",server_port="13133",url_scheme="http"}
+http_server_request_duration_seconds{http_request_method="GET",http_response_status_code="503",le="0.1",network_protocol_name="http",network_protocol_version="1.1",otel_scope_name="go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp",otel_scope_schema_url="",otel_scope_version="0.63.0",server_address="localhost",server_port="13133",url_scheme="http"}
...
- `http_server_response_body_size_bytes` (18 variants)
View diff sample
+http_server_response_body_size_bytes{http_request_method="GET",http_response_status_code="503",le="+Inf",network_protocol_name="http",network_protocol_version="1.1",otel_scope_name="go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp",otel_scope_schema_url="",otel_scope_version="0.63.0",server_address="localhost",server_port="13133",url_scheme="http"}
+http_server_response_body_size_bytes{http_request_method="GET",http_response_status_code="503",le="0",network_protocol_name="http",network_protocol_version="1.1",otel_scope_name="go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp",otel_scope_schema_url="",otel_scope_version="0.63.0",server_address="localhost",server_port="13133",url_scheme="http"}
+http_server_response_body_size_bytes{http_request_method="GET",http_response_status_code="503",le="10",network_protocol_name="http",network_protocol_version="1.1",otel_scope_name="go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp",otel_scope_schema_url="",otel_scope_version="0.63.0",server_address="localhost",server_port="13133",url_scheme="http"}
+http_server_response_body_size_bytes{http_request_method="GET",http_response_status_code="503",le="100",network_protocol_name="http",network_protocol_version="1.1",otel_scope_name="go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp",otel_scope_schema_url="",otel_scope_version="0.63.0",server_address="localhost",server_port="13133",url_scheme="http"}
+http_server_response_body_size_bytes{http_request_method="GET",http_response_status_code="503",le="1000",network_protocol_name="http",network_protocol_version="1.1",otel_scope_name="go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp",otel_scope_schema_url="",otel_scope_version="0.63.0",server_address="localhost",server_port="13133",url_scheme="http"}
+http_server_response_body_size_bytes{http_request_method="GET",http_response_status_code="503",le="10000",network_protocol_name="http",network_protocol_version="1.1",otel_scope_name="go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp",otel_scope_schema_url="",otel_scope_version="0.63.0",server_address="localhost",server_port="13133",url_scheme="http"}
+http_server_response_body_size_bytes{http_request_method="GET",http_response_status_code="503",le="25",network_protocol_name="http",network_protocol_version="1.1",otel_scope_name="go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp",otel_scope_schema_url="",otel_scope_version="0.63.0",server_address="localhost",server_port="13133",url_scheme="http"}
...

➡️ View full metrics file

@yurishkuro
Copy link
Member

How did you test this?

@Kavish-12345
Copy link
Contributor Author

Kavish-12345 commented Nov 23, 2025

@yurishkuro I analyzed the CI error logs showing the version mismatches and developed this fix based on that analysis.
The approach i used was to disable Actions caching with cache: false, clean both caches, then rebuild the standard library with gotip via go install std. This should ensure gotip uses its own compiled stdlib instead of the cached packages from Go 1.25.4. Since this is specifically a GitHub Actions caching issue, local testing wouldn't fully reproduce the problem - the cache behavior and environment are different in CI. I relied on the error logs to understand the root cause and validate via CI runs.

@yurishkuro yurishkuro added the run-all-workflows Manual label for PRs to run all workflows including main-branch only label Nov 23, 2025
@yurishkuro
Copy link
Member

We specifically defined the logic in this workflow to run even on PRs when run-all-workflows label is added to the PR, but it doesn't seem to be working. You can temporarily comment out that condition in the WF to illustrate that it runs successfully here, and then we can remove it before merging.

go clean -cache
go clean -modcache
go install std
Copy link
Member

Choose a reason for hiding this comment

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

this doesn't make sense to me. The fact that you have to do that indicates that we still have some cross-pollution happening between two Go versions. If go clean does not help we need to find a more reliable approach - once a gotip is installed no leftovers of the previous toolchain should be accessible. Maybe we need to be more aggressive about env variables, to ensure none of them point to the previous toolchain.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@yurishkuro That's a totally valid point and i am working on the issue and looking for the root cause of this cross-pollution that has occurred after the 2nd PR was merged. Just give me some more time to solve this issue.

- Disable Go module caching with cache: false
- Rebuild standard library after installing gotip

Signed-off-by: Kavish-12345 <[email protected]>
- Unset GOTOOLCHAIN env var in setup-go-tip action
- Remove stale go1.25.4 binaries to prevent shadowing
- Add GOTOOLCHAIN: auto to workflow steps

Signed-off-by: Kavish-12345 <[email protected]>
echo "GOTOOLCHAIN=" >> $GITHUB_ENV
# Remove any stale go binaries from previous toolchain installations
# This prevents shadowing of gotip's go binary
for go_path in /opt/hostedtoolcache/go/*/x64/bin/go /home/runner/go/bin/go; do
Copy link
Member

Choose a reason for hiding this comment

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

/opt/hostedtoolcache/go/*/x64/bin/go

can we not do this via some env var reference? Hardcoding the path will make this action unstable in the future

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Instead of hardcoding /opt/hostedtoolcache/go/*/x64/bin/go, I'll use command -v go to dynamically find and remove the old go binary. This is future-proof and doesn't depend on GitHub's directory structure.

uses: actions/setup-go@4dc6199c7b1a012772edbd06daecab0f50c9053c # v6.1.0
with:
go-version: 1.25.x
cache: false
Copy link
Member

Choose a reason for hiding this comment

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

why?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

according to me the cache: false setting prevents the go1.25.4 module cache from persisting and interfering with gotip's isolated environment.

go clean -cache
go clean -modcache
env:
GOTOOLCHAIN: auto
Copy link
Member

Choose a reason for hiding this comment

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

GOTOOLCHAIN is not something that must be managed by use. According to AI, there are 5 env vars we need to control (actual paths are examples):

To use the 1.25.x toolchain:

  • export GOROOT=$HOME/sdk/go1.25.x
  • export GOPATH=$HOME/go/1.25
  • export PATH=$GOROOT/bin:$PATH
  • export GOCACHE=$GOPATH/cache
  • export GOMODCACHE=$GOPATH/pkg/mod

To use the gotip toolchain:

  • export GOROOT=$HOME/sdk/go-tip
  • export GOPATH=$HOME/go/tip
  • export PATH=$GOROOT/bin:$PATH
  • export GOCACHE=$GOPATH/cache
  • export GOMODCACHE=$GOPATH/pkg/mod

Copy link
Contributor Author

Choose a reason for hiding this comment

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

i am addressing this . Also after checking the failure point this time it is not a version mismatch like earlier but due to the TestSpanCollectorHTTP test failing due to a pre-existing IPv6 port parsing issue that is unrelated to the gotip environment changes.

Comment on lines +49 to +51
env:
GOTOOLCHAIN: auto

Copy link
Contributor

Choose a reason for hiding this comment

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

Setting GOTOOLCHAIN: auto conflicts with the GOTOOLCHAIN= (unset) in the setup-go-tip action (line 69). When GOTOOLCHAIN is set to "auto", Go will automatically select and download a toolchain version, potentially bypassing gotip. This contradicts the stated goal of ensuring gotip is used. Either remove this env block or change to GOTOOLCHAIN: local to force using the installed gotip.

env:
  GOTOOLCHAIN: local
Suggested change
env:
GOTOOLCHAIN: auto
env:
GOTOOLCHAIN: local

Spotted by Graphite Agent

Fix in Graphite


Is this helpful? React 👍 or 👎 to let us know.

@Kavish-12345
Copy link
Contributor Author

@yurishkuro I have implemented the dynamic approach for the binary files , also tried to control the 5 ENV variables and along with it tried the GOTOOLCHAIN:LOCAL as well as AUTO , but the version error mismatch is back and during the last time when i made the changes it had worked correctly ....... the tests failed due to the other preexisting issues .... need your guidance on it for the implementation right now i am pushing the changes in which the version mismatch errors were not encountered.
https://github.com/jaegertracing/jaeger/actions/runs/19647724836/job/56266968371?pr=7667

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

Labels

run-all-workflows Manual label for PRs to run all workflows including main-branch only

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: Use official Go version for building tools in gotip workflow

2 participants