Skip to content

Commit bfe7488

Browse files
authored
Merge branch 'master' into post_release_steps_for_2.5.0
2 parents 8058039 + c7d75d6 commit bfe7488

File tree

558 files changed

+1630
-1815
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

558 files changed

+1630
-1815
lines changed

.circleci/config.yml

Lines changed: 79 additions & 295 deletions
Large diffs are not rendered by default.

.github/workflows/check.yml

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,27 @@
11
name: Check
22
on:
33
push:
4-
branches: [ '**' ]
5-
pull_request:
6-
# The branches below must be a subset of the branches above
7-
branches: [ '**' ]
4+
85
jobs:
6+
lint:
7+
runs-on: ubuntu-latest
8+
container:
9+
image: ghcr.io/datadog/images-rb/engines/ruby:3.2
10+
steps:
11+
- uses: actions/checkout@v4
12+
- name: Install dependencies
13+
run: bundle install
14+
- run: bundle exec rake rubocop standard
15+
916
check:
1017
name: Check types
11-
runs-on: ubuntu-22.04
18+
runs-on: ubuntu-latest
19+
container:
20+
image: ghcr.io/datadog/images-rb/engines/ruby:3.2
1221
steps:
1322
- uses: actions/checkout@v4
14-
- uses: ruby/setup-ruby@v1
15-
with:
16-
ruby-version: '3.2'
17-
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
23+
- name: Install dependencies
24+
run: bundle install
1825
- name: Check for stale signature files
1926
run: bundle exec rake rbs:stale
2027
- name: Check for missing signature files

Rakefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,8 @@ namespace :test do
5959
command = if appraisal_group.empty?
6060
"bundle exec rake #{spec_task}"
6161
else
62-
"bundle exec appraisal #{ruby_runtime}-#{appraisal_group} rake #{spec_task}"
62+
gemfile = File.join(File.dirname(__FILE__), 'gemfiles', "#{ruby_runtime}-#{appraisal_group}.gemfile".tr('-', '_'))
63+
"env BUNDLE_GEMFILE=#{gemfile} bundle exec rake #{spec_task}"
6364
end
6465

6566
command += "'[#{spec_arguments}]'" if spec_arguments

appraisal/ruby-3.4.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,9 @@
125125
gem 'sneakers', '>= 2.12.0'
126126
gem 'sucker_punch'
127127
gem 'que', '>= 1.0.0'
128+
129+
# When Rack 3+ is used, we need rackup.
130+
gem 'rackup'
128131
end
129132

130133
[

datadog.gemspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ Gem::Specification.new do |spec|
6969

7070
# When updating the version here, please also update the version in `libdatadog_extconf_helpers.rb`
7171
# (and yes we have a test for it)
72-
spec.add_dependency 'libdatadog', '~> 13.1.0.1.0'
72+
spec.add_dependency 'libdatadog', '~> 14.0.0.1.0'
7373

7474
spec.extensions = [
7575
'ext/datadog_profiling_native_extension/extconf.rb',

docs/DevelopmentGuide.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,24 @@ TEST_METADATA = {
105105
}
106106
```
107107

108+
**Using appraisal**
109+
110+
`appraisal` command should only be used to update gemfiles in `gemfiles/`
111+
and install dependencies. It should not be used to run tests, since it does not
112+
work in all configurations. To run the tests, use:
113+
114+
```sh
115+
env BUNDLE_GEMFILE=gemfiles/#{ruby_runtime}_#{appraisal_group}.gemfile rake #{spec_task}
116+
```
117+
118+
Note that the file names use underscores while appraisal group and
119+
configuration definitions use dashes. The conversion could be performed as
120+
follows:
121+
122+
```sh
123+
env BUNDLE_GEMFILE=gemfiles/#{ruby_runtime.tr('-', '_')}_#{appraisal_group.tr('-', '_')}.gemfile rake #{spec_task}
124+
```
125+
108126
**Working with appraisal groups**
109127

110128
Checkout [Apppraisal](https://github.com/thoughtbot/appraisal) to learn the basics.

ext/libdatadog_api/crashtracker.c

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -67,12 +67,10 @@ static VALUE _native_start_or_update_on_fork(int argc, VALUE *argv, DDTRACE_UNUS
6767
// The Ruby crash handler also seems to get confused when this option is enabled and
6868
// "Process.kill('SEGV', Process.pid)" gets run.
6969
.create_alt_stack = false,
70+
.use_alt_stack = true, // NOTE: This is a no-op in libdatadog 14.0; should be fixed in a future version
7071
.endpoint = endpoint,
7172
.resolve_frames = DDOG_CRASHT_STACKTRACE_COLLECTION_ENABLED_WITH_SYMBOLS_IN_RECEIVER,
72-
.timeout_secs = FIX2INT(upload_timeout_seconds),
73-
// Waits for crash tracker to finish reporting the issue before letting the Ruby process die; see
74-
// https://github.com/DataDog/libdatadog/pull/477 for details
75-
.wait_for_receiver = true,
73+
.timeout_ms = FIX2INT(upload_timeout_seconds) * 1000,
7674
};
7775

7876
ddog_crasht_Metadata metadata = {
@@ -97,7 +95,7 @@ static VALUE _native_start_or_update_on_fork(int argc, VALUE *argv, DDTRACE_UNUS
9795

9896
ddog_crasht_Result result =
9997
action == start_action ?
100-
ddog_crasht_init_with_receiver(config, receiver_config, metadata) :
98+
ddog_crasht_init(config, receiver_config, metadata) :
10199
ddog_crasht_update_on_fork(config, receiver_config, metadata);
102100

103101
// Clean up before potentially raising any exceptions

ext/libdatadog_extconf_helpers.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ module Datadog
88
module LibdatadogExtconfHelpers
99
# Used to make sure the correct gem version gets loaded, as extconf.rb does not get run with "bundle exec" and thus
1010
# may see multiple libdatadog versions. See https://github.com/DataDog/dd-trace-rb/pull/2531 for the horror story.
11-
LIBDATADOG_VERSION = '~> 13.1.0.1.0'
11+
LIBDATADOG_VERSION = '~> 14.0.0.1.0'
1212

1313
# Used as an workaround for a limitation with how dynamic linking works in environments where the datadog gem and
1414
# libdatadog are moved after the extension gets compiled.

gemfiles/jruby_9.2_activesupport.gemfile.lock

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

gemfiles/jruby_9.2_aws.gemfile.lock

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)