Skip to content

Commit

Permalink
Merge pull request #3682 from DataDog/tonycthsu/backkport-ffi-changes
Browse files Browse the repository at this point in the history
backport ffi changes
  • Loading branch information
TonyCTHsu authored Jun 5, 2024
2 parents e9dcf8e + 4fabb4c commit f069f6d
Show file tree
Hide file tree
Showing 934 changed files with 1,162 additions and 240 deletions.
5 changes: 4 additions & 1 deletion .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ build-gem:
when: on_success
- if: $CI_COMMIT_TAG
when: on_success
- if: $CI_COMMIT_BRANCH == 'master'
- if: $CI_COMMIT_BRANCH == 'master' || $CI_COMMIT_BRANCH == '1.x-stable'
when: on_success
- when: manual
allow_failure: true
Expand Down Expand Up @@ -107,6 +107,9 @@ build-gem:
script:
- export RUBY_PACKAGE_VERSION=$(cat tmp/version.txt)
- export DDTRACE_GEM_LOCATION=$(readlink -f pkg/ddtrace-*.gem)
- ruby -v
- gem -v
- bundler -v
- ruby .gitlab/install_ddtrace_deps.rb
artifacts:
paths:
Expand Down
5 changes: 4 additions & 1 deletion .gitlab/Dockerfile-2.7.8
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# This is copied from official Docker image, but compile Ruby with `--disable-shared` instead.
# This is copied from official Docker image
# but compile Ruby with `--disable-shared` and update gem version

FROM registry.ddbuild.io/images/mirror/buildpack-deps:buster

Expand Down Expand Up @@ -75,6 +76,8 @@ RUN set -eux; \
# verify we have no "ruby" packages installed
if dpkg -l | grep -i ruby; then exit 1; fi; \
[ "$(command -v ruby)" = '/usr/local/bin/ruby' ]; \
# update gem version
gem update --system 3.3.27;\
# rough smoke test
ruby --version; \
gem --version; \
Expand Down
5 changes: 4 additions & 1 deletion .gitlab/Dockerfile-3.0.6
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# This is copied from official Docker image, but compile Ruby with `--disable-shared` instead.
# This is copied from official Docker image
# but compile Ruby with `--disable-shared` and update gem version

FROM registry.ddbuild.io/images/mirror/buildpack-deps:buster

Expand Down Expand Up @@ -75,6 +76,8 @@ RUN set -eux; \
# verify we have no "ruby" packages installed
if dpkg -l | grep -i ruby; then exit 1; fi; \
[ "$(command -v ruby)" = '/usr/local/bin/ruby' ]; \
# update gem version
gem update --system;\
# rough smoke test
ruby --version; \
gem --version; \
Expand Down
5 changes: 4 additions & 1 deletion .gitlab/Dockerfile-3.1.4
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# This is copied from official Docker image, but compile Ruby with `--disable-shared` instead.
# This is copied from official Docker image
# but compile Ruby with `--disable-shared` and update gem version

FROM registry.ddbuild.io/images/mirror/buildpack-deps:buster

Expand Down Expand Up @@ -75,6 +76,8 @@ RUN set -eux; \
# verify we have no "ruby" packages installed
if dpkg -l | grep -i ruby; then exit 1; fi; \
[ "$(command -v ruby)" = '/usr/local/bin/ruby' ]; \
# update gem version
gem update --system;\
# rough smoke test
ruby --version; \
gem --version; \
Expand Down
5 changes: 4 additions & 1 deletion .gitlab/Dockerfile-3.2.2
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# This is copied from official Docker image, but compile Ruby with `--disable-shared` instead.
# This is copied from official Docker image, but
# compile Ruby with `--disable-shared` and update gem version

FROM registry.ddbuild.io/images/mirror/buildpack-deps:buster

Expand Down Expand Up @@ -99,6 +100,8 @@ RUN set -eux; \
# verify we have no "ruby" packages installed
if dpkg -l | grep -i ruby; then exit 1; fi; \
[ "$(command -v ruby)" = '/usr/local/bin/ruby' ]; \
# update gem version
gem update --system;\
# rough smoke test
ruby --version; \
gem --version; \
Expand Down
17 changes: 16 additions & 1 deletion .gitlab/install_ddtrace_deps.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,22 @@
require 'fileutils'
require 'pathname'

