Skip to content

Commit

Permalink
Merge branch 'master' into post_release_steps_for_2.5.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Strech authored Nov 6, 2024
2 parents 8058039 + c7d75d6 commit bfe7488
Show file tree
Hide file tree
Showing 558 changed files with 1,630 additions and 1,815 deletions.
374 changes: 79 additions & 295 deletions .circleci/config.yml

Large diffs are not rendered by default.

25 changes: 16 additions & 9 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,27 @@
name: Check
on:
push:
branches: [ '**' ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ '**' ]

jobs:
lint:
runs-on: ubuntu-latest
container:
image: ghcr.io/datadog/images-rb/engines/ruby:3.2
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: bundle install
- run: bundle exec rake rubocop standard

check:
name: Check types
runs-on: ubuntu-22.04
runs-on: ubuntu-latest
container:
image: ghcr.io/datadog/images-rb/engines/ruby:3.2
steps:
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
ruby-version: '3.2'
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
- name: Install dependencies
run: bundle install
- name: Check for stale signature files
run: bundle exec rake rbs:stale
- name: Check for missing signature files
Expand Down
3 changes: 2 additions & 1 deletion Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,8 @@ namespace :test do
command = if appraisal_group.empty?
"bundle exec rake #{spec_task}"
else
"bundle exec appraisal #{ruby_runtime}-#{appraisal_group} rake #{spec_task}"
gemfile = File.join(File.dirname(__FILE__), 'gemfiles', "#{ruby_runtime}-#{appraisal_group}.gemfile".tr('-', '_'))
"env BUNDLE_GEMFILE=#{gemfile} bundle exec rake #{spec_task}"
end

command += "'[#{spec_arguments}]'" if spec_arguments
Expand Down
3 changes: 3 additions & 0 deletions appraisal/ruby-3.4.rb
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,9 @@
gem 'sneakers', '>= 2.12.0'
gem 'sucker_punch'
gem 'que', '>= 1.0.0'

# When Rack 3+ is used, we need rackup.
gem 'rackup'
end

[
Expand Down
2 changes: 1 addition & 1 deletion datadog.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ Gem::Specification.new do |spec|

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

spec.extensions = [
'ext/datadog_profiling_native_extension/extconf.rb',
Expand Down
18 changes: 18 additions & 0 deletions docs/DevelopmentGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,24 @@ TEST_METADATA = {
}
```

**Using appraisal**

`appraisal` command should only be used to update gemfiles in `gemfiles/`
and install dependencies. It should not be used to run tests, since it does not
work in all configurations. To run the tests, use:

```sh
env BUNDLE_GEMFILE=gemfiles/#{ruby_runtime}_#{appraisal_group}.gemfile rake #{spec_task}
```

Note that the file names use underscores while appraisal group and
configuration definitions use dashes. The conversion could be performed as
follows:

```sh
env BUNDLE_GEMFILE=gemfiles/#{ruby_runtime.tr('-', '_')}_#{appraisal_group.tr('-', '_')}.gemfile rake #{spec_task}
```

**Working with appraisal groups**

Checkout [Apppraisal](https://github.com/thoughtbot/appraisal) to learn the basics.
Expand Down
8 changes: 3 additions & 5 deletions ext/libdatadog_api/crashtracker.c
Original file line number Diff line number Diff line change
Expand Up @@ -67,12 +67,10 @@ static VALUE _native_start_or_update_on_fork(int argc, VALUE *argv, DDTRACE_UNUS
// The Ruby crash handler also seems to get confused when this option is enabled and
// "Process.kill('SEGV', Process.pid)" gets run.
.create_alt_stack = false,
.use_alt_stack = true, // NOTE: This is a no-op in libdatadog 14.0; should be fixed in a future version
.endpoint = endpoint,
.resolve_frames = DDOG_CRASHT_STACKTRACE_COLLECTION_ENABLED_WITH_SYMBOLS_IN_RECEIVER,
.timeout_secs = FIX2INT(upload_timeout_seconds),
// Waits for crash tracker to finish reporting the issue before letting the Ruby process die; see
// https://github.com/DataDog/libdatadog/pull/477 for details
.wait_for_receiver = true,
.timeout_ms = FIX2INT(upload_timeout_seconds) * 1000,
};

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

ddog_crasht_Result result =
action == start_action ?
ddog_crasht_init_with_receiver(config, receiver_config, metadata) :
ddog_crasht_init(config, receiver_config, metadata) :
ddog_crasht_update_on_fork(config, receiver_config, metadata);

// Clean up before potentially raising any exceptions
Expand Down
2 changes: 1 addition & 1 deletion ext/libdatadog_extconf_helpers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ module Datadog
module LibdatadogExtconfHelpers
# Used to make sure the correct gem version gets loaded, as extconf.rb does not get run with "bundle exec" and thus
# may see multiple libdatadog versions. See https://github.com/DataDog/dd-trace-rb/pull/2531 for the horror story.
LIBDATADOG_VERSION = '~> 13.1.0.1.0'
LIBDATADOG_VERSION = '~> 14.0.0.1.0'

# Used as an workaround for a limitation with how dynamic linking works in environments where the datadog gem and
# libdatadog are moved after the extension gets compiled.
Expand Down
4 changes: 2 additions & 2 deletions gemfiles/jruby_9.2_activesupport.gemfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions gemfiles/jruby_9.2_aws.gemfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions gemfiles/jruby_9.2_contrib.gemfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions gemfiles/jruby_9.2_contrib_old.gemfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions gemfiles/jruby_9.2_core_old.gemfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions gemfiles/jruby_9.2_elasticsearch_7.gemfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions gemfiles/jruby_9.2_elasticsearch_8.gemfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions gemfiles/jruby_9.2_elasticsearch_latest.gemfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions gemfiles/jruby_9.2_graphql_2.0.gemfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions gemfiles/jruby_9.2_http.gemfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions gemfiles/jruby_9.2_opensearch_2.gemfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions gemfiles/jruby_9.2_opensearch_3.gemfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions gemfiles/jruby_9.2_opensearch_latest.gemfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions gemfiles/jruby_9.2_rack_1.gemfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions gemfiles/jruby_9.2_rack_2.gemfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit bfe7488

Please sign in to comment.