Skip to content

Commit efaecc3

Browse files
authored
Merge pull request #5077 from DataDog/ivoanjo/profiling-benchmarks-flaky-workaround
[NO-TICKET] Workaround profiling benchmark flakiness on Ruby 2.6
2 parents 28aa695 + 8650e35 commit efaecc3

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

spec/datadog/profiling/validate_benchmarks_spec.rb

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,24 @@
11
require "datadog/profiling/spec_helper"
22

33
RSpec.describe "Profiling benchmarks", :memcheck_valgrind_skip do
4-
before { skip_if_profiling_not_supported(self) }
4+
before do
5+
skip_if_profiling_not_supported(self)
6+
7+
# @ivoanjo: We've seen these tests be flaky especially on Ruby 2.6: https://github.com/DataDog/dd-trace-rb/pull/4947
8+
# Even when trying to get a backtrace out of Ruby, all we saw was one of the Ruby threads sleeping
9+
# e.g. https://github.com/DataDog/dd-trace-rb/actions/runs/19484921634/job/55765012312#step:5:8980 :
10+
#
11+
# -- Control frame information -----------------------------------------------
12+
# c:0004 p:---- s:0014 e:000013 CFUNC :sleep
13+
# c:0003 p:0005 s:0010 e:000009 BLOCK /__w/dd-trace-rb/dd-trace-rb/benchmarks/profiling_sample_loop_v2.rb:16
14+
# c:0002 p:0011 s:0007 e:000006 BLOCK /__w/dd-trace-rb/dd-trace-rb/spec/spec_helper.rb:290 [FINISH]
15+
# c:0001 p:---- s:0003 e:000002 (none) [FINISH]
16+
#
17+
# Because the objective of this spec is making sure the benchmarks don't bitrot, and seeing as this flakiness seems
18+
# to especially affect 2.6 but we have no indication otherwise that we have issues in Ruby 2.6, I decided to skip
19+
# this for now and rely on this spec running on other Ruby versions to validate the benchmark is ok.
20+
skip("Skipping on Ruby 2.6 as it's flaky and we couldn't figure out why yet") if RUBY_VERSION.start_with?("2.6")
21+
end
522

623
around do |example|
724
ClimateControl.modify("VALIDATE_BENCHMARK" => "true") do

0 commit comments

Comments
 (0)