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

profiler/internal/pprofutils: work around breaking pprof change #2515

Merged
merged 2 commits into from
Jan 18, 2024

Conversation

nsrip-dd
Copy link
Contributor

@nsrip-dd nsrip-dd commented Jan 17, 2024

The Google pprof library introduced a breaking change, adding an extra
argument to a function we use. We currently have "smoke tests" which
assert that we can unconditionally upgrade every dependency to the
latest version and still compile.

This PR is meant to satisify that test. We don't actually need a
newer version of the pprof library. But there is a possibility (however
unlikely) that a user wants to handle pprofs separately of our library
using that library. Either we upgrade our dependency, breaking them, or
they upgrade their dependency, breaking us. To avoid either issue, use
an interface assertion to support either version of the API.

Fixes #2519

The Google pprof library introduced a breaking change, adding an extra
argument to a function we use. We currently have "smoke tests" which
assert that we can unconditionally upgrade every dependency to the
latest version and still compile.

This commit is meant to satisify that test. We don't actually *need* a
newer version of the pprof library. But there is a possibility (however
unlikely) that a user wants to handle pprofs separately of our library
using that library. Either we upgrade our dependency, breaking them, or
they upgrade their dependency, breaking us. To avoid either issue, use
an interface assertion to support either version of the API.
@pr-commenter
Copy link

pr-commenter bot commented Jan 17, 2024

Benchmarks

Benchmark execution time: 2024-01-18 09:20:16

Comparing candidate commit b9e1da3 in PR branch nick.ripley/handle-pprof-breakage with baseline commit 9f088b5 in branch main.

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

@nsrip-dd nsrip-dd marked this pull request as ready for review January 18, 2024 12:11
@nsrip-dd nsrip-dd requested a review from a team as a code owner January 18, 2024 12:11
Copy link
Member

@felixge felixge left a comment

Choose a reason for hiding this comment

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

LGTM ❤️

Do we need to worry about this change in the pprof format for our fast delta implementation?

@nsrip-dd
Copy link
Contributor Author

Do we need to worry about this change in the pprof format for our fast delta implementation?

Not right now, since the Go runtime isn't adding this new column record to pprofs yet. But good point, we should keep an eye out for that.

@nsrip-dd nsrip-dd merged commit 9b6783b into main Jan 18, 2024
154 checks passed
@nsrip-dd nsrip-dd deleted the nick.ripley/handle-pprof-breakage branch January 18, 2024 12:32
nsrip-dd added a commit that referenced this pull request Jan 18, 2024
The Google pprof library introduced a breaking change, adding an extra
argument to a function we use. We currently have "smoke tests" which
assert that we can unconditionally upgrade every dependency to the
latest version and still compile.

This commit is meant to satisify that test. We don't actually *need* a
newer version of the pprof library. But there is a possibility (however
unlikely) that a user wants to handle pprofs separately of our library
using that library. Either we upgrade our dependency, breaking them, or
they upgrade their dependency, breaking us. To avoid either issue, use
an interface assertion to support either version of the API.
katiehockman pushed a commit that referenced this pull request Jan 18, 2024
The Google pprof library introduced a breaking change, adding an extra
argument to a function we use. We currently have "smoke tests" which
assert that we can unconditionally upgrade every dependency to the
latest version and still compile.

This commit is meant to satisify that test. We don't actually *need* a
newer version of the pprof library. But there is a possibility (however
unlikely) that a user wants to handle pprofs separately of our library
using that library. Either we upgrade our dependency, breaking them, or
they upgrade their dependency, breaking us. To avoid either issue, use
an interface assertion to support either version of the API.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Latest version of github.com/google/pprof breaks dd-trace-go
3 participants