[EXPERIMENTAL] feat(ci): single source of truth for Go versions#4452
[EXPERIMENTAL] feat(ci): single source of truth for Go versions#4452
Conversation
…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
BenchmarksBenchmark execution time: 2026-02-20 14:18:27 Comparing candidate commit f3e5ba3 in PR branch Found 0 performance improvements and 0 performance regressions! Performance is the same for 156 metrics, 8 unstable metrics.
|
…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>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files🚀 New features to boost your workflow:
|
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.
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.
…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 Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files🚀 New features to boost your workflow:
|
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 Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files🚀 New features to boost your workflow:
|
|
✨ Fix all issues with BitsAI or with Cursor
|
What does this PR do?
Reads the stable Go version from the local
go-versions.ymland passes it asGO_VERSIONtobuild.shin the system-tests weblog build step.build.shforwards it as--build-arg GO_VERSION=...todocker buildx build, which overrides theARG GO_VERSION=1.26default in the Go weblog Dockerfiles.Motivation
go-versions.ymlis already the single source of truth for Go versions in this repo. The system-tests weblog Dockerfiles were still hardcodinggolang: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.ymlupdate will automatically use the new version.Companion PR: DataDog/system-tests#6350
Reviewer's Checklist
make lintlocally.make testlocally.make generatelocally.make fix-moduleslocally.Unsure? Have a question? Request a review!