Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

all: upgrade minimum supported Go release to 1.22 #2850

Merged
merged 2 commits into from
Sep 9, 2024

Conversation

nsrip-dd
Copy link
Contributor

@nsrip-dd nsrip-dd commented Sep 9, 2024

What does this PR do?

With Go 1.23 released on 2024-08-13, we drop support for Go 1.21. This
means Go 1.22 is now our minimum supported Go release. Update our CI
files to reflect our current supported Go versions, and remove pre-Go
1.22 workarounds.

In addition to the CI bumps, this PR changes/fixes a few things related to the upgrade:

  • Drops the old rand from the tracer, now that we can depend on math/rand/v2.
  • Uses slices in the appsec package.
  • The TestWrapHandlerWithResourceNameNoRace got a new data race. Specifically,
    by bumping our go.mod to 1.22, we get the new 1.22 ServeMux behavior internally.
    The 1.22 ServeMux modifies the Request, introducing a race with all the goroutines
    accessing/modifying the request concurrently. Fix it by giving each goroutine its own
    request. I verified that the test still catches the intended bug by reverting the fix from
    contrib/net/http: Copy span options and resource name to avoid data race #2204 and verifying that the test fails.

Motivation

Follow our declared Go support policy.

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.
  • Add an appropriate team label so this PR gets put in the right place for the release notes.
  • Non-trivial go.mod changes, e.g. adding new modules, are reviewed by @DataDog/dd-trace-go-guild.

Unsure? Have a question? Request a review!

@pr-commenter
Copy link

pr-commenter bot commented Sep 9, 2024

Benchmarks

Benchmark execution time: 2024-09-09 17:01:02

Comparing candidate commit 333ddfe in PR branch nick.ripley/go-122-minimum with baseline commit c29e8fa in branch main.

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

With Go 1.23 released on 2024-08-13, we drop support for Go 1.21. This
means Go 1.22 is now our minimum supported Go release. Update our CI
files to reflect our current supported Go versions, and remove pre-Go
1.22 workarounds.
@nsrip-dd nsrip-dd force-pushed the nick.ripley/go-122-minimum branch from 58d3603 to 6a96206 Compare September 9, 2024 14:50
@github-actions github-actions bot added the apm:ecosystem contrib/* related feature requests or bugs label Sep 9, 2024
@nsrip-dd nsrip-dd marked this pull request as ready for review September 9, 2024 15:34
@nsrip-dd nsrip-dd requested review from a team as code owners September 9, 2024 15:34
Copy link
Member

@darccio darccio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@eliottness eliottness left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe there are small changes to do here

@nsrip-dd
Copy link
Contributor Author

nsrip-dd commented Sep 9, 2024

I believe there are small changes to do here

Done, thanks for the review @eliottness

@nsrip-dd nsrip-dd merged commit 4b164f8 into main Sep 9, 2024
156 checks passed
@nsrip-dd nsrip-dd deleted the nick.ripley/go-122-minimum branch September 9, 2024 20:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
apm:ecosystem contrib/* related feature requests or bugs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants