bitfab 0.58.1 → 0.58.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 +2 -1
- data/lib/bitfab/organization_members.rb +16 -0
- data/lib/bitfab/replay.rb +2 -1
- data/lib/bitfab/replay_registry.rb +1 -1
- data/lib/bitfab/version.rb +1 -1
- data/lib/bitfab.rb +1 -0
- metadata +2 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 959d7652dd7c6e3fdfea18c79e759300b2ebf826401f0e0601ea3642eae84034
|
|
4
|
+
data.tar.gz: bc7820f643314689a9440247edf0e81d4c234208ce1c903db7a9cb904da685fe
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a92544b809ea07e087e55b031d82130baf820f636cf41b4d90f4d1a0d1d3513024d733c6cdbe57e74dd7832552c0029816424f25c0fe65e1e585168b8908221e
|
|
7
|
+
data.tar.gz: 691217d535f95027773b65454c40470901a393aef97906283fe9f33ea38a05bd21b70105dbc8d0344c9fffaa1fb6839ecc99fc5b7480c879761189ca343e0b0d
|
data/lib/bitfab/client.rb
CHANGED
|
@@ -37,7 +37,7 @@ module Bitfab
|
|
|
37
37
|
|
|
38
38
|
attr_reader :service_url
|
|
39
39
|
|
|
40
|
-
attr_reader :datasets, :assertion_categories, :traces, :labels, :graders
|
|
40
|
+
attr_reader :datasets, :assertion_categories, :organization_members, :traces, :labels, :graders
|
|
41
41
|
|
|
42
42
|
def initialize(api_key: nil, service_url: nil, capture_enabled: nil, enabled: nil, strict: false, simulation_plan: true, timeout: 120, trace_across_threads: nil, env_vars: nil, baml_client: nil, db_snapshot: nil)
|
|
43
43
|
@db_snapshot = DbSnapshot.normalize_config(db_snapshot)
|
|
@@ -55,6 +55,7 @@ module Bitfab
|
|
|
55
55
|
@http_client.configure_simulation_plan(enabled: simulation_plan, start: !api_key_resolved_lazily?)
|
|
56
56
|
@datasets = Datasets.new(@http_client)
|
|
57
57
|
@assertion_categories = AssertionCategories.new(@http_client)
|
|
58
|
+
@organization_members = OrganizationMembers.new(@http_client)
|
|
58
59
|
@traces = Traces.new(@http_client)
|
|
59
60
|
@labels = Labels.new(@http_client)
|
|
60
61
|
@graders = Graders.new(@http_client)
|
|
@@ -184,7 +185,7 @@ module Bitfab
|
|
|
184
185
|
# queued work from in-flight work. A raising callback never crashes the run.
|
|
185
186
|
# @return [Hash] with :items, :test_run_id, :test_run_url
|
|
186
187
|
def replay(receiver, method_name = nil, trace_function_key:, limit: nil, trace_ids: nil, concurrency: nil, max_concurrency: ReplayConcurrency::UNSET,
|
|
187
|
-
name: nil, code_change_description: Replay::CODE_CHANGE_UNSET, code_change_files: Replay::CODE_CHANGE_UNSET, experiment_group_id: nil, dataset_id: nil, dataset_ids: nil, grader_ids: nil, mock: "marked", attempts: ReplayConcurrency::UNSET, only_with_assertions: false, dry_run: false,
|
|
188
|
+
name: nil, code_change_description: Replay::CODE_CHANGE_UNSET, code_change_files: Replay::CODE_CHANGE_UNSET, experiment_group_id: nil, dataset_id: nil, dataset_ids: nil, grader_ids: nil, mock: "marked", attempts: ReplayConcurrency::UNSET, only_with_assertions: false, judge_assertions: false, dry_run: false,
|
|
188
189
|
adapt_inputs: nil, mock_override: nil, db_branch: nil, on_item_start: nil, on_item_finish: nil, on_progress: nil)
|
|
189
190
|
Replay.run(
|
|
190
191
|
self,
|
|
@@ -198,6 +199,7 @@ module Bitfab
|
|
|
198
199
|
max_concurrency:,
|
|
199
200
|
attempts:,
|
|
200
201
|
only_with_assertions:,
|
|
202
|
+
judge_assertions:,
|
|
201
203
|
dry_run:,
|
|
202
204
|
code_change_description:,
|
|
203
205
|
code_change_files:,
|
data/lib/bitfab/http_client.rb
CHANGED
|
@@ -262,7 +262,7 @@ module Bitfab
|
|
|
262
262
|
# same org and trace function or the server rejects the replay
|
|
263
263
|
def start_replay(trace_function_key, limit, trace_ids: nil, code_change_description: nil,
|
|
264
264
|
code_change_files: nil, experiment_group_id: nil, name: nil, include_db_branch_lease: false, dataset_ids: nil,
|
|
265
|
-
grader_ids: nil, db_branch_settings: nil, attempts: 1, only_with_assertions: false, include_original_metadata: false)
|
|
265
|
+
grader_ids: nil, db_branch_settings: nil, attempts: 1, only_with_assertions: false, judge_assertions: false, include_original_metadata: false)
|
|
266
266
|
payload = {
|
|
267
267
|
"traceFunctionKey" => trace_function_key
|
|
268
268
|
}
|
|
@@ -286,6 +286,7 @@ module Bitfab
|
|
|
286
286
|
payload["graderIds"] = grader_ids unless grader_ids.nil?
|
|
287
287
|
payload["attempts"] = attempts if attempts > 1
|
|
288
288
|
payload["onlyWithAssertions"] = true if only_with_assertions
|
|
289
|
+
payload["judgeAssertions"] = true if judge_assertions
|
|
289
290
|
payload["includeOriginalMetadata"] = true if include_original_metadata
|
|
290
291
|
payload["dbBranchSettings"] = db_branch_settings unless db_branch_settings.nil?
|
|
291
292
|
git_state = GitState.resolved
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Bitfab
|
|
4
|
+
class OrganizationMembers
|
|
5
|
+
PATH = "/api/sdk/organizationMembers"
|
|
6
|
+
private_constant :PATH
|
|
7
|
+
|
|
8
|
+
def initialize(http_client)
|
|
9
|
+
@http_client = http_client
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
def list
|
|
13
|
+
@http_client.get(PATH)["members"]
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|
data/lib/bitfab/replay.rb
CHANGED
|
@@ -258,7 +258,7 @@ module Bitfab
|
|
|
258
258
|
# @return [Hash] with :items, :test_run_id, :test_run_url
|
|
259
259
|
def run(client, receiver, method_name, trace_function_key:, limit: nil, trace_ids: nil, name: nil,
|
|
260
260
|
concurrency: nil, max_concurrency: ReplayConcurrency::UNSET, code_change_description: CODE_CHANGE_UNSET, code_change_files: CODE_CHANGE_UNSET, experiment_group_id: nil,
|
|
261
|
-
dataset_id: nil, dataset_ids: nil, grader_ids: nil, mock: "marked", attempts: ReplayConcurrency::UNSET, only_with_assertions: false, dry_run: false,
|
|
261
|
+
dataset_id: nil, dataset_ids: nil, grader_ids: nil, mock: "marked", attempts: ReplayConcurrency::UNSET, only_with_assertions: false, judge_assertions: false, dry_run: false,
|
|
262
262
|
adapt_inputs: nil, mock_override: nil, db_branch: nil, on_item_start: nil, on_item_finish: nil, on_progress: nil)
|
|
263
263
|
concurrency_options = ReplayConcurrency.resolve(concurrency, attempts, max_concurrency)
|
|
264
264
|
attempts = concurrency_options.attempts
|
|
@@ -354,6 +354,7 @@ module Bitfab
|
|
|
354
354
|
grader_ids:,
|
|
355
355
|
attempts:,
|
|
356
356
|
only_with_assertions:,
|
|
357
|
+
judge_assertions:,
|
|
357
358
|
include_original_metadata: !adapt_inputs.nil?,
|
|
358
359
|
db_branch_settings: resolved_db_branch_settings
|
|
359
360
|
)
|
|
@@ -21,7 +21,7 @@ module Bitfab
|
|
|
21
21
|
OPTION_NAMES = %i[
|
|
22
22
|
limit trace_ids name concurrency max_concurrency code_change_description
|
|
23
23
|
code_change_files experiment_group_id dataset_id dataset_ids grader_ids mock
|
|
24
|
-
mock_override adapt_inputs db_branch attempts only_with_assertions dry_run on_item_finish
|
|
24
|
+
mock_override adapt_inputs db_branch attempts only_with_assertions judge_assertions dry_run on_item_finish
|
|
25
25
|
].freeze
|
|
26
26
|
|
|
27
27
|
def initialize
|
data/lib/bitfab/version.rb
CHANGED
data/lib/bitfab.rb
CHANGED
|
@@ -15,6 +15,7 @@ require_relative "bitfab/span_context"
|
|
|
15
15
|
require_relative "bitfab/http_client"
|
|
16
16
|
require_relative "bitfab/datasets"
|
|
17
17
|
require_relative "bitfab/assertion_categories"
|
|
18
|
+
require_relative "bitfab/organization_members"
|
|
18
19
|
require_relative "bitfab/traces"
|
|
19
20
|
require_relative "bitfab/assertions"
|
|
20
21
|
require_relative "bitfab/labels"
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: bitfab
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.58.
|
|
4
|
+
version: 0.58.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Harvest Team
|
|
@@ -173,6 +173,7 @@ files:
|
|
|
173
173
|
- lib/bitfab/http_client.rb
|
|
174
174
|
- lib/bitfab/labels.rb
|
|
175
175
|
- lib/bitfab/mock_override.rb
|
|
176
|
+
- lib/bitfab/organization_members.rb
|
|
176
177
|
- lib/bitfab/otel.rb
|
|
177
178
|
- lib/bitfab/payload_budget.rb
|
|
178
179
|
- lib/bitfab/replay.rb
|