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

[PROF-9257] Fix incorrect platform detection for x86_64-linux-gnu/aarch64-linux-gnu #338

Merged
merged 3 commits into from
Mar 4, 2024

Conversation

ivoanjo
Copy link
Member

@ivoanjo ivoanjo commented Mar 4, 2024

What does this PR do?

This PR fixes platform detection not working correctly when the user's platform is x86_64-linux-gnu/aarch64-linux-gnu.

This manifested to a user as the following error:

Profiling was requested but is not supported, profiling disabled: Your ddtrace installation is missing support for the Continuous Profiler because the libdatadog gem installed on your system is missing binaries for your platform variant. (Your platform: x86_64-linux-gnu) (Available binaries: x86_64-linux, x86_64-linux-musl)

In the past, rubygems did this normalization for us (we even had a comment mentioning it in the code!) but this was removed in rubygems/rubygems#5852 for Rubygems 3.4+

I'm also bumping the GEM_MAJOR_VERSION in the version.rb file so I can release this fix as libdatadog 6.0.0.2.0 for Ruby as soon as this PR is merged.

Motivation

Make sure our platform detection code is correct.

Additional Notes

N/A

How to test the change?

This change includes test coverage.

For Reviewers

  • If this PR touches code that signs or publishes builds or packages, or handles credentials of any kind, I've requested a review from @DataDog/security-design-and-guidance.
  • This PR doesn't touch any of that.

ivoanjo added 3 commits March 4, 2024 10:34
…ch64-linux-gnu

**What does this PR do?**

This PR fixes platform detection not working correctly when the
user's platform is `x86_64-linux-gnu`/`aarch64-linux-gnu`.

This manifested to a user as the following error:

> Profiling was requested but is not supported, profiling disabled: Your
> ddtrace installation is missing support for the Continuous Profiler
> because the `libdatadog` gem installed on your system is missing
> binaries for your platform variant.
> (Your platform: `x86_64-linux-gnu`)
> (Available binaries: `x86_64-linux`, `x86_64-linux-musl`)

In the past, rubygems did this normalization for us (we even had
a comment mentioning it in the code!) but this was removed in
rubygems/rubygems#5852 for Rubygems 3.4+

I'm also bumping the `GEM_MAJOR_VERSION` in the `version.rb` file
so I can release this fix as libdatadog 6.0.0.2.0 for Ruby as
soon as this PR is merged.

**Motivation:**

Make sure our platform detection code is correct.

**Additional Notes:**

N/A

**How to test the change?**

This change includes test coverage.
@ivoanjo ivoanjo requested a review from a team as a code owner March 4, 2024 11:12
@ivoanjo ivoanjo requested a review from AlexJF March 4, 2024 11:13
ivoanjo added a commit to DataDog/dd-trace-rb that referenced this pull request Mar 4, 2024
…r x86_64-linux-gnu/aarch64-linux-gnu

**What does this PR do?**

This PR pulls in the change from
DataDog/libdatadog#338 that fixes
platform detection not working correctly when the user's platform is
`x86_64-linux-gnu`/`aarch64-linux-gnu`.

This manifested to a user as the following error:

> Profiling was requested but is not supported, profiling disabled: Your
> ddtrace installation is missing support for the Continuous Profiler
> because the `libdatadog` gem installed on your system is missing
> binaries for your platform variant.
> (Your platform: `x86_64-linux-gnu`)
> (Available binaries: `x86_64-linux`, `x86_64-linux-musl`)

The fix is entirely on the libdatadog side; on the dd-trace-rb side
we only need to pick up that libdatadog version.

**Motivation:**

Make sure our platform detection code is correct.

**Additional Notes:**

I've also slightly tweaked the error message to output the platform
as seen/normalized by libdatadog, as otherwise it could get
confusing to debug.

I'm opening this PR before the libdatadog PR is merged and
released, so CI will obviously be red (since the release is not
on rubygems.org). I'll re-trigger CI once the libdatadog release
is out. (I've tested it locally and it works fine)

**How to test the change?**

This change includes test coverage on the libdatadog side.
@ivoanjo ivoanjo merged commit 9385ae7 into main Mar 4, 2024
29 checks passed
@ivoanjo ivoanjo deleted the ivoanjo/prof-9257-ruby-platform-detection branch March 4, 2024 11:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants