Skip to content

Comments

[EXPERIMENTAL] feat(golang): single source of truth for Go versions via dd-trace-go go-versions.yml#6350

Draft
kakkoyun wants to merge 1 commit intomainfrom
kakkoyun/single-source-go-versions
Draft

[EXPERIMENTAL] feat(golang): single source of truth for Go versions via dd-trace-go go-versions.yml#6350
kakkoyun wants to merge 1 commit intomainfrom
kakkoyun/single-source-go-versions

Conversation

@kakkoyun
Copy link
Member

Motivation

dd-trace-go/go-versions.yml is the single source of truth for Go versions. system-tests still hardcodes golang:1.24 across 10 Dockerfiles, requiring a manual PR on every Go version bump (e.g. #6277).

This PR makes those manual PRs unnecessary.

Changes

  • New .github/actions/go-versions/action.yml — composite action that fetches go-versions.yml from DataDog/dd-trace-go/main via HTTPS and exports stable, oldstable, stable_patch, oldstable_patch as step outputs.
  • 10 Go Dockerfiles — parameterized with ARG GO_VERSION=1.26 before FROM. Each Dockerfile re-declares ARG GO_VERSION inside its build stage and runs go mod edit -go=${GO_VERSION} to keep the go.mod language directive in sync at build time.
  • utils/build/build.sh — forwards GO_VERSION env var as --build-arg GO_VERSION=... to docker buildx build. No-op when GO_VERSION is unset (other languages unaffected).
  • system-tests.yml + run-end-to-end.yml — add a "Fetch Go versions" step (skipped for non-golang libraries) before the weblog build, passing GO_VERSION as an env var.

Companion PR in dd-trace-go wires the local go-versions.yml into its own system-tests workflow.

Workflow

  1. ⚠️ Create your PR as draft ⚠️
  2. Work on you PR until the CI passes
  3. Mark it as ready for review
    • Test logic is modified? -> Get a review from RFC owner.
    • Framework is modified, or non obvious usage of it -> get a review from R&P team

🚀 Once your PR is reviewed and the CI green, you can merge it!

🛟 #apm-shared-testing 🛟

Reviewer checklist

  • Anything but tests/ or manifests/ is modified ? I have the approval from R&P team
  • A docker base image is modified?
    • the relevant build-XXX-image label is present
  • A scenario is added, removed or renamed?

kakkoyun added a commit to DataDog/dd-trace-go that referenced this pull request Feb 19, 2026
…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 force-pushed the kakkoyun/single-source-go-versions branch from 72279d8 to 0c6d308 Compare February 19, 2026 20:37
@github-actions
Copy link
Contributor

CODEOWNERS have been resolved as:

.github/actions/go-versions/action.yml                                  @DataDog/system-tests-core
.github/workflows/run-end-to-end.yml                                    @DataDog/system-tests-core
.github/workflows/system-tests.yml                                      @DataDog/system-tests-core
utils/build/build.sh                                                    @DataDog/system-tests-core
utils/build/docker/golang/chi.Dockerfile                                @DataDog/dd-trace-go-guild @DataDog/system-tests-core
utils/build/docker/golang/echo.Dockerfile                               @DataDog/dd-trace-go-guild @DataDog/system-tests-core
utils/build/docker/golang/gin.Dockerfile                                @DataDog/dd-trace-go-guild @DataDog/system-tests-core
utils/build/docker/golang/gqlgen.Dockerfile                             @DataDog/dd-trace-go-guild @DataDog/system-tests-core
utils/build/docker/golang/graph-gophers.Dockerfile                      @DataDog/dd-trace-go-guild @DataDog/system-tests-core
utils/build/docker/golang/graphql-go.Dockerfile                         @DataDog/dd-trace-go-guild @DataDog/system-tests-core
utils/build/docker/golang/net-http-orchestrion.Dockerfile               @DataDog/dd-trace-go-guild @DataDog/system-tests-core
utils/build/docker/golang/net-http.Dockerfile                           @DataDog/dd-trace-go-guild @DataDog/system-tests-core
utils/build/docker/golang/parametric/Dockerfile                         @DataDog/dd-trace-go-guild @DataDog/system-tests-core
utils/build/docker/golang/uds-echo.Dockerfile                           @DataDog/dd-trace-go-guild @DataDog/system-tests-core

@datadog-datadog-prod-us1
Copy link

datadog-datadog-prod-us1 bot commented Feb 19, 2026

⚠️ Tests

Fix all issues with BitsAI or with Cursor

⚠️ Warnings

❄️ 17 New flaky tests detected

tests.appsec.test_blocking_addresses.Test_Blocking_client_ip.test_blocking_before[envoy] from system_tests_suite (Datadog) (Fix with Cursor)
ValueError: No appsec event validate this condition

self = <tests.appsec.test_blocking_addresses.Test_Blocking_client_ip object at 0x7f715fc7bb60>

    def test_blocking_before(self):
        """Test that blocked requests are blocked before being processed"""
        # second request should block and must not set the tag in span
        assert self.block_req2.status_code == 403
>       interfaces.library.assert_waf_attack(self.block_req2, rule="blk-001-001")

...
tests.appsec.test_blocking_addresses.Test_Blocking_client_ip.test_blocking[envoy] from system_tests_suite (Datadog) (Fix with Cursor)
ValueError: No appsec event validate this condition

self = <tests.appsec.test_blocking_addresses.Test_Blocking_client_ip object at 0x7f715fc7baa0>

    def test_blocking(self):
        """Can block the request forwarded for the ip"""
    
        assert self.rm_req_block.status_code == 403
>       interfaces.library.assert_waf_attack(self.rm_req_block, rule="blk-001-001")

...
tests.appsec.test_blocking_addresses.Test_Blocking_client_ip_with_forwarded.test_blocking_before[envoy] from system_tests_suite (Datadog) (Fix with Cursor)
ValueError: No appsec event validate this condition

self = <tests.appsec.test_blocking_addresses.Test_Blocking_client_ip_with_forwarded object at 0x7f715fca0080>

    def test_blocking_before(self):
        """Test that blocked requests are blocked before being processed"""
        # second request should block and must not set the tag in span
        assert self.block_req2.status_code == 403
>       interfaces.library.assert_waf_attack(self.block_req2, rule="blk-001-001")

...
View all

ℹ️ Info

🧪 All tests passed

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

Add a composite action that fetches go-versions.yml from DataDog/dd-trace-go
main branch, and wire the stable Go version through build.sh into all 10 Go
weblog Dockerfiles via ARG GO_VERSION. Each Dockerfile also runs
`go mod edit -go=${GO_VERSION}` at build time so the language directive in
go.mod stays in sync with the base image.

This eliminates manual Go version bump PRs — system-tests CI derives the
version from dd-trace-go's single source of truth on every build.

Signed-off-by: Kemal Akkoyun <kemal.akkoyun@datadoghq.com>
@kakkoyun kakkoyun force-pushed the kakkoyun/single-source-go-versions branch from 0c6d308 to acf57ff Compare February 21, 2026 10:26
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