datadog-ci 1.36.0 → 1.36.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 35241d1cd03e2ca4c3eca7c92979991abf620452a57b25bb1452f799a973706b
4
- data.tar.gz: 953eba8e467af1a595ba9f75a5d017dbc147002e8cd938d07df5162efffb3e24
3
+ metadata.gz: 70fc5fea2d200dd9654e43d303bc20ca67937ee3d6fdc03ff5595d5c22991424
4
+ data.tar.gz: 0ad11c672983e445ef7baed4fcf15af2c4710871b90962076f3075b572383ca7
5
5
  SHA512:
6
- metadata.gz: 0eb4f023eccfd837e7bcd3f4c67ff3f727e1afb41c1f4f7078a81bb3a856b42c6c35fb003e94227911755f06698d829a48aefd97cf75edca968ac15806e36e61
7
- data.tar.gz: 169fa6ad3fe020aed1293fbc80e893715c0f0ff23b0fc089b382876b2b29fe37a0e0d8b205a945e4e0d7184a01cb559a2ea814fdf47baa4dbc4024b7fc5124b6
6
+ metadata.gz: c0df4d0e21c6bab928409176b1eee9b401532eac85b9522623c88dd89f54e4a75cb64c3c528cc508357cc77642e3c7e042bc6459edffea8423ef94d48dd6ee4d
7
+ data.tar.gz: '07888f1e31d079859c4e3bcfde608dc6c5c56028857f5c4feb58cbdacac4ab7be6a9865076174cf27cc7d6f9d1868e3f4a7cc6a1e014cd74c34982e335151b55'
data/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  ## [Unreleased]
2
2
 
3
+ ## [1.36.1] - 2026-08-11
4
+
5
+ ### Fixed
6
+
7
+ * Fix SimpleCov compatibility ([#570][])
8
+ * fix: Avoid killing commands after output closes ([#566][])
9
+
3
10
  ## [1.36.0] - 2026-08-03
4
11
 
5
12
  ### Added
@@ -675,7 +682,8 @@ Currently test suite level visibility is not used by our instrumentation: it wil
675
682
 
676
683
  - Ruby versions < 2.7 no longer supported ([#8][])
677
684
 
678
- [Unreleased]: https://github.com/DataDog/datadog-ci-rb/compare/v1.36.0...main
685
+ [Unreleased]: https://github.com/DataDog/datadog-ci-rb/compare/v1.36.1...main
686
+ [1.36.1]: https://github.com/DataDog/datadog-ci-rb/compare/v1.36.0...v1.36.1
679
687
  [1.36.0]: https://github.com/DataDog/datadog-ci-rb/compare/v1.35.0...v1.36.0
680
688
  [1.35.0]: https://github.com/DataDog/datadog-ci-rb/compare/v1.34.0...v1.35.0
681
689
  [1.34.0]: https://github.com/DataDog/datadog-ci-rb/compare/v1.33.0...v1.34.0
@@ -956,4 +964,6 @@ Currently test suite level visibility is not used by our instrumentation: it wil
956
964
  [#530]: https://github.com/DataDog/datadog-ci-rb/issues/530
957
965
  [#542]: https://github.com/DataDog/datadog-ci-rb/issues/542
958
966
  [#554]: https://github.com/DataDog/datadog-ci-rb/issues/554
959
- [#555]: https://github.com/DataDog/datadog-ci-rb/issues/555
967
+ [#555]: https://github.com/DataDog/datadog-ci-rb/issues/555
968
+ [#566]: https://github.com/DataDog/datadog-ci-rb/issues/566
969
+ [#570]: https://github.com/DataDog/datadog-ci-rb/issues/570
@@ -18,23 +18,49 @@ module Datadog
18
18
  return nil
19
19
  end
20
20
 
21
- result = ::SimpleCov::UselessResultsRemover.call(
21
+ coverage = ::SimpleCov::UselessResultsRemover.call(
22
22
  ::SimpleCov::ResultAdapter.call(::Coverage.peek_result)
23
23
  )
24
24
 
25
- # SimpleCov 1.0 changed add_not_loaded_files to return a
25
+ __dd_build_result(coverage)
26
+ end
27
+
28
+ def datadog_configuration
29
+ Datadog.configuration.ci[:simplecov]
30
+ end
31
+
32
+ private
33
+
34
+ def __dd_build_result(coverage)
35
+ processed = if respond_to?(:inject_unloaded_files)
36
+ inject_unloaded_files(coverage, __dd_tracked_paths)
37
+ elsif respond_to?(:add_not_loaded_files, true)
38
+ send(:add_not_loaded_files, coverage)
39
+ else
40
+ coverage
41
+ end
42
+
43
+ # SimpleCov 1.0 changed unloaded file injection to return a
26
44
  # [coverage, not_loaded_files] tuple instead of a coverage hash.
27
- processed = add_not_loaded_files(result)
28
45
  if processed.is_a?(::Array)
29
46
  coverage, not_loaded_files = processed
30
- ::SimpleCov::Result.new(coverage, not_loaded_files: not_loaded_files)
47
+ result_parameters = ::SimpleCov::Result.instance_method(:initialize).parameters
48
+
49
+ if result_parameters.include?([:key, :not_loaded_files])
50
+ ::SimpleCov::Result.new(coverage, not_loaded_files: not_loaded_files)
51
+ else
52
+ ::SimpleCov::Result.new(coverage)
53
+ end
31
54
  else
32
55
  ::SimpleCov::Result.new(processed)
33
56
  end
34
57
  end
35
58
 
36
- def datadog_configuration
37
- Datadog.configuration.ci[:simplecov]
59
+ def __dd_tracked_paths
60
+ globs = [tracked_files, *cover_globs].compact
61
+ return [] if globs.empty?
62
+
63
+ ::SimpleCov::UnloadedFileInjector.discover(globs, root: root)
38
64
  end
39
65
  end
40
66
  end
@@ -29,6 +29,8 @@ module Datadog
29
29
  end
30
30
 
31
31
  test_session.set_tag(Ext::Test::TAG_CODE_COVERAGE_LINES_PCT, result.covered_percent)
32
+ rescue => e
33
+ Datadog.logger.warn("Failed to extract SimpleCov code coverage: #{e.class}: #{e.message}")
32
34
  end
33
35
 
34
36
  # SimpleCov 1.0 removed the `running` accessor and relies on Ruby's
@@ -50,11 +50,12 @@ module Datadog
50
50
  end
51
51
  end
52
52
 
53
- if (Core::Utils::Time.get_time - start) > timeout
54
- timeout_reached = true
55
- end
53
+ remaining_time = timeout.to_f - (Core::Utils::Time.get_time - start)
54
+ thread.join(remaining_time) if thread.alive? && remaining_time.positive?
56
55
 
57
56
  if thread.alive?
57
+ timeout_reached = true
58
+
58
59
  begin
59
60
  Process.kill("TERM", pid)
60
61
  rescue
@@ -5,7 +5,7 @@ module Datadog
5
5
  module VERSION
6
6
  MAJOR = 1
7
7
  MINOR = 36
8
- PATCH = 0
8
+ PATCH = 1
9
9
  PRE = nil
10
10
  BUILD = nil
11
11
  # PRE and BUILD above are modified for dev gems during gem build GHA workflow
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: datadog-ci
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.36.0
4
+ version: 1.36.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Datadog, Inc.