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 +4 -4
- data/CHANGELOG.md +16 -1
- data/README.md +19 -0
- data/lib/datadog/ci/contrib/cucumber/formatter.rb +11 -1
- data/lib/datadog/ci/ext/environment/extractor.rb +3 -2
- data/lib/datadog/ci/ext/environment/providers/github_actions.rb +3 -2
- data/lib/datadog/ci/transport/api/builder.rb +5 -4
- data/lib/datadog/ci/version.rb +1 -1
- metadata +2 -3
- data/lib/datadog/ci/utils/url.rb +0 -15
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bf750f24412b0800ba1599f22c5b12e8679dddc1d0e9a30aed98d0a51a6badd3
|
4
|
+
data.tar.gz: 652631fac9702beb340f136e32d4b72b3b38d7c84a8de7dc8ce4f203dc67983b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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.
|
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? &&
|
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.
|
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.
|
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(
|
33
|
-
|
34
|
-
|
35
|
-
|
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)
|
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.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-
|
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:
|
data/lib/datadog/ci/utils/url.rb
DELETED