Skip to content

Comments

[EXPERIMENTAL] feat(ci): single source of truth for Go versions#4452

Draft
kakkoyun wants to merge 8 commits intomainfrom
kakkoyun/single-source-go-versions
Draft

[EXPERIMENTAL] feat(ci): single source of truth for Go versions#4452
kakkoyun wants to merge 8 commits intomainfrom
kakkoyun/single-source-go-versions

Conversation

@kakkoyun
Copy link
Member

@kakkoyun kakkoyun commented Feb 19, 2026

What does this PR do?

Reads the stable Go version from the local go-versions.yml and passes it as GO_VERSION to build.sh in the system-tests weblog build step. build.sh forwards it as --build-arg GO_VERSION=... to docker buildx build, which overrides the ARG GO_VERSION=1.26 default in the Go weblog Dockerfiles.

Motivation

go-versions.yml is already the single source of truth for Go versions in this repo. The system-tests weblog Dockerfiles were still hardcoding golang:1.24, requiring a manual PR on every Go version bump.

This change + the companion PR in system-tests eliminates that manual step: the next CI run after a go-versions.yml update will automatically use the new version.

Companion PR: DataDog/system-tests#6350

Reviewer's Checklist

  • Changed code has unit tests for its functionality at or near 100% coverage.
  • System-Tests covering this feature have been added and enabled with the va.b.c-dev version tag.
  • There is a benchmark for any new code, or changes to existing code.
  • If this interacts with the agent in a new way, a system test has been added.
  • New code is free of linting errors. You can check this by running make lint locally.
  • New code doesn't break existing tests. You can check this by running make test locally.
  • Add an appropriate team label so this PR gets put in the right place for the release notes.
  • All generated files are up to date. You can check this by running make generate locally.
  • Non-trivial go.mod changes, e.g. adding new modules, are reviewed by @DataDog/dd-trace-go-guild. Make sure all nested modules are up to date by running make fix-modules locally.

Unsure? Have a question? Request a review!

…CI_IMAGE updates

- Add go-versions.yml as the single source of truth for stable/oldstable versions
- Add .github/actions/go-versions composite action for version extraction
- Update all GitHub Actions workflows to derive Go versions from go-versions.yml
- Add parse-go-versions .pre job in .gitlab-ci.yml for GitLab pipeline access
- Update .gitlab/macrobenchmarks.yml to use \$GO_STABLE_PATCH / \$GO_OLDSTABLE_PATCH
- Add go-versions-changed.yml to trigger downstream rebuilds on version changes
- Add update-base-image.yml to open automated PRs when BASE_CI_IMAGE is rebuilt
@kakkoyun kakkoyun changed the title feat(ci): single source of truth for Go versions with automated BASE_CI_IMAGE updates [EXPERIMENTAL] feat(ci): single source of truth for Go versions with automated BASE_CI_IMAGE updates Feb 19, 2026
@pr-commenter
Copy link

pr-commenter bot commented Feb 19, 2026

Benchmarks

Benchmark execution time: 2026-02-20 14:18:27

Comparing candidate commit f3e5ba3 in PR branch kakkoyun/single-source-go-versions with baseline commit a39a21d in branch main.

Found 0 performance improvements and 0 performance regressions! Performance is the same for 156 metrics, 8 unstable metrics.

Explanation

This is an A/B test comparing a candidate commit's performance against that of a baseline commit. Performance changes are noted in the tables below as:

  • 🟩 = significantly better candidate vs. baseline
  • 🟥 = significantly worse candidate vs. baseline

We compute a confidence interval (CI) over the relative difference of means between metrics from the candidate and baseline commits, considering the baseline as the reference.

If the CI is entirely outside the configured SIGNIFICANT_IMPACT_THRESHOLD (or the deprecated UNCONFIDENCE_THRESHOLD), the change is considered significant.

Feel free to reach out to #apm-benchmarking-platform on Slack if you have any questions.

More details about the CI and significant changes

You can imagine this CI as a range of values that is likely to contain the true difference of means between the candidate and baseline commits.

CIs of the difference of means are often centered around 0%, because often changes are not that big:

---------------------------------(------|---^--------)-------------------------------->
                              -0.6%    0%  0.3%     +1.2%
                                 |          |        |
         lower bound of the CI --'          |        |
sample mean (center of the CI) -------------'        |
         upper bound of the CI ----------------------'

As described above, a change is considered significant if the CI is entirely outside the configured SIGNIFICANT_IMPACT_THRESHOLD (or the deprecated UNCONFIDENCE_THRESHOLD).

For instance, for an execution time metric, this confidence interval indicates a significantly worse performance:

----------------------------------------|---------|---(---------^---------)---------->
                                       0%        1%  1.3%      2.2%      3.1%
                                                  |   |         |         |
       significant impact threshold --------------'   |         |         |
                      lower bound of CI --------------'         |         |
       sample mean (center of the CI) --------------------------'         |
                      upper bound of CI ----------------------------------'

…g build

Read the stable Go version from the local go-versions.yml (checked out at
binaries/dd-trace-go) and pass it as GO_VERSION to build.sh, which forwards
it as --build-arg GO_VERSION to docker buildx build.

This wires dd-trace-go's single source of truth into the system-tests
weblog Docker build, so Go version bumps in go-versions.yml automatically
propagate to the container image without a manual PR.

Companion PR: DataDog/system-tests#6350

Signed-off-by: Kemal Akkoyun <kemal.akkoyun@datadoghq.com>
@kakkoyun kakkoyun changed the title [EXPERIMENTAL] feat(ci): single source of truth for Go versions with automated BASE_CI_IMAGE updates [EXPERIMENTAL] feat(ci): read Go version from go-versions.yml for system-tests weblog build Feb 19, 2026
@codecov
Copy link