puts '=== RUBY_VERSION ==='
puts RUBY_VERSION
puts '=== RUBY_ENGINE ==='
puts RUBY_ENGINE
puts '=== RUBY_ENGINE_VERSION ==='
puts RUBY_ENGINE_VERSION
puts '=== RUBY_PLATFORM ==='
puts RUBY_PLATFORM
puts '=== GEM PLATFORM ==='
puts Gem::Platform.local

ruby_api_version = Gem.ruby_api_version

puts '=== RUBY API VERISON ==='
puts ruby_api_version

current_path = Pathname.new(FileUtils.pwd)

tmp_path = current_path.join('tmp')
Expand All @@ -18,7 +32,8 @@

File.open(gemfile_file_path, 'w') do |file|
file.write("source 'https://rubygems.org'\n")
file.write("gem 'ddtrace', '#{ENV.fetch('RUBY_PACKAGE_VERSION')}', path: '#{current_path}'")
file.write("gem 'ddtrace', '#{ENV.fetch('RUBY_PACKAGE_VERSION')}', path: '#{current_path}'\n")
file.write("gem 'ffi', '1.16.3'\n")
end

puts '=== Reading Gemfile ==='
Expand Down
5 changes: 5 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"files.associations": {
"Dockerfile*": "dockerfile"
}
}
10 changes: 9 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -117,5 +117,13 @@ group :check do
end

gem 'docile', '~> 1.3.5' if RUBY_VERSION < '2.5'
gem 'ffi', '~> 1.12.2' if RUBY_VERSION < '2.3'
if RUBY_VERSION < '2.3'
gem 'ffi', '~> 1.12.2', require: false
else
# `1.17.0` provides broken RBS type definitions
# https://github.com/ffi/ffi/blob/master/CHANGELOG.md#1170rc1--2024-04-08
#
# TODO: Remove this once the issue is resolved: https://github.com/ffi/ffi/issues/1107
gem 'ffi', '< 1.17.0', require: false
end
gem 'msgpack', '~> 1.3.3' if RUBY_VERSION < '2.4'
1 change: 1 addition & 0 deletions gemfiles/jruby_9.2_activesupport.gemfile

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

3 changes: 2 additions & 1 deletion gemfiles/jruby_9.2_activesupport.gemfile.lock

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

1 change: 1 addition & 0 deletions gemfiles/jruby_9.2_aws.gemfile

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

3 changes: 2 additions & 1 deletion gemfiles/jruby_9.2_aws.gemfile.lock

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

1 change: 1 addition & 0 deletions gemfiles/jruby_9.2_contrib.gemfile

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

3 changes: 2 additions & 1 deletion gemfiles/jruby_9.2_contrib.gemfile.lock

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

1 change: 1 addition & 0 deletions gemfiles/jruby_9.2_contrib_old.gemfile

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

3 changes: 2 additions & 1 deletion 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.

1 change: 1 addition & 0 deletions gemfiles/jruby_9.2_core_old.gemfile

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

3 changes: 2 additions & 1 deletion 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.

1 change: 1 addition & 0 deletions gemfiles/jruby_9.2_elasticsearch_7.gemfile

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

3 changes: 2 additions & 1 deletion 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.

1 change: 1 addition & 0 deletions gemfiles/jruby_9.2_elasticsearch_8.gemfile

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

3 changes: 2 additions & 1 deletion 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.

1 change: 1 addition & 0 deletions gemfiles/jruby_9.2_graphql_1.12.gemfile

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

3 changes: 2 additions & 1 deletion gemfiles/jruby_9.2_graphql_1.12.gemfile.lock

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

1 change: 1 addition & 0 deletions gemfiles/jruby_9.2_graphql_1.13.gemfile

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

3 changes: 2 additions & 1 deletion gemfiles/jruby_9.2_graphql_1.13.gemfile.lock

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

1 change: 1 addition & 0 deletions gemfiles/jruby_9.2_graphql_2.0.gemfile

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

3 changes: 2 additions & 1 deletion 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.

1 change: 1 addition & 0 deletions gemfiles/jruby_9.2_hanami_1.gemfile

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

3 changes: 2 additions & 1 deletion gemfiles/jruby_9.2_hanami_1.gemfile.lock

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

1 change: 1 addition & 0 deletions gemfiles/jruby_9.2_http.gemfile

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

Loading

0 comments on commit f069f6d

Please sign in to comment.