Skip to content

Commit c560834

Browse files
authored
Merge pull request #5037 from DataDog/ffl-1318-add-openfeature-gem-into-test-matrix
[FFL-1318] Add openfeature-sdk gem to the test matrix
2 parents 6eff05b + 391695b commit c560834

29 files changed

+2153
-18
lines changed

.github/workflows/lock-dependency.yml

Lines changed: 19 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -37,31 +37,31 @@ jobs:
3737
engine:
3838
# ADD NEW RUBIES HERE
3939
- name: ruby
40-
version: '3.5'
40+
version: "3.5"
4141
- name: ruby
42-
version: '3.4'
42+
version: "3.4"
4343
- name: ruby
44-
version: '3.3'
44+
version: "3.3"
4545
- name: ruby
46-
version: '3.2'
46+
version: "3.2"
4747
- name: ruby
48-
version: '3.1'
48+
version: "3.1"
4949
- name: ruby
50-
version: '3.0'
50+
version: "3.0"
5151
- name: ruby
52-
version: '2.7'
52+
version: "2.7"
5353
- name: ruby
54-
version: '2.6'
54+
version: "2.6"
5555
- name: ruby
56-
version: '2.5'
56+
version: "2.5"
5757
- name: jruby
58-
version: '9.4'
58+
version: "9.4"
5959
- name: jruby
60-
version: '9.3'
60+
version: "9.3"
6161
- name: jruby
62-
version: '9.2'
62+
version: "9.2"
6363
- name: jruby
64-
version: '10.0'
64+
version: "10.0"
6565
container:
6666
image: ghcr.io/datadog/images-rb/engines/${{ matrix.engine.name }}:${{ matrix.engine.version }}-gnu-gcc
6767
env:
@@ -103,13 +103,17 @@ jobs:
103103
path: gemfiles
104104
pattern: lock-dependency-${{ github.run_id }}-*
105105
merge-multiple: true
106-
- run: git diff --color=always
106+
# FIXME: The ghcommit-action does not pick up untracked/unstaged files
107+
# https://github.com/planetscale/ghcommit-action/issues/43
108+
- name: Stage changes
109+
run: git add gemfiles
110+
- run: git diff --cached --color=always
107111
- name: Commit changes
108112
uses: planetscale/ghcommit-action@f24050e41f8694750427d111b52f4ef9ca81a32d # v0.2.18
109113
with:
110114
repo: ${{ github.repository }}
111115
branch: ${{ github.head_ref }}
112-
file_pattern: 'gemfiles/*'
116+
file_pattern: "gemfiles/*"
113117
commit_message: "[🤖] Lock Dependency: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}"
114118
env:
115119
GITHUB_TOKEN: ${{ steps.generate-token.outputs.token }}

Matrixfile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -351,6 +351,10 @@
351351
'rails61-mysql2' => '❌ 2.5 / ✅ 2.6 / ✅ 2.7 / ✅ 3.0 / ✅ 3.1 / ✅ 3.2 / ✅ 3.3 / ✅ 3.4 / ❌ 3.5 / ❌ jruby',
352352
'rails8-mysql2' => '❌ 2.5 / ❌ 2.6 / ❌ 2.7 / ❌ 3.0 / ❌ 3.1 / ✅ 3.2 / ✅ 3.3 / ✅ 3.4 / ✅ 3.5 / ❌ jruby',
353353
},
354+
'open_feature' => {
355+
'openfeature-latest' => '❌ 2.5 / ❌ 2.6 / ❌ 2.7 / ❌ 3.0 / ✅ 3.1 / ✅ 3.2 / ✅ 3.3 / ✅ 3.4 / ✅ 3.5 / ❌ jruby',
356+
'openfeature-min' => '❌ 2.5 / ❌ 2.6 / ❌ 2.7 / ❌ 3.0 / ✅ 3.1 / ✅ 3.2 / ✅ 3.3 / ✅ 3.4 / ✅ 3.5 / ❌ jruby',
357+
},
354358
}.each_with_object({}) do |(tasks, spec_metadata), hash|
355359
# Explode arrays of task names into individual tasks
356360
# e.g. ['rails', 'railsdisableenv'] => {'...'} becomes 'rails7' => {'...'}, 'railsdisableenv7' => {'...'}

Rakefile

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,13 +85,13 @@ namespace :spec do
8585
:graphql, :graphql_unified_trace_patcher, :graphql_trace_patcher, :graphql_tracing_patcher,
8686
:rails, :railsredis, :railsredis_activesupport, :railsactivejob,
8787
:elasticsearch, :http, :redis, :sidekiq, :sinatra, :hanami, :hanami_autoinstrument,
88-
:profiling, :core_with_libdatadog_api, :error_tracking]
88+
:profiling, :core_with_libdatadog_api, :error_tracking, :open_feature]
8989

