bitfab 0.22.0 → 0.22.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 +4 -4
- data/lib/bitfab/client.rb +2 -2
- data/lib/bitfab/http_client.rb +4 -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: eb8d7ab7e95fed00c067b1653c4d8271c1814b6a9d42bc8ffbb320596ac2190e
|
|
4
|
+
data.tar.gz: 6050620ec20d4172045e7a7c29930349e488cd886132cb54758ca98d789be34f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c94a534717dfbf682ca6d4f1fb6e9501fba8df1057bd6390457c4f561616a23bf53092bfc4bc8cc966f67037d1a7a9b8f2eadc4edff92645a99e2b0a9ffcf33b
|
|
7
|
+
data.tar.gz: 7e416c3b5af6248ada3bda42d56d2853d68792e7adcf3bb4a1e1af98b5b4740ee92cd7e25ba8c86fee0bc0b0acaa5acd102bb1d8e561d03d0e669d24de877048
|
data/lib/bitfab/client.rb
CHANGED
|
@@ -68,11 +68,11 @@ module Bitfab
|
|
|
68
68
|
# A raising callback never crashes the run.
|
|
69
69
|
# @return [Hash] with :items, :test_run_id, :test_run_url
|
|
70
70
|
def replay(receiver, method_name, trace_function_key:, limit: nil, trace_ids: nil, max_concurrency: 10,
|
|
71
|
-
code_change_description: nil, code_change_files: nil, experiment_group_id: nil, dataset_id: nil, mock: "none",
|
|
71
|
+
name: nil, code_change_description: nil, code_change_files: nil, experiment_group_id: nil, dataset_id: nil, mock: "none",
|
|
72
72
|
adapt_inputs: nil, environment: nil, on_progress: nil)
|
|
73
73
|
Replay.run(
|
|
74
74
|
self, receiver, method_name,
|
|
75
|
-
trace_function_key:, limit:, trace_ids:, max_concurrency:,
|
|
75
|
+
trace_function_key:, limit:, trace_ids:, name:, max_concurrency:,
|
|
76
76
|
code_change_description:, code_change_files:, experiment_group_id:, dataset_id:, mock:, adapt_inputs:, environment:,
|
|
77
77
|
on_progress:
|
|
78
78
|
)
|
data/lib/bitfab/http_client.rb
CHANGED
|
@@ -107,10 +107,12 @@ module Bitfab
|
|
|
107
107
|
# each as { path:, before:, after: } (use "" for new/deleted files)
|
|
108
108
|
# @param experiment_group_id [String, nil] optional UUID grouping multiple
|
|
109
109
|
# replay runs into a single experiment batch
|
|
110
|
+
# @param name [String, nil] optional display name for the resulting
|
|
111
|
+
# experiment/test run
|
|
110
112
|
# @param dataset_id [String, nil] optional UUID of the dataset this replay
|
|
111
113
|
# runs against, stored on the resulting experiment for durable attribution
|
|
112
114
|
def start_replay(trace_function_key, limit, trace_ids: nil, code_change_description: nil,
|
|
113
|
-
code_change_files: nil, experiment_group_id: nil, include_db_branch_lease: false, dataset_id: nil)
|
|
115
|
+
code_change_files: nil, experiment_group_id: nil, name: nil, include_db_branch_lease: false, dataset_id: nil)
|
|
114
116
|
payload = {
|
|
115
117
|
"traceFunctionKey" => trace_function_key
|
|
116
118
|
}
|
|
@@ -118,6 +120,7 @@ module Bitfab
|
|
|
118
120
|
# already determines the count), so it's omitted when nil.
|
|
119
121
|
payload["limit"] = limit unless limit.nil?
|
|
120
122
|
payload["traceIds"] = trace_ids if trace_ids
|
|
123
|
+
payload["name"] = name unless name.nil?
|
|
121
124
|
payload["codeChangeDescription"] = code_change_description unless code_change_description.nil?
|
|
122
125
|
payload["codeChangeFiles"] = normalize_code_change_files(code_change_files) unless code_change_files.nil?
|
|
123
126
|
payload["experimentGroupId"] = experiment_group_id unless experiment_group_id.nil?
|
data/lib/bitfab/replay.rb
CHANGED
|
@@ -82,6 +82,7 @@ module Bitfab
|
|
|
82
82
|
# Ignored when trace_ids is passed (with a warning): an explicit ID list
|
|
83
83
|
# already determines how many traces replay.
|
|
84
84
|
# @param trace_ids [Array<String>, nil] optional list of trace IDs to replay (max 100)
|
|
85
|
+
# @param name [String, nil] optional display name for the resulting experiment/test run
|
|
85
86
|
# @param max_concurrency [Integer, nil] max threads for parallel replay (default: 10)
|
|
86
87
|
# @param code_change_description [String, nil] optional rationale for the
|
|
87
88
|
# code change being tested in this replay (stored on the experiment)
|
|
@@ -109,8 +110,9 @@ module Bitfab
|
|
|
109
110
|
# render replay progress (e.g. a per-trace log). A raising callback never
|
|
110
111
|
# crashes the run.
|
|
111
112
|
# @return [Hash] with :items, :test_run_id, :test_run_url
|
|
112
|
-
def run(client, receiver, method_name, trace_function_key:, limit: nil, trace_ids: nil,
|
|
113
|
-
|
|
113
|
+
def run(client, receiver, method_name, trace_function_key:, limit: nil, trace_ids: nil, name: nil,
|
|
114
|
+
max_concurrency: 10, code_change_description: nil, code_change_files: nil, experiment_group_id: nil,
|
|
115
|
+
dataset_id: nil, mock: "none",
|
|
114
116
|
adapt_inputs: nil, environment: nil, on_progress: nil)
|
|
115
117
|
unless MOCK_STRATEGIES.include?(mock.to_s)
|
|
116
118
|
raise ArgumentError, "Invalid mock strategy '#{mock}'. Must be one of: #{MOCK_STRATEGIES.join(", ")}"
|
|
@@ -153,6 +155,7 @@ module Bitfab
|
|
|
153
155
|
trace_function_key,
|
|
154
156
|
effective_limit,
|
|
155
157
|
trace_ids:,
|
|
158
|
+
name:,
|
|
156
159
|
code_change_description:,
|
|
157
160
|
code_change_files:,
|
|
158
161
|
experiment_group_id:,
|
data/lib/bitfab/version.rb
CHANGED