bitfab 0.12.2 → 0.12.3
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 +4 -4
- data/lib/bitfab/client.rb +4 -2
- data/lib/bitfab/http_client.rb +5 -1
- data/lib/bitfab/replay.rb +5 -2
- data/lib/bitfab/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 0f676920e42d9a98a73b84a843a5592159d9e93d85f72d4248703cef5a2eb47d
|
|
4
|
+
data.tar.gz: 891ef7140bba23d6f55b14f97668f2561275305b2fa43f7ea795920e4d101c82
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 9384af8b49181607bb86e10c204370eb04b4a8fd76552172065e0c44e0cd6f1349a21cb56e7dae3ca2a308e35a0039d5d706129ae9ffe19e0268e4136d18521c
|
|
7
|
+
data.tar.gz: 1c9a6edb28587660fa88afca67ebf6c2ab2e7d066721c707f907682f2f96d4a8aed62c6d486f42c133b9080729e228d3237b0125d2c33b83c3e98acf275aed16
|
data/lib/bitfab/client.rb
CHANGED
|
@@ -46,16 +46,18 @@ module Bitfab
|
|
|
46
46
|
# code change being tested in this replay (stored on the experiment)
|
|
47
47
|
# @param code_change_files [Array<Hash>, nil] optional list of edited files,
|
|
48
48
|
# each as { path:, before:, after: } (use "" for new/deleted files)
|
|
49
|
+
# @param experiment_group_id [String, nil] optional UUID grouping multiple
|
|
50
|
+
# replay runs into a single experiment batch
|
|
49
51
|
# @param mock [String] mock strategy for child spans: "none" (default),
|
|
50
52
|
# "all", or "marked". "all" mocks every child span; "marked" only mocks
|
|
51
53
|
# spans declared with mock_on_replay: true.
|
|
52
54
|
# @return [Hash] with :items, :test_run_id, :test_run_url
|
|
53
55
|
def replay(receiver, method_name, trace_function_key:, limit: 5, trace_ids: nil, max_concurrency: 10,
|
|
54
|
-
code_change_description: nil, code_change_files: nil, mock: "none")
|
|
56
|
+
code_change_description: nil, code_change_files: nil, experiment_group_id: nil, mock: "none")
|
|
55
57
|
Replay.run(
|
|
56
58
|
self, receiver, method_name,
|
|
57
59
|
trace_function_key:, limit:, trace_ids:, max_concurrency:,
|
|
58
|
-
code_change_description:, code_change_files:, mock:
|
|
60
|
+
code_change_description:, code_change_files:, experiment_group_id:, mock:
|
|
59
61
|
)
|
|
60
62
|
end
|
|
61
63
|
|
data/lib/bitfab/http_client.rb
CHANGED
|
@@ -103,7 +103,10 @@ module Bitfab
|
|
|
103
103
|
# code change being tested in this replay
|
|
104
104
|
# @param code_change_files [Array<Hash>, nil] optional list of edited files,
|
|
105
105
|
# each as { path:, before:, after: } (use "" for new/deleted files)
|
|
106
|
-
|
|
106
|
+
# @param experiment_group_id [String, nil] optional UUID grouping multiple
|
|
107
|
+
# replay runs into a single experiment batch
|
|
108
|
+
def start_replay(trace_function_key, limit, trace_ids: nil, code_change_description: nil,
|
|
109
|
+
code_change_files: nil, experiment_group_id: nil)
|
|
107
110
|
payload = {
|
|
108
111
|
"traceFunctionKey" => trace_function_key,
|
|
109
112
|
"limit" => limit
|
|
@@ -111,6 +114,7 @@ module Bitfab
|
|
|
111
114
|
payload["traceIds"] = trace_ids if trace_ids
|
|
112
115
|
payload["codeChangeDescription"] = code_change_description unless code_change_description.nil?
|
|
113
116
|
payload["codeChangeFiles"] = normalize_code_change_files(code_change_files) unless code_change_files.nil?
|
|
117
|
+
payload["experimentGroupId"] = experiment_group_id unless experiment_group_id.nil?
|
|
114
118
|
|
|
115
119
|
request("/api/sdk/replay/start", payload, timeout: 30)
|
|
116
120
|
end
|
data/lib/bitfab/replay.rb
CHANGED
|
@@ -63,12 +63,14 @@ module Bitfab
|
|
|
63
63
|
# code change being tested in this replay (stored on the experiment)
|
|
64
64
|
# @param code_change_files [Array<Hash>, nil] optional list of edited files,
|
|
65
65
|
# each as { path:, before:, after: } (empty string for new/deleted files)
|
|
66
|
+
# @param experiment_group_id [String, nil] optional UUID grouping multiple
|
|
67
|
+
# replay runs into a single experiment batch
|
|
66
68
|
# @param mock [String] mock strategy for child spans: "none" (default),
|
|
67
69
|
# "all", or "marked". "all" mocks every child span; "marked" only mocks
|
|
68
70
|
# spans declared with mock_on_replay: true.
|
|
69
71
|
# @return [Hash] with :items, :test_run_id, :test_run_url
|
|
70
72
|
def run(client, receiver, method_name, trace_function_key:, limit: 5, trace_ids: nil, max_concurrency: 10,
|
|
71
|
-
code_change_description: nil, code_change_files: nil, mock: "none")
|
|
73
|
+
code_change_description: nil, code_change_files: nil, experiment_group_id: nil, mock: "none")
|
|
72
74
|
unless MOCK_STRATEGIES.include?(mock.to_s)
|
|
73
75
|
raise ArgumentError, "Invalid mock strategy '#{mock}'. Must be one of: #{MOCK_STRATEGIES.join(", ")}"
|
|
74
76
|
end
|
|
@@ -80,7 +82,8 @@ module Bitfab
|
|
|
80
82
|
limit,
|
|
81
83
|
trace_ids:,
|
|
82
84
|
code_change_description:,
|
|
83
|
-
code_change_files
|
|
85
|
+
code_change_files:,
|
|
86
|
+
experiment_group_id:
|
|
84
87
|
)
|
|
85
88
|
test_run_id = replay_data["testRunId"]
|
|
86
89
|
test_run_url = replay_data["testRunUrl"]
|
data/lib/bitfab/version.rb
CHANGED