fix(ddtrace/tracer): avoid tests to fail with error "non-constant format string" from upcoming Go 1.24 release#3048
Merged
Conversation
…mat string" from upcoming Go 1.24 release
Datadog ReportBranch report: ✅ 0 Failed, 2996 Passed, 24 Skipped, 2m 33.38s Total Time |
BenchmarksBenchmark execution time: 2025-01-13 11:41:13 Comparing candidate commit a538fc4 in PR branch Found 0 performance improvements and 2 performance regressions! Performance is the same for 56 metrics, 1 unstable metrics. scenario:BenchmarkPartialFlushing/Disabled-24
scenario:BenchmarkPartialFlushing/Enabled-24
|
juan-fernandez
requested review from
tonyredondo
and removed request for
juan-fernandez
December 19, 2024 13:20
tonyredondo
approved these changes
Jan 13, 2025
RomainMuller
approved these changes
Jan 13, 2025
hannahkm
approved these changes
Jan 13, 2025
darccio
enabled auto-merge (squash)
January 13, 2025 15:19
darccio
added a commit
that referenced
this pull request
Jan 13, 2025
…mat string" from upcoming Go 1.24 release (#3048)
7 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Upcoming Go 1.24 release introduces a new
go vetcheck (golang/go#60529) for printf calls with non-const format and no args. This causesgo testto fail to run ingotip:We decided to strategically modify all logging statements, after trying refactoring
internal/logAPI to offer:Debug,Info,Warn,Errorfunctions for logging a string without argumentsDebugf,Infof,Warnf,Errorffunction for logging formatted messages with argumentsThis caused a significant amount of changes across the repository, but we want to keep the API as coherent as possible. It mirrors stdlib's
logAPI.Motivation
Avoid unintended consequences from upcoming Go 1.24 release.
Reviewer's Checklist
v2-devbranch and reviewed by @DataDog/apm-go.Unsure? Have a question? Request a review!