9090
desc '' # "Explicitly hiding from `rake -T`"
9191
RSpec::Core::RakeTask.new(:main) do |t, args|
9292
t.pattern = 'spec/**/*_spec.rb'
93-
t.exclude_pattern = 'spec/**/{appsec/integration,contrib,benchmark,redis,auto_instrument,opentelemetry,profiling,crashtracking,error_tracking,rubocop,data_streams}/**/*_spec.rb,' \
94-
' spec/**/{auto_instrument,opentelemetry,process_discovery,stable_config,ddsketch}*_spec.rb,' \
93+
t.exclude_pattern = 'spec/**/{appsec/integration,contrib,benchmark,redis,auto_instrument,opentelemetry,open_feature,profiling,crashtracking,error_tracking,rubocop,data_streams}/**/*_spec.rb,' \
94+
' spec/**/{auto_instrument,opentelemetry,process_discovery,stable_config,ddsketch}_spec.rb,' \
9595
' spec/datadog/gem_packaging_spec.rb'
9696
t.rspec_opts = args.to_a.join(' ')
9797
end
@@ -133,6 +133,12 @@ namespace :spec do
133133
t.rspec_opts = args.to_a.join(' ')
134134
end
135135

136+
desc '' # "Explicitly hiding from `rake -T`"
137+
RSpec::Core::RakeTask.new(:open_feature) do |t, args|
138+
t.pattern = 'spec/datadog/open_feature/**/*_spec.rb,spec/datadog/open_feature_spec.rb'
139+
t.rspec_opts = args.to_a.join(' ')
140+
end
141+
136142
desc '' # "Explicitly hiding from `rake -T`"
137143
RSpec::Core::RakeTask.new(:rails) do |t, args|
138144
t.pattern = 'spec/datadog/tracing/contrib/rails/**/*_spec.rb'

appraisal/ruby-3.1.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@
9999
build_coverage_matrix('dalli', [2])
100100
build_coverage_matrix('karafka', min: '2.3.0')
101101
build_coverage_matrix('devise', min: '3.2.1')
102+
build_coverage_matrix('openfeature', min: '0.3.1', gem: 'openfeature-sdk')
102103

103104
appraise 'relational_db' do
104105
gem 'activerecord', '~> 7'

appraisal/ruby-3.2.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,7 @@
144144
build_coverage_matrix('dalli', [2])
145145
build_coverage_matrix('karafka', min: '2.3.0')
146146
build_coverage_matrix('devise', min: '3.2.1')
147+
build_coverage_matrix('openfeature', min: '0.3.1', gem: 'openfeature-sdk')
147148

148149
appraise 'relational_db' do
149150
gem 'activerecord', '~> 7'

appraisal/ruby-3.3.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,7 @@
146146
build_coverage_matrix('dalli', [2])
147147
build_coverage_matrix('karafka', min: '2.3.0')
148148
build_coverage_matrix('devise', min: '3.2.1')
149+
build_coverage_matrix('openfeature', min: '0.3.1', gem: 'openfeature-sdk')
149150

150151
appraise 'relational_db' do
151152
gem 'activerecord', '~> 7'

appraisal/ruby-3.4.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,7 @@
145145
build_coverage_matrix('dalli', [2])
146146
build_coverage_matrix('karafka', min: '2.3.0')
147147
build_coverage_matrix('devise', min: '3.2.1')
148+
build_coverage_matrix('openfeature', min: '0.3.1', gem: 'openfeature-sdk')
148149

149150
appraise 'relational_db' do
150151
# ActiveRecord locked because tests are failing with 7.1, which was attempted as a part of Ruby 3.4 testing in CI.

appraisal/ruby-3.5.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@
9494
build_coverage_matrix('dalli', [2])
9595
build_coverage_matrix('karafka', min: '2.3.0')
9696
build_coverage_matrix('devise', min: '3.2.1')
97+
build_coverage_matrix('openfeature', min: '0.3.1', gem: 'openfeature-sdk')
9798

9899
appraise 'relational_db' do
99100
# ActiveRecord locked because tests are failing with 7.1, which was attempted as a part of Ruby 3.4 testing in CI.

gemfiles/ruby_3.1_openfeature_latest.gemfile

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

gemfiles/ruby_3.1_openfeature_latest.gemfile.lock

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

0 commit comments

Comments
 (0)