Skip to content

Commit

Permalink
all: align Go support with upstream policy (#2705)
Browse files Browse the repository at this point in the history
The Go project supports only the two most recent language versions. See
https://go.dev/doc/devel/release#policy. Older language versions do not
receive bug/security fixes. This commit aligns the dd-trace-go support
policy with the official one, dropping support for the third most recent
language version (1.20 as of this commit). This will let us more quickly
adopt new features from Go, such as structured logging from slog or
runtime execution trace flight recording, or any other new APIs added in
the future.
  • Loading branch information
nsrip-dd authored Jun 26, 2024
1 parent b70405a commit 3200ef3
Show file tree
Hide file tree
Showing 13 changed files with 81 additions and 61 deletions.
14 changes: 3 additions & 11 deletions .github/workflows/appsec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ jobs:
strategy:
matrix:
runs-on: [ macos-12, macos-14 ] # oldest and newest macos runners available - macos-14 mainly is here to cover the fact it is an ARM machine
go-version: [ "1.22", "1.21", "1.20" ]
go-version: [ "1.22", "1.21" ]
fail-fast: true # saving some CI time - macos runners too long to get
steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -124,9 +124,6 @@ jobs:
run: |
set -euxo pipefail
cgocheck="GOEXPERIMENT=cgocheck2"
if [[ "$(go version)" =~ go1.20 ]]; then
cgocheck="GODEBUG=cgocheck=2"
fi
for cgo in "0" "1"; do
for appsec_enabled_env in "" "DD_APPSEC_ENABLED=true" "DD_APPSEC_ENABLED=false"; do
for cgocheck_env in "" "$cgocheck"; do
Expand Down Expand Up @@ -190,14 +187,9 @@ jobs:
needs: go-mod-caching
strategy:
matrix:
go-version: [ "1.22", "1.21", "1.20" ]
distribution: [ bookworm, bullseye, buster, alpine ]
go-version: [ "1.22", "1.21" ]
distribution: [ bookworm, bullseye, alpine ]
platform: [ linux/amd64, linux/arm64 ]
exclude:
- go-version: "1.21"
distribution: buster
- go-version: "1.22"
distribution: buster

fail-fast: false
steps:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/main-branch-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
unit-integration-tests:
strategy:
matrix:
go-version: ["1.20", "1.21", "1.22"]
go-version: [ "1.21", "1.22" ]
fail-fast: false
uses: ./.github/workflows/unit-integration-tests.yml
with:
Expand All @@ -33,7 +33,7 @@ jobs:
strategy:
matrix:
runs-on: [ macos-latest, windows-latest, ubuntu-latest ]
go-version: ["1.20", "1.21", "1.22"]
go-version: [ "1.21", "1.22" ]
fail-fast: false
uses: ./.github/workflows/multios-unit-tests.yml
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/multios-unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ env:

jobs:
test-multi-os:
runs-on: "${{ (inputs.go-version == '1.20' && inputs.runs-on == 'windows-latest') && 'windows-2019' || inputs.runs-on }}"
runs-on: "${{ inputs.runs-on }}"
env:
REPORT: gotestsum-report.xml # path to where test results will be saved
DD_APPSEC_WAF_TIMEOUT: 1h
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/parametric-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:

- uses: actions/setup-go@v3
with:
go-version: "1.20"
go-version: "oldstable"

- name: Build runner
uses: ./.github/actions/install_runner
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@ jobs:
name: PR Unit and Integration Tests
uses: ./.github/workflows/unit-integration-tests.yml
with:
go-version: "1.20"
go-version: "1.21"
ref: ${{ github.ref }}
secrets: inherit
4 changes: 2 additions & 2 deletions .github/workflows/smoke-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ jobs:
ref: ${{ inputs.ref || github.ref }}
- uses: actions/setup-go@v3
with:
go-version: "stable"
go-version: "1.21"
cache: true
- name: go mod tidy
run: |-
Expand All @@ -99,7 +99,7 @@ jobs:
matrix:
# TODO: cross-compilation from/to different hardware architectures once
# github provides native ARM runners.
go: [ "1.20", "1.21", "1.22" ]
go: [ "1.21", "1.22" ]
build-env: [ alpine, bookworm, bullseye ]
build-with-cgo: [ 0, 1 ]
deployment-env: [ alpine, debian11, debian12, al2, al2023, busybox, scratch ]
Expand Down
42 changes: 2 additions & 40 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,47 +43,9 @@ If you installed more packages than you intended, you can use `go mod tidy` to r
- [Application Security Monitoring](https://docs.datadoghq.com/security_platform/application_security/setup_and_configure/?code-lang=go)
- If you are migrating from an older version of the tracer (e.g. 0.6.x) you may also find the [migration document](MIGRATING.md) we've put together helpful.

### Support Policy
### Go Support Policy

Datadog APM for Go is built upon dependencies defined in specific versions of the host operating system, Go releases, and the Datadog Agent/API. For Go the two latest releases are [GA](#support-ga) supported and the version before that is in [Maintenance](#support-maintenance). We do make efforts to support older releases, but generally these releases are considered [Legacy](#support-legacy). This library only officially supports [first class ports](https://github.com/golang/go/wiki/PortingPolicy#first-class-ports) of Go.

| **Level** | **Support provided** |
|--------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| <span id="support-ga">General Availability (GA)</span> | Full implementation of all features. Full support for new features, bug & security fixes. |
| <span id="support-maintenance">Maintenance</span> | Full implementation of existing features. May receive new features. Support for bug & security fixes only. |
| <span id="support-legacy">Legacy</span> | Legacy implementation. May have limited function, but no maintenance provided. Not guaranteed to compile the latest version of dd-trace-go. [Contact our customer support team for special requests.](https://www.datadoghq.com/support/) |

### Supported Versions
<!-- NOTE: When updating the below section ensure you update the minimum supported version listed in the public docs here: https://docs.datadoghq.com/tracing/setup_overview/setup/go/?tab=containers#compatibility-requirements -->
| **Go Version** | **Support level** |
|----------------|-------------------------------------|
| 1.22 | [GA](#support-ga) |
| 1.21 | [GA](#support-ga) |
| 1.20 | [Maintenance](#support-maintenance) |

* Datadog's Trace Agent >= 5.21.1


#### Package Versioning

A **Minor** version change will be released whenever a new version of Go is released. At that time the newest version of Go is added to [GA](#support-ga), the second oldest supported version moved to [Maintenance](#support-maintenance) and the oldest previously supported version dropped to [Legacy](#support-legacy).
**For example**:
For a dd-trace-go version 1.37.*

| Go Version | Support |
|------------|-------------------------------------|
| 1.18 | [GA](#support-ga) |
| 1.17 | [GA](#support-ga) |
| 1.16 | [Maintenance](#support-maintenance) |

Then after Go 1.19 is released there will be a new dd-trace-go version 1.38.0 with support:

| Go Version | Support |
|------------|-------------------------------------|
| 1.19 | [GA](#support-ga) |
| 1.18 | [GA](#support-ga) |
| 1.17 | [Maintenance](#support-maintenance) |
| 1.16 | [Legacy](#support-legacy) |
Datadog APM for Go is built upon dependencies defined in specific versions of the host operating system, Go releases, and the Datadog Agent/API. dd-trace-go supports the two latest releases of Go, matching the [official Go policy](https://go.dev/doc/devel/release#policy). This library only officially supports [first class ports](https://go.dev/wiki/PortingPolicy) of Go.

### Contributing

Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module gopkg.in/DataDog/dd-trace-go.v1

go 1.20
go 1.21

require (
cloud.google.com/go/pubsub v1.33.0
Expand Down
Loading

0 comments on commit 3200ef3

Please sign in to comment.