codecov bot commented Feb 19, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 55.48%. Comparing base (a39a21d) to head (241406a).
⚠️ Report is 4 commits behind head on main.

Additional details and impacted files

see 46 files with indirect coverage changes

🚀 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.

@kakkoyun kakkoyun changed the title [EXPERIMENTAL] feat(ci): read Go version from go-versions.yml for system-tests weblog build feat(ci): single source of truth for Go versions Feb 19, 2026
Add BENCHMARKING_PLATFORM_GL_PROJECT_ID and APM_SDKS_BENCHMARKS_GL_PROJECT_ID
to the actionlint config-variables list. These are referenced in
go-versions-changed.yml via vars.* context and must be declared to
suppress actionlint false-positive failures.
@kakkoyun kakkoyun changed the title feat(ci): single source of truth for Go versions [EXPERIMENTAL] feat(ci): single source of truth for Go versions Feb 19, 2026
@kakkoyun kakkoyun changed the title [EXPERIMENTAL] feat(ci): single source of truth for Go versions feat(ci): single source of truth for Go versions Feb 19, 2026
Multiline commit message in the 'Commit and push' run: | block had
zero-indented continuation lines that broke YAML parsing (lines 61-62
fell outside the block scalar). Replace with printf to build the
message inline without YAML indentation issues.
Replace alpine:latest with registry.ddbuild.io/images/benchmarking-platform-tools-ubuntu:latest.
Gatekeeper's third-party-registry admission webhook blocks docker.io/alpine images;
all images must come from approved internal registries.
Multiline --body string in gh pr create had zero-indented continuation lines
that broke YAML block scalar parsing (same issue as the Commit and push step).
Replace with printf to build the PR body inline with proper indentation.
@kakkoyun kakkoyun changed the title feat(ci): single source of truth for Go versions [EXPERIMENTAL] feat(ci): single source of truth for Go versions Feb 19, 2026
…nv dispatch

- Add scripts/rollout-go-version.sh: updates go.work and all go.mod
  files to oldstable_patch from go-versions.yml
- Add scripts/check-go-versions.sh: audits consistency between
  go-versions.yml and module files; warns on golangci-lint drift
- Add GO-VERSION-ROLLOUT.md: full rollout procedure, automation
  diagram, and manual steps reference
- Update go-versions.yml: reference GO-VERSION-ROLLOUT.md in header
- Update go-versions-changed.yml: add trigger-reliability-env job that
  dispatches go-version-updated event to datadog-reliability-env
@codecov
Copy link

codecov bot commented Feb 20, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 55.48%. Comparing base (a39a21d) to head (241406a).
⚠️ Report is 4 commits behind head on main.

Additional details and impacted files

see 46 files with indirect coverage changes

🚀 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.

Three CI fixes for the single-source-go-versions branch:

1. scripts/check-go-versions.sh, scripts/rollout-go-version.sh
   Apply shfmt --indent=2 --case-indent --space-redirects formatting.
   The CI's format.sh runs shfmt on scripts/*.sh and diffs the result;
   these two new scripts were committed without pre-formatting.

2. .github/workflows/update-base-image.yml (SC2034)
   Remove unused SUFFIX variable from the "Update BASE_CI_IMAGE" step.
   SUFFIX is not referenced in that step's sed commands — only IMAGE
   and PIPELINE_URL are used there.

3. .github/workflows/update-base-image.yml (SC2016)
   Switch printf format string from single-quoted to ANSI-C $'...'
   quoting in the "Create Pull Request" step. The Markdown backticks
   around identifiers (e.g. \`BASE_CI_IMAGE\`) inside single quotes
   trigger shellcheck SC2016 ("Expressions don't expand in single
   quotes"). Using $'...' quoting lets the shell interpret \n escape
   sequences while keeping backticks unambiguously literal.
@codecov
Copy link

codecov bot commented Feb 20, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 55.60%. Comparing base (a39a21d) to head (f3e5ba3).
⚠️ Report is 4 commits behind head on main.

Additional details and impacted files

see 37 files with indirect coverage changes

🚀 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.

@datadog-datadog-prod-us1-2
Copy link

datadog-datadog-prod-us1-2 bot commented Feb 20, 2026

⚠️ Tests

Fix all issues with BitsAI or with Cursor

⚠️ Warnings

❄️ 2 New flaky tests detected

TestSamplingDecision from github.com/DataDog/dd-trace-go/v2/ddtrace/tracer (Datadog) (Fix with Cursor)
Failed

=== RUN   TestSamplingDecision
--- FAIL: TestSamplingDecision (0.19s)
TestSamplingDecision/single_spans_without_max_per_second:rate_0.5 from github.com/DataDog/dd-trace-go/v2/ddtrace/tracer (Datadog) (Fix with Cursor)
Failed

=== RUN   TestSamplingDecision/single_spans_without_max_per_second:rate_0.5
    tracer_test.go:703: 
        	Error Trace:	D:/a/dd-trace-go/dd-trace-go/ddtrace/tracer/tracer_test.go:703
        	Error:      	Max difference between 0.8 and 0.64 allowed is 0.15, but difference was 0.16000000000000003
        	Test:       	TestSamplingDecision/single_spans_without_max_per_second:rate_0.5
    --- FAIL: TestSamplingDecision/single_spans_without_max_per_second:rate_0.5 (0.08s)

ℹ️ Info

🧪 All tests passed

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: f3e5ba3 | Docs | Datadog PR Page | Was this helpful? Give us feedback!

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