datadog-ci 0.8.1 → 0.8.2
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e852419d3e1634964bbe3e707ccd71822976fa868d8c8f6323c365c6af7fdb4b
|
4
|
+
data.tar.gz: 4e2e801de46ebd2590fd38ff694e4f7d911ec4364e776be498959d6b19faf4f8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ac8d1b295053fa3323173ea7c1bca27cacdd364757ae59652eb33a216caf978d7a142833239d6fc69da2c68e1ad06853f4f9aadd268c2e8586d64e866e457cc6
|
7
|
+
data.tar.gz: ab09537b0971146e592499f2cf2ab57eb0e84f9116838d322c3708e57b6c3c38c3a875c2aa247c367c95e14c17df2a388aa4b113cedca6a732f4fe6fa8160803
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,11 @@
|
|
1
1
|
## [Unreleased]
|
2
2
|
|
3
|
+
## [0.8.2] - 2024-03-19
|
4
|
+
|
5
|
+
### Fixed
|
6
|
+
|
7
|
+
* assign the single running test suite for a test if none found by test suite name ([#139][])
|
8
|
+
|
3
9
|
## [0.8.1] - 2024-03-12
|
4
10
|
|
5
11
|
### Fixed
|
@@ -170,7 +176,8 @@ Currently test suite level visibility is not used by our instrumentation: it wil
|
|
170
176
|
|
171
177
|
* Ruby versions < 2.7 no longer supported ([#8][])
|
172
178
|
|
173
|
-
[Unreleased]: https://github.com/DataDog/datadog-ci-rb/compare/v0.8.
|
179
|
+
[Unreleased]: https://github.com/DataDog/datadog-ci-rb/compare/v0.8.2...main
|
180
|
+
[0.8.2]: https://github.com/DataDog/datadog-ci-rb/compare/v0.8.1...v0.8.2
|
174
181
|
[0.8.1]: https://github.com/DataDog/datadog-ci-rb/compare/v0.8.0...v0.8.1
|
175
182
|
[0.8.0]: https://github.com/DataDog/datadog-ci-rb/compare/v0.7.0...v0.8.0
|
176
183
|
[0.7.0]: https://github.com/DataDog/datadog-ci-rb/compare/v0.6.0...v0.7.0
|
@@ -239,3 +246,4 @@ Currently test suite level visibility is not used by our instrumentation: it wil
|
|
239
246
|
[#123]: https://github.com/DataDog/datadog-ci-rb/issues/123
|
240
247
|
[#131]: https://github.com/DataDog/datadog-ci-rb/issues/131
|
241
248
|
[#134]: https://github.com/DataDog/datadog-ci-rb/issues/134
|
249
|
+
[#139]: https://github.com/DataDog/datadog-ci-rb/issues/139
|
@@ -21,6 +21,14 @@ module Datadog
|
|
21
21
|
end
|
22
22
|
end
|
23
23
|
|
24
|
+
def fetch_single_test_suite
|
25
|
+
@mutex.synchronize do
|
26
|
+
return nil if @test_suites.empty? || @test_suites.size > 1
|
27
|
+
|
28
|
+
@test_suites.values.first
|
29
|
+
end
|
30
|
+
end
|
31
|
+
|
24
32
|
def fetch_or_activate_test_module(&block)
|
25
33
|
@mutex.synchronize do
|
26
34
|
@test_module ||= block.call
|
@@ -227,6 +227,11 @@ module Datadog
|
|
227
227
|
def build_test(tracer_span, tags)
|
228
228
|
test = Test.new(tracer_span)
|
229
229
|
set_initial_tags(test, tags)
|
230
|
+
|
231
|
+
# sometimes test suite is not being assigned correctly
|
232
|
+
# fix it by fetching the one single running test suite from the global context
|
233
|
+
fix_test_suite!(test) if test.test_suite_id.nil?
|
234
|
+
|
230
235
|
validate_test_suite_level_visibility_correctness(test)
|
231
236
|
set_codeowners(test)
|
232
237
|
|
@@ -294,6 +299,24 @@ module Datadog
|
|
294
299
|
end
|
295
300
|
end
|
296
301
|
|
302
|
+
def fix_test_suite!(test)
|
303
|
+
test_suite = @global_context.fetch_single_test_suite
|
304
|
+
unless test_suite
|
305
|
+
Datadog.logger.debug do
|
306
|
+
"Trying to fix test suite for test [#{test.name}] but no single test suite is running."
|
307
|
+
end
|
308
|
+
return
|
309
|
+
end
|
310
|
+
|
311
|
+
Datadog.logger.debug do
|
312
|
+
"For test [#{test.name}]: expected test suite [#{test.test_suite_name}] to be running, " \
|
313
|
+
"but it was not found. Fixing it by assigning test suite [#{test_suite.name}] to the test."
|
314
|
+
end
|
315
|
+
|
316
|
+
test.set_tag(Ext::Test::TAG_TEST_SUITE_ID, test_suite.id.to_s)
|
317
|
+
test.set_tag(Ext::Test::TAG_SUITE, test_suite.name)
|
318
|
+
end
|
319
|
+
|
297
320
|
def start_datadog_tracer_span(span_name, span_options, &block)
|
298
321
|
if block
|
299
322
|
Datadog::Tracing.trace(span_name, **span_options) do |tracer_span, trace|
|
data/lib/datadog/ci/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: datadog-ci
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.8.
|
4
|
+
version: 0.8.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Datadog, Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-03-
|
11
|
+
date: 2024-03-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: msgpack
|
@@ -157,7 +157,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
157
157
|
- !ruby/object:Gem::Version
|
158
158
|
version: 2.0.0
|
159
159
|
requirements: []
|
160
|
-
rubygems_version: 3.5.
|
160
|
+
rubygems_version: 3.5.6
|
161
161
|
signing_key:
|
162
162
|
specification_version: 4
|
163
163
|
summary: Datadog CI visibility for your ruby application
|