From 1e93b300a6c86974c3ca5ba1b36b233b542de843 Mon Sep 17 00:00:00 2001 From: Carlos Roman Date: Mon, 9 Jan 2023 12:10:04 +0100 Subject: [PATCH 1/3] Updating README.md with info on supproted versions --- .github/workflows/codeql-analysis.yml | 6 +++++ .github/workflows/datadog-go.yaml | 13 +++++++++-- .github/workflows/generate.yaml | 4 ++++ README.md | 32 ++++++++++++++++++++++++++- 4 files changed, 52 insertions(+), 3 deletions(-) diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 9c416e980..30b8dc2b6 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -3,9 +3,15 @@ name: "CodeQL" on: push: branches: [ master ] + paths-ignore: + - '*.md' + - '*.txt' pull_request: # The branches below must be a subset of the branches above branches: [ master ] + paths-ignore: + - '*.md' + - '*.txt' jobs: analyze: diff --git a/.github/workflows/datadog-go.yaml b/.github/workflows/datadog-go.yaml index aac1d4312..f4078a68b 100644 --- a/.github/workflows/datadog-go.yaml +++ b/.github/workflows/datadog-go.yaml @@ -1,8 +1,17 @@ -# We use github actions to test the code on windows and linux amd64. Circleci is used for linux arm64. - +--- +# We use github actions to test the code on windows and linux amd64. +# Circleci is used for linux arm64. +# name: datadog-go on: + push: + paths-ignore: + - '*.md' + - '*.txt' pull_request: + paths-ignore: + - '*.md' + - '*.txt' jobs: native: diff --git a/.github/workflows/generate.yaml b/.github/workflows/generate.yaml index f8362c159..0c89d739e 100644 --- a/.github/workflows/generate.yaml +++ b/.github/workflows/generate.yaml @@ -1,6 +1,10 @@ +--- name: generate-mock on: pull_request: + paths-ignore: + - '*.md' + - '*.txt' jobs: native: diff --git a/README.md b/README.md index 1bc0133fa..7a1296838 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ `datadog-go` is a library that provides a [DogStatsD](https://docs.datadoghq.com/developers/dogstatsd/?code-lang=go) client in Golang. -Go 1.12+ is officially supported. Older versions might work but are not tested. +Go 1.16+ is officially supported. Older versions might work but are not tested. The following documentation is available: @@ -33,6 +33,8 @@ The following documentation is available: - [Tweaking kernel options](#tweaking-kernel-options) + [Unix Domain Sockets](#unix-domain-sockets) - [Maximum packets size in high-throughput scenarios](#maximum-packets-size-in-high-throughput-scenarios) +* [Support Policy](#support-policy) +* [Supported Versions](#supported-versions) * [Development](#development) * [License](#license) * [Credits](#credits) @@ -227,6 +229,34 @@ func main() { } ``` +### Support Policy + +`datadog-go` is built upon dependencies defined in specific versions of Go releases and the Datadog Agent/API. +For Go the two latest releases are [GA](#support-ga) supported and the version before that (till version `1.12`) are in [Maintenance](#support-maintenance). +We do not 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** | +|--------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| General Availability (GA) | Full implementation of all features. Full support for new features, bug & security fixes. | +| Maintenance | Full implementation of existing features. May receive new features. Support for bug & security fixes only. | +| Legacy | Legacy implementation. May have limited function, but no maintenance provided. [Contact our customer support team for special requests.](https://www.datadoghq.com/support/) | + +### Supported Versions + +| **Go Version** | **Support level** | +|----------------|-------------------------------------| +| 1.19 | [GA](#support-ga) | +| 1.18 | [GA](#support-ga) | +| 1.17 | [Maintenance](#support-maintenance) | +| 1.16 | [Maintenance](#support-maintenance) | +| 1.15 | [Maintenance](#support-maintenance) | +| 1.14 | [Maintenance](#support-maintenance) | +| 1.13 | [Maintenance](#support-maintenance) | +| 1.12 | [Maintenance](#support-maintenance) | + +Future releases may move older Go versions support to [Legacy](#support-legacy), which will be done in a **minor** version change. + ## Development Run the tests with: From 56d379dad684ac4ff36aed25d2d952458e05ee84 Mon Sep 17 00:00:00 2001 From: Carlos Roman Date: Mon, 9 Jan 2023 12:11:36 +0100 Subject: [PATCH 2/3] Added new Golang build constraints introduced in Go 1.17 --- .circleci/config.yml | 14 +++++++++++--- statsd/benchmark_report_metric_noop_test.go | 1 + statsd/benchmark_report_metric_test.go | 1 + statsd/end_to_end_uds_test.go | 1 + statsd/pipe.go | 1 + statsd/pipe_windows.go | 1 + statsd/pipe_windows_test.go | 1 + statsd/uds.go | 1 + statsd/uds_test.go | 1 + statsd/uds_windows.go | 1 + 10 files changed, 20 insertions(+), 3 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index be8a7102a..33bd4d00f 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,3 +1,4 @@ +--- # We use github actions to test the code on windows and linux amd64. Circleci is used for linux arm64. # version: 2.1 @@ -9,7 +10,7 @@ executors: linux_arm64: description: "arm64" machine: - image: ubuntu-2004:202101-01 + image: ubuntu-2004:2022.04.1 resource_class: arm.medium commands: @@ -18,7 +19,7 @@ commands: version: type: string steps: - - os-detect/init # this setup the '$SUDO' variable + - os-detect/init # this setup the '$SUDO' variable - run: name: "install Golang linux" command: | @@ -72,4 +73,11 @@ workflows: - tests_arm64: matrix: parameters: - go-version: ["1.13", "1.14", "1.15", "1.16", "1.17"] + go-version: + - "1.13" + - "1.14" + - "1.15" + - "1.16" + - "1.17" + - "1.18" + - "1.19" diff --git a/statsd/benchmark_report_metric_noop_test.go b/statsd/benchmark_report_metric_noop_test.go index 8e1cabd87..837e91d5a 100644 --- a/statsd/benchmark_report_metric_noop_test.go +++ b/statsd/benchmark_report_metric_noop_test.go @@ -1,3 +1,4 @@ +//go:build !go1.13 // +build !go1.13 package statsd_test diff --git a/statsd/benchmark_report_metric_test.go b/statsd/benchmark_report_metric_test.go index dcf0f522a..cb7325e14 100644 --- a/statsd/benchmark_report_metric_test.go +++ b/statsd/benchmark_report_metric_test.go @@ -1,3 +1,4 @@ +//go:build go1.13 // +build go1.13 package statsd_test diff --git a/statsd/end_to_end_uds_test.go b/statsd/end_to_end_uds_test.go index be4f4b9a3..7f15f1a37 100644 --- a/statsd/end_to_end_uds_test.go +++ b/statsd/end_to_end_uds_test.go @@ -1,3 +1,4 @@ +//go:build !windows // +build !windows package statsd diff --git a/statsd/pipe.go b/statsd/pipe.go index 84c38e966..426359c5f 100644 --- a/statsd/pipe.go +++ b/statsd/pipe.go @@ -1,3 +1,4 @@ +//go:build !windows // +build !windows package statsd diff --git a/statsd/pipe_windows.go b/statsd/pipe_windows.go index 5ab60f00c..2ca85f70f 100644 --- a/statsd/pipe_windows.go +++ b/statsd/pipe_windows.go @@ -1,3 +1,4 @@ +//go:build windows // +build windows package statsd diff --git a/statsd/pipe_windows_test.go b/statsd/pipe_windows_test.go index 1efbf2b8d..0a3279e70 100644 --- a/statsd/pipe_windows_test.go +++ b/statsd/pipe_windows_test.go @@ -1,3 +1,4 @@ +//go:build windows // +build windows package statsd diff --git a/statsd/uds.go b/statsd/uds.go index fa5f5917f..510a7603b 100644 --- a/statsd/uds.go +++ b/statsd/uds.go @@ -1,3 +1,4 @@ +//go:build !windows // +build !windows package statsd diff --git a/statsd/uds_test.go b/statsd/uds_test.go index fb1c0c829..939b3e2c1 100644 --- a/statsd/uds_test.go +++ b/statsd/uds_test.go @@ -1,3 +1,4 @@ +//go:build !windows // +build !windows package statsd diff --git a/statsd/uds_windows.go b/statsd/uds_windows.go index 077894a33..bd358aefc 100644 --- a/statsd/uds_windows.go +++ b/statsd/uds_windows.go @@ -1,3 +1,4 @@ +//go:build windows // +build windows package statsd From 794b70ca4d972ff9d02a623520867baaf2ee2184 Mon Sep 17 00:00:00 2001 From: Carlos Roman Date: Tue, 21 Feb 2023 10:30:18 +0000 Subject: [PATCH 3/3] Adding Golang 1.20 support --- .circleci/config.yml | 1 + .github/workflows/datadog-go.yaml | 1 + .gitignore | 1 + README.md | 3 ++- 4 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 33bd4d00f..5f9dbdada 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -81,3 +81,4 @@ workflows: - "1.17" - "1.18" - "1.19" + - "1.20" diff --git a/.github/workflows/datadog-go.yaml b/.github/workflows/datadog-go.yaml index f4078a68b..703a8bfab 100644 --- a/.github/workflows/datadog-go.yaml +++ b/.github/workflows/datadog-go.yaml @@ -25,6 +25,7 @@ jobs: - 1.17 - 1.18 - 1.19 + - "1.20" # bug as without the quotes you get go 1.2 runs-on: - macos-latest - ubuntu-latest diff --git a/.gitignore b/.gitignore index 381931381..bb526f2b1 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ *.swp *.swo +vendor/ diff --git a/README.md b/README.md index 7a1296838..beea52a6b 100644 --- a/README.md +++ b/README.md @@ -246,8 +246,9 @@ This library only officially supports [first class ports](https://github.com/gol | **Go Version** | **Support level** | |----------------|-------------------------------------| +| 1.20 | [GA](#support-ga) | | 1.19 | [GA](#support-ga) | -| 1.18 | [GA](#support-ga) | +| 1.18 | [Maintenance](#support-maintenance) | | 1.17 | [Maintenance](#support-maintenance) | | 1.16 | [Maintenance](#support-maintenance) | | 1.15 | [Maintenance](#support-maintenance) |