datadog-ci 1.10.0 → 1.11.0

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: 651794a9813c4b1b10909b0de41e4d25f90b95736815894f83356e03f9fa86d5
4
- data.tar.gz: 1f8c32423bb4527c7faf6232acf842fcc6c3db404baf1e836e0d57bbd57a7d93
3
+ metadata.gz: da95176899cf1e2427fadba7e177e85a5906c8c8131026e4b6e7fd3ec7ffae91
4
+ data.tar.gz: 1e948e2a734e658b9cbff55c9e1d0a57164d422a921124d17e73879a8da96361
5
5
  SHA512:
6
- metadata.gz: 1c81e9f43de5457aa57aacfbacf2d432c47e0e8f9de68477d45ea9e20da3773687a0d85e79df51e73ce2c133c6e8432c9f8f9a83c35c65d0fe0f587e58968857
7
- data.tar.gz: c37907789e0c3f0bbd9cc283d245f8be60d90c0c888bd707db7119b0e36375d3ae10227a7d08d43d448d2af6d42e339ffd4bdfce479028aef1e3b3de1549870b
6
+ metadata.gz: 4bbc47cd1af4024c4822f3c3686f728d50a87b729c8316b3e80648e370fc3c274bcd551644aad0a17203927d2ca08957af400447000ee25485a6f17f1cbaec62
7
+ data.tar.gz: f8b0fb90d93076341c88a44d4e08f867318996b350c10a498101d5893de32b70811110b78c093a8ba13b88ea6d53ba011013995fd0a11e5ba61b035d84950063
data/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  ## [Unreleased]
2
2
 
3
+ ## [1.11.0] - 2025-01-02
4
+
5
+ ### Changed
6
+
7
+ * bump maximum Ruby version to 3.4 ([#275][])
8
+ * Use logical test session name as part of test session span's resource instead of test command ([#271][])
9
+
10
+ ### Fixed
11
+
12
+ * set the max payload size for events to 4.5MB ([#272][])
13
+ * Fix inline comments handling when parsing CODEOWNERS files ([#267][])
14
+
3
15
  ## [1.10.0] - 2024-12-05
4
16
 
5
17
  ### Added
@@ -368,7 +380,8 @@ Currently test suite level visibility is not used by our instrumentation: it wil
368
380
 
369
381
  - Ruby versions < 2.7 no longer supported ([#8][])
370
382
 
371
- [Unreleased]: https://github.com/DataDog/datadog-ci-rb/compare/v1.10.0...main
383
+ [Unreleased]: https://github.com/DataDog/datadog-ci-rb/compare/v1.11.0...main
384
+ [1.11.0]: https://github.com/DataDog/datadog-ci-rb/compare/v1.10.0...v1.11.0
372
385
  [1.10.0]: https://github.com/DataDog/datadog-ci-rb/compare/v1.9.0...v1.10.0
373
386
  [1.9.0]: https://github.com/DataDog/datadog-ci-rb/compare/v1.8.1...v1.9.0
374
387
  [1.8.1]: https://github.com/DataDog/datadog-ci-rb/compare/v1.8.0...v1.8.1
@@ -529,4 +542,8 @@ Currently test suite level visibility is not used by our instrumentation: it wil
529
542
  [#248]: https://github.com/DataDog/datadog-ci-rb/issues/248
530
543
  [#250]: https://github.com/DataDog/datadog-ci-rb/issues/250
531
544
  [#259]: https://github.com/DataDog/datadog-ci-rb/issues/259
532
- [#262]: https://github.com/DataDog/datadog-ci-rb/issues/262
545
+ [#262]: https://github.com/DataDog/datadog-ci-rb/issues/262
546
+ [#267]: https://github.com/DataDog/datadog-ci-rb/issues/267
547
+ [#271]: https://github.com/DataDog/datadog-ci-rb/issues/271
548
+ [#272]: https://github.com/DataDog/datadog-ci-rb/issues/272
549
+ [#275]: https://github.com/DataDog/datadog-ci-rb/issues/275
@@ -42,7 +42,7 @@ module Datadog
42
42
 
43
43
  File.open(codeowners_file_path, "r") do |f|
44
44
  f.each_line do |line|
45
- line.strip!
45
+ line.strip!&.sub!(/#.*$/, "")
46
46
 
47
47
  next if line.empty?
48
48
  next if comment?(line)
@@ -69,6 +69,7 @@ module Datadog
69
69
  TAG_BROWSER_DRIVER = "browser_driver"
70
70
  TAG_IS_RUM = "is_rum"
71
71
  TAG_IS_RETRY = "is_retry"
72
+ TAG_EARLY_FLAKE_DETECTION_ABORT_REASON = "early_flake_detection_abort_reason"
72
73
  TAG_IS_NEW = "is_new"
73
74
  TAG_LIBRARY = "library"
74
75
  TAG_ENDPOINT = "endpoint"
@@ -78,12 +79,18 @@ module Datadog
78
79
  TAG_REQUEST_COMPRESSED = "rq_compressed"
79
80
  TAG_RESPONSE_COMPRESSED = "rs_compressed"
80
81
  TAG_COMMAND = "command"
82
+ # tags for git_requests.settings_response metric
81
83
  TAG_COVERAGE_ENABLED = "coverage_enabled"
84
+ TAG_ITR_ENABLED = "itr_enabled"
82
85
  TAG_ITR_SKIP_ENABLED = "itrskip_enabled"
86
+ TAG_REQUIRE_GIT = "require_git"
83
87
  TAG_EARLY_FLAKE_DETECTION_ENABLED = "early_flake_detection_enabled"
84
- TAG_EARLY_FLAKE_DETECTION_ABORT_REASON = "early_flake_detection_abort_reason"
88
+ TAG_FLAKY_TEST_RETRIES_ENABLED = "flaky_test_retries_enabled"
89
+ # tags for test_session metric
85
90
  TAG_PROVIDER = "provider"
86
91
  TAG_AUTO_INJECTED = "auto_injected"
92
+ TAG_AGENTLESS_LOG_SUBMISSION_ENABLED = "agentless_log_submission_enabled"
93
+ TAG_FAIL_FAST_TEST_ORDER_ENABLED = "fail_fast_test_order_enabled"
87
94
 
88
95
  module EventType
89
96
  TEST = "test"
@@ -74,6 +74,9 @@ module Datadog
74
74
  # common tags that are serialized directly in msgpack header in metadata field
75
75
  METADATA_TAG_TEST_SESSION_NAME = "test_session.name"
76
76
 
77
+ # internal tag indicating if datadog service was configured by the user
78
+ TAG_USER_PROVIDED_TEST_SERVICE = "_dd.test.is_user_provided_service"
79
+
77
80
  # internal metric with the number of virtual CPUs
78
81
  METRIC_CPU_COUNT = "_dd.host.vcpu_count"
79
82
 
@@ -59,7 +59,10 @@ module Datadog
59
59
  {
60
60
  Ext::Telemetry::TAG_COVERAGE_ENABLED => library_settings.code_coverage_enabled?.to_s,
61
61
  Ext::Telemetry::TAG_ITR_SKIP_ENABLED => library_settings.tests_skipping_enabled?.to_s,
62
- Ext::Telemetry::TAG_EARLY_FLAKE_DETECTION_ENABLED => library_settings.early_flake_detection_enabled?.to_s
62
+ Ext::Telemetry::TAG_EARLY_FLAKE_DETECTION_ENABLED => library_settings.early_flake_detection_enabled?.to_s,
63
+ Ext::Telemetry::TAG_FLAKY_TEST_RETRIES_ENABLED => library_settings.flaky_test_retries_enabled?.to_s,
64
+ Ext::Telemetry::TAG_ITR_ENABLED => library_settings.itr_enabled?.to_s,
65
+ Ext::Telemetry::TAG_REQUIRE_GIT => library_settings.require_git?.to_s
63
66
  }
64
67
  )
65
68
 
@@ -66,7 +66,7 @@ module Datadog
66
66
  cli_options_array = @rspec_cli_options + ["--dry-run", @spec_path]
67
67
 
68
68
  rspec_config_options = ::RSpec::Core::ConfigurationOptions.new(cli_options_array)
69
- devnull = File.new("/dev/null", "w")
69
+ devnull = File.new(File::NULL, "w")
70
70
  out = @verbose ? $stdout : devnull
71
71
  err = @verbose ? $stderr : devnull
72
72
 
@@ -25,7 +25,7 @@ module Datadog
25
25
  # Return the test session's name which is equal to test command used
26
26
  # @return [String] the command for this test session.
27
27
  def name
28
- get_tag(Ext::Test::TAG_COMMAND)
28
+ test_visibility.logical_test_session_name || "test_session"
29
29
  end
30
30
 
31
31
  # Return the test session's command used to run the tests
@@ -11,6 +11,7 @@ require_relative "../ext/app_types"
11
11
  require_relative "../ext/environment"
12
12
  require_relative "../ext/test"
13
13
 
14
+ require_relative "../utils/configuration"
14
15
  require_relative "../utils/test_run"
15
16
 
16
17
  require_relative "../span"
@@ -207,6 +208,10 @@ module Datadog
207
208
  ci_span.set_tags(@environment_tags)
208
209
 
209
210
  ci_span.set_metric(Ext::Test::METRIC_CPU_COUNT, Utils::TestRun.virtual_cpu_count)
211
+ ci_span.set_tag(
212
+ Ext::Test::TAG_USER_PROVIDED_TEST_SERVICE,
213
+ Utils::Configuration.service_name_provided_by_user?.to_s
214
+ )
210
215
  end
211
216
 
212
217
  # PROPAGATING CONTEXT FROM TOP-LEVEL TO THE LOWER LEVELS
@@ -238,6 +238,10 @@ module Datadog
238
238
  def to_integer(value)
239
239
  value&.to_i
240
240
  end
241
+
242
+ def test_visibility
243
+ @test_visibility ||= Datadog::CI.send(:test_visibility)
244
+ end
241
245
  end
242
246
  end
243
247
  end
@@ -31,7 +31,7 @@ module Datadog
31
31
  end
32
32
 
33
33
  def resource
34
- "#{@span.get_tag(Ext::Test::TAG_FRAMEWORK)}.test_session.#{@span.get_tag(Ext::Test::TAG_COMMAND)}"
34
+ "#{@span.get_tag(Ext::Test::TAG_FRAMEWORK)}.test_session.#{test_visibility.logical_test_session_name}"
35
35
  end
36
36
 
37
37
  private
@@ -11,7 +11,7 @@ module Datadog
11
11
  module CI
12
12
  module Transport
13
13
  class EventPlatformTransport
14
- DEFAULT_MAX_PAYLOAD_SIZE = 5 * 1024 * 1024
14
+ DEFAULT_MAX_PAYLOAD_SIZE = 4.5 * 1024 * 1024
15
15
 
16
16
  attr_reader :api,
17
17
  :max_payload_size
@@ -9,6 +9,10 @@ module Datadog
9
9
  def self.fetch_service_name(default)
10
10
  Datadog.configuration.service_without_fallback || CI::Git::LocalRepository.repository_name || default
11
11
  end
12
+
13
+ def self.service_name_provided_by_user?
14
+ !!Datadog.configuration.service_without_fallback
15
+ end
12
16
  end
13
17
  end
14
18
  end
@@ -4,7 +4,7 @@ module Datadog
4
4
  module CI
5
5
  module VERSION
6
6
  MAJOR = 1
7
- MINOR = 10
7
+ MINOR = 11
8
8
  PATCH = 0
9
9
  PRE = nil
10
10
  BUILD = nil
@@ -22,7 +22,7 @@ module Datadog
22
22
  # To allow testing with the next unreleased version of Ruby, the version check is performed
23
23
  # as `< #{MAXIMUM_RUBY_VERSION}`, meaning prereleases of MAXIMUM_RUBY_VERSION are allowed
24
24
  # but not stable MAXIMUM_RUBY_VERSION releases.
25
- MAXIMUM_RUBY_VERSION = "3.4"
25
+ MAXIMUM_RUBY_VERSION = "3.5"
26
26
  end
27
27
  end
28
28
  end
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: 1.10.0
4
+ version: 1.11.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Datadog, Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-12-05 00:00:00.000000000 Z
11
+ date: 2025-01-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: datadog
@@ -240,7 +240,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
240
240
  version: 2.7.0
241
241
  - - "<"
242
242
  - !ruby/object:Gem::Version
243
- version: '3.4'
243
+ version: '3.5'
244
244
  required_rubygems_version: !ruby/object:Gem::Requirement
245
245
  requirements:
246
246
  - - ">="