bitfab 0.29.1 → 0.30.0
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 +6 -2
- data/lib/bitfab/http_client.rb +7 -1
- data/lib/bitfab/replay.rb +7 -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: 1711bd0806a246ec36f15e2bedd0b31d8fe8c9df0aacc922d7ad15a20badf629
|
|
4
|
+
data.tar.gz: 2e619cf976e2909bdf1bf629cb350e6b761115d4ec9d8372beaacfe5b46adbbf
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 88d118025460c8aed53e48d4ca16815133c67aa04986688bf1ed84ed506a16c41f11e76fd012cb9c18f6ee06a44f1b42e7de811e78834da737b9e4b260d5a024
|
|
7
|
+
data.tar.gz: 6c0e746e23dfdf5995c502e3a40cc12c03888c5e783b924049d2cd4152660c8a226b9ce852532440687630449fe84f027a75082602f175619fbe28e38121e9ba
|
data/lib/bitfab/client.rb
CHANGED
|
@@ -83,6 +83,10 @@ module Bitfab
|
|
|
83
83
|
# replay runs into a single experiment batch
|
|
84
84
|
# @param dataset_id [String, nil] optional UUID of the dataset this replay
|
|
85
85
|
# runs against, stored on the resulting experiment for durable attribution
|
|
86
|
+
# @param grader_ids [Array<String>, nil] optional UUIDs of graders attached
|
|
87
|
+
# directly to this experiment, graded as the union with the dataset's
|
|
88
|
+
# runnable graders at completion; each must be an active/live grader in the
|
|
89
|
+
# same org and trace function or the server rejects the replay
|
|
86
90
|
# @param mock [String] mock strategy for child spans: "marked" (default),
|
|
87
91
|
# "none", or "all". "marked" only mocks spans declared with
|
|
88
92
|
# mock_on_replay: true; "all" mocks every child span.
|
|
@@ -109,12 +113,12 @@ module Bitfab
|
|
|
109
113
|
# A raising callback never crashes the run.
|
|
110
114
|
# @return [Hash] with :items, :test_run_id, :test_run_url
|
|
111
115
|
def replay(receiver, method_name, trace_function_key:, limit: nil, trace_ids: nil, max_concurrency: 10,
|
|
112
|
-
name: nil, code_change_description: nil, code_change_files: nil, experiment_group_id: nil, dataset_id: nil, mock: "marked",
|
|
116
|
+
name: nil, code_change_description: nil, code_change_files: nil, experiment_group_id: nil, dataset_id: nil, grader_ids: nil, mock: "marked",
|
|
113
117
|
adapt_inputs: nil, mock_override: nil, environment: nil, on_progress: nil)
|
|
114
118
|
Replay.run(
|
|
115
119
|
self, receiver, method_name,
|
|
116
120
|
trace_function_key:, limit:, trace_ids:, name:, max_concurrency:,
|
|
117
|
-
code_change_description:, code_change_files:, experiment_group_id:, dataset_id:, mock:, adapt_inputs:,
|
|
121
|
+
code_change_description:, code_change_files:, experiment_group_id:, dataset_id:, grader_ids:, mock:, adapt_inputs:,
|
|
118
122
|
mock_override:, environment:,
|
|
119
123
|
on_progress:
|
|
120
124
|
)
|
data/lib/bitfab/http_client.rb
CHANGED
|
@@ -112,8 +112,13 @@ module Bitfab
|
|
|
112
112
|
# experiment/test run
|
|
113
113
|
# @param dataset_id [String, nil] optional UUID of the dataset this replay
|
|
114
114
|
# runs against, stored on the resulting experiment for durable attribution
|
|
115
|
+
# @param grader_ids [Array<String>, nil] optional UUIDs of graders attached
|
|
116
|
+
# directly to this experiment, graded as the union with the dataset's
|
|
117
|
+
# runnable graders at completion; each must be an active/live grader in the
|
|
118
|
+
# same org and trace function or the server rejects the replay
|
|
115
119
|
def start_replay(trace_function_key, limit, trace_ids: nil, code_change_description: nil,
|
|
116
|
-
code_change_files: nil, experiment_group_id: nil, name: nil, include_db_branch_lease: false, dataset_id: nil
|
|
120
|
+
code_change_files: nil, experiment_group_id: nil, name: nil, include_db_branch_lease: false, dataset_id: nil,
|
|
121
|
+
grader_ids: nil)
|
|
117
122
|
payload = {
|
|
118
123
|
"traceFunctionKey" => trace_function_key
|
|
119
124
|
}
|
|
@@ -127,6 +132,7 @@ module Bitfab
|
|
|
127
132
|
payload["experimentGroupId"] = experiment_group_id unless experiment_group_id.nil?
|
|
128
133
|
payload["includeDbBranchLease"] = true if include_db_branch_lease
|
|
129
134
|
payload["datasetId"] = dataset_id unless dataset_id.nil?
|
|
135
|
+
payload["graderIds"] = grader_ids unless grader_ids.nil?
|
|
130
136
|
|
|
131
137
|
# When DB branching is on, the server resolves a Neon preview branch per
|
|
132
138
|
# item (snapshot + restore + poll), which can run several seconds each.
|
data/lib/bitfab/replay.rb
CHANGED
|
@@ -104,6 +104,10 @@ module Bitfab
|
|
|
104
104
|
# replay runs into a single experiment batch
|
|
105
105
|
# @param dataset_id [String, nil] optional UUID of the dataset this replay
|
|
106
106
|
# runs against, stored on the resulting experiment for durable attribution
|
|
107
|
+
# @param grader_ids [Array<String>, nil] optional UUIDs of graders attached
|
|
108
|
+
# directly to this experiment, graded as the union with the dataset's
|
|
109
|
+
# runnable graders at completion; each must be an active/live grader in the
|
|
110
|
+
# same org and trace function or the server rejects the replay
|
|
107
111
|
# @param mock [String] mock strategy for child spans: "marked" (default),
|
|
108
112
|
# "none", or "all". "marked" only mocks spans declared with
|
|
109
113
|
# mock_on_replay: true; "all" mocks every child span.
|
|
@@ -129,7 +133,7 @@ module Bitfab
|
|
|
129
133
|
# @return [Hash] with :items, :test_run_id, :test_run_url
|
|
130
134
|
def run(client, receiver, method_name, trace_function_key:, limit: nil, trace_ids: nil, name: nil,
|
|
131
135
|
max_concurrency: 10, code_change_description: nil, code_change_files: nil, experiment_group_id: nil,
|
|
132
|
-
dataset_id: nil, mock: "marked",
|
|
136
|
+
dataset_id: nil, grader_ids: nil, mock: "marked",
|
|
133
137
|
adapt_inputs: nil, mock_override: nil, environment: nil, on_progress: nil)
|
|
134
138
|
unless MOCK_STRATEGIES.include?(mock.to_s)
|
|
135
139
|
raise ArgumentError, "Invalid mock strategy '#{mock}'. Must be one of: #{MOCK_STRATEGIES.join(", ")}"
|
|
@@ -184,7 +188,8 @@ module Bitfab
|
|
|
184
188
|
code_change_files:,
|
|
185
189
|
experiment_group_id:,
|
|
186
190
|
include_db_branch_lease:,
|
|
187
|
-
dataset_id
|
|
191
|
+
dataset_id:,
|
|
192
|
+
grader_ids:
|
|
188
193
|
)
|
|
189
194
|
test_run_id = replay_data["testRunId"]
|
|
190
195
|
test_run_url = replay_data["testRunUrl"]
|
data/lib/bitfab/version.rb
CHANGED