datadog-ci 0.8.2 → 0.8.3

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: e852419d3e1634964bbe3e707ccd71822976fa868d8c8f6323c365c6af7fdb4b
4
- data.tar.gz: 4e2e801de46ebd2590fd38ff694e4f7d911ec4364e776be498959d6b19faf4f8
3
+ metadata.gz: bf750f24412b0800ba1599f22c5b12e8679dddc1d0e9a30aed98d0a51a6badd3
4
+ data.tar.gz: 652631fac9702beb340f136e32d4b72b3b38d7c84a8de7dc8ce4f203dc67983b
5
5
  SHA512:
6
- metadata.gz: ac8d1b295053fa3323173ea7c1bca27cacdd364757ae59652eb33a216caf978d7a142833239d6fc69da2c68e1ad06853f4f9aadd268c2e8586d64e866e457cc6
7
- data.tar.gz: ab09537b0971146e592499f2cf2ab57eb0e84f9116838d322c3708e57b6c3c38c3a875c2aa247c367c95e14c17df2a388aa4b113cedca6a732f4fe6fa8160803
6
+ metadata.gz: 3295d136609aca4be41cc041613873297a5e91bb37a428a6612a1e62f7e547db2bb2c836f4a0348fdd4466d085a29ec78a26962d48f1c59e05163dcb26668783
7
+ data.tar.gz: 5446bba62689a4133a75b64437efd47f8369814e863c8ddab0c91d52692b5bf71b5be2a4f4264839ec81374ff3c4ff498e4c2cd7a8c54f566e63558cb1f55cff
data/CHANGELOG.md CHANGED
@@ -1,5 +1,16 @@
1
1
  ## [Unreleased]
2
2
 
3
+ ## [0.8.3] - 2024-03-20
4
+
5
+ ### Fixed
6
+
7
+ * fix: cucumber-ruby 9.2 includes breaking change for Cucumber::Core::Test::Result ([#145][])
8
+
9
+ ### Changed
10
+
11
+ * remove temporary hack and use Core::Remote::Negotiation's new constructor param ([#142][])
12
+ * use filter_basic_auth method from Datadog::Core ([#141][])
13
+
3
14
  ## [0.8.2] - 2024-03-19
4
15
 
5
16
  ### Fixed
@@ -176,7 +187,8 @@ Currently test suite level visibility is not used by our instrumentation: it wil
176
187
 
177
188
  * Ruby versions < 2.7 no longer supported ([#8][])
178
189
 
179
- [Unreleased]: https://github.com/DataDog/datadog-ci-rb/compare/v0.8.2...main
190
+ [Unreleased]: https://github.com/DataDog/datadog-ci-rb/compare/v0.8.3...main
191
+ [0.8.3]: https://github.com/DataDog/datadog-ci-rb/compare/v0.8.2...v0.8.3
180
192
  [0.8.2]: https://github.com/DataDog/datadog-ci-rb/compare/v0.8.1...v0.8.2
181
193
  [0.8.1]: https://github.com/DataDog/datadog-ci-rb/compare/v0.8.0...v0.8.1
182
194
  [0.8.0]: https://github.com/DataDog/datadog-ci-rb/compare/v0.7.0...v0.8.0
@@ -247,3 +259,6 @@ Currently test suite level visibility is not used by our instrumentation: it wil
247
259
  [#131]: https://github.com/DataDog/datadog-ci-rb/issues/131
248
260
  [#134]: https://github.com/DataDog/datadog-ci-rb/issues/134
249
261
  [#139]: https://github.com/DataDog/datadog-ci-rb/issues/139
262
+ [#141]: https://github.com/DataDog/datadog-ci-rb/issues/141
263
+ [#142]: https://github.com/DataDog/datadog-ci-rb/issues/142
264
+ [#145]: https://github.com/DataDog/datadog-ci-rb/issues/145
data/README.md CHANGED
@@ -79,6 +79,25 @@ if ENV["DD_ENV"] == "ci"
79
79
  end
80
80
  ```
81
81
 
82
+ > [!IMPORTANT]
83
+ > When using `minitest/autorun` the order of requires matters: `datadog/ci` must be
84
+ > always required before `minitest/autorun`.
85
+
86
+ Example using `minitest/autorun`
87
+
88
+ ```ruby
89
+ require 'datadog/ci'
90
+ require 'minitest/autorun'
91
+
92
+ if ENV["DD_ENV"] == "ci"
93
+ Datadog.configure do |c|
94
+ c.ci.enabled = true
95
+ c.service = 'my-ruby-app'
96
+ c.ci.instrument :minitest
97
+ end
98
+ end
99
+ ```
100
+
82
101
  `options` are the following keyword arguments:
83
102
 
84
103
  | Key | Description | Default |
@@ -113,7 +113,7 @@ module Datadog
113
113
  end
114
114
 
115
115
  def finish_span(span, result)
116
- if !result.passed? && result.ok?(@config.strict)
116
+ if !result.passed? && ok?(result, @config.strict)
117
117
  span.skipped!(reason: result.message)
118
118
  elsif result.passed?
119
119
  span.passed!
@@ -186,6 +186,16 @@ module Datadog
186
186
  nil
187
187
  end
188
188
 
189
+ def ok?(result, strict)
190
+ # in minor update in Cucumber 9.2.0, the arity of the `ok?` method changed
191
+ parameters = result.method(:ok?).parameters
192
+ if parameters == [[:opt, :be_strict]]
193
+ result.ok?(strict)
194
+ else
195
+ result.ok?(strict: strict)
196
+ end
197
+ end
198
+
189
199
  def configuration
190
200
  Datadog.configuration.ci[:cucumber]
191
201
  end
@@ -1,8 +1,9 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require "datadog/core/utils/url"
4
+
3
5
  require_relative "../git"
4
6
  require_relative "../../utils/git"
5
- require_relative "../../utils/url"
6
7
  require_relative "providers"
7
8
 
8
9
  module Datadog
@@ -76,7 +77,7 @@ module Datadog
76
77
 
77
78
  @tags[Git::TAG_TAG] = Utils::Git.normalize_ref(@tags[Git::TAG_TAG])
78
79
  @tags[Git::TAG_BRANCH] = Utils::Git.normalize_ref(@tags[Git::TAG_BRANCH])
79
- @tags[Git::TAG_REPOSITORY_URL] = Utils::Url.filter_sensitive_info(
80
+ @tags[Git::TAG_REPOSITORY_URL] = Datadog::Core::Utils::Url.filter_basic_auth(
80
81
  @tags[Git::TAG_REPOSITORY_URL]
81
82
  )
82
83
  end
@@ -2,8 +2,9 @@
2
2
 
3
3
  require "json"
4
4
 
5
+ require "datadog/core/utils/url"
6
+
5
7
  require_relative "base"
6
- require_relative "../../../utils/url"
7
8
 
8
9
  module Datadog
9
10
  module CI
@@ -79,7 +80,7 @@ module Datadog
79
80
  def github_server_url
80
81
  return @github_server_url if defined?(@github_server_url)
81
82
 
82
- @github_server_url ||= Utils::Url.filter_sensitive_info(env["GITHUB_SERVER_URL"])
83
+ @github_server_url ||= Datadog::Core::Utils::Url.filter_basic_auth(env["GITHUB_SERVER_URL"])
83
84
  end
84
85
  end
85
86
  end
@@ -29,10 +29,11 @@ module Datadog
29
29
 
30
30
  def self.build_evp_proxy_api(settings)
31
31
  agent_settings = Datadog::Core::Configuration::AgentSettingsResolver.call(settings)
32
- negotiation = Datadog::Core::Remote::Negotiation.new(settings, agent_settings)
33
-
34
- # temporary, remove this when patch will be accepted in Core to make logging configurable
35
- negotiation.instance_variable_set(:@logged, {no_config_endpoint: true})
32
+ negotiation = Datadog::Core::Remote::Negotiation.new(
33
+ settings,
34
+ agent_settings,
35
+ suppress_logging: {no_config_endpoint: true}
36
+ )
36
37
 
37
38
  evp_proxy_path_prefix = Ext::Transport::EVP_PROXY_PATH_PREFIXES.find do |path_prefix|
38
39
  negotiation.endpoint?(path_prefix)
@@ -5,7 +5,7 @@ module Datadog
5
5
  module VERSION
6
6
  MAJOR = "0"
7
7
  MINOR = "8"
8
- PATCH = "2"
8
+ PATCH = "3"
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,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.2
4
+ version: 0.8.3
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-19 00:00:00.000000000 Z
11
+ date: 2024-03-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: msgpack
@@ -129,7 +129,6 @@ files:
129
129
  - lib/datadog/ci/utils/configuration.rb
130
130
  - lib/datadog/ci/utils/git.rb
131
131
  - lib/datadog/ci/utils/test_run.rb
132
- - lib/datadog/ci/utils/url.rb
133
132
  - lib/datadog/ci/version.rb
134
133
  homepage: https://github.com/DataDog/datadog-ci-rb
135
134
  licenses:
@@ -1,15 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Datadog
4
- module CI
5
- module Utils
6
- module Url
7
- def self.filter_sensitive_info(url)
8
- return nil if url.nil?
9
-
10
- url.gsub(%r{((https?|ssh)://)[^/]*@}, '\1')
11
- end
12
- end
13
- end
14
- end
15
- end