Skip to content

feat: add e2e CI workflow for Go benchmarks#14

Open
lcian wants to merge 10 commits intomainfrom
feat/e2e-go-benchmarks
Open

feat: add e2e CI workflow for Go benchmarks#14
lcian wants to merge 10 commits intomainfrom
feat/e2e-go-benchmarks

Conversation

@lcian
Copy link
Member

@lcian lcian commented Feb 17, 2026

Summary

  • Add Go SDK version handling to the benchmark runner (_prepare_sdk_version) — parses go.mod for sentry-go modules and updates them via go get + go mod tidy before Docker builds
  • Add e2e-go.yml workflow that runs all three Go benchmark apps (net-http, gin, echo) against the latest sentry-go version with 1 iteration
  • Triggers on PRs touching Go apps/configs/lib/templates, and via workflow_dispatch with optional version override
  • Resolves "latest" version from the Go module proxy

Test plan

  • Trigger the workflow manually via workflow_dispatch and verify all 3 Go apps complete successfully
  • Verify the resolved sentry-go version is correct (latest from proxy.golang.org)
  • Check that uploaded artifacts contain valid results.json files

🤖 Generated with Claude Code

if parts:
mod = parts[0]
if mod.startswith("github.com/getsentry/sentry-go"):
sentry_modules.append(mod)
Copy link

Choose a reason for hiding this comment

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

Go.mod parser misses single-line require directives

High Severity

The go.mod parser in _prepare_go_sdk_version takes parts[0] to get the module name, but this fails for single-line require directives like require github.com/getsentry/sentry-go v0.42.0 where parts[0] is "require", not the module path. The go/net-http app uses exactly this format, so its sentry-go dependency will never be updated — the function will log a warning and return early without calling go get.

Fix in Cursor Fix in Web


on:
pull_request:
branches: [main, feat/github-actions]
Copy link

Choose a reason for hiding this comment

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

Development branch left in workflow trigger

Low Severity

The pull_request trigger includes feat/github-actions alongside main in the branches list. This looks like a temporary addition for testing the workflow during development and will become dead configuration once the feature branch is merged.

Fix in Cursor Fix in Web

@github-actions
Copy link

github-actions bot commented Feb 17, 2026

SDK Benchmark Results — go/gin

SDK version: 0.42.0
Status: No regression

Latency Overhead

Metric Overhead
p50 +23.89%
p90 +3.16%
p95 +3.24%
p99 +2.72%
mean +11.88%
Details
  • Iterations: 2
  • RPS: 100
  • Duration: 30s

@lcian lcian changed the base branch from feat/github-actions to main February 17, 2026 18:15
lcian and others added 9 commits February 17, 2026 19:18
Add Go SDK version handling to the benchmark runner so that
`_prepare_sdk_version` can update sentry-go modules in go.mod
via `go get` + `go mod tidy` before Docker builds.

Add an e2e workflow that runs all three Go apps (net-http, gin, echo)
against the latest sentry-go version with a single iteration.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Temporary — allows testing the workflow on this PR before
the base branch is merged to main.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add conditional Go setup to benchmark.yml for Go apps
- Fix find results bug (maxdepth) in benchmark.yml
- Rewrite e2e-go.yml to resolve version then call benchmark.yml
  via matrix strategy, removing duplicated benchmark logic

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@lcian lcian force-pushed the feat/e2e-go-benchmarks branch from 546e166 to 883a2d0 Compare February 17, 2026 18:19
Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

if: startsWith(inputs.app, 'go/')
with:
go-version: "1.25"
cache: false
Copy link

Choose a reason for hiding this comment

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

Duplicate setup-go step accidentally added to workflow

Low Severity

The actions/setup-go@v5 step (lines 53–57) is an exact duplicate of the step already present at lines 47–51. Both have the same if condition, go-version, and cache setting. This appears to be an accidental copy-paste that causes Go to be set up twice for every Go benchmark run.

Fix in Cursor Fix in Web

The run_benchmark function was collecting raw iteration data but never
aggregating it into the summary.overhead structure that format_comment
expects. This resulted in empty metric tables in PR comments.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant