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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1f26df032729a0c1fbad20c807e1581ec1c68bb9019e0b8f32a85237c785a6ed
4
- data.tar.gz: 6acf7a7e153565cf4fb272b651f2740b4d3cb5722b67b6508552aa1b2e81d042
3
+ metadata.gz: 1711bd0806a246ec36f15e2bedd0b31d8fe8c9df0aacc922d7ad15a20badf629
4
+ data.tar.gz: 2e619cf976e2909bdf1bf629cb350e6b761115d4ec9d8372beaacfe5b46adbbf
5
5
  SHA512:
6
- metadata.gz: 5fdcbb34b7174b5308d46405c95735d0a986db51f1af6ddbeb26613ebcdd9c35fade8a40553b1f88b78dc699261146d8cd9d4d7abffda560fbf06f40527717ce
7
- data.tar.gz: ea2cd76d972b4b67f1554e1baf28b2aeeaf8560d1329eeff1f6df721273ce6f6e27193d20e0c0995ea77077544a5ab6f64cbb06908276eb8a27c6a6d590171b7
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
  )
@@ -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"]
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Bitfab
4
- VERSION = "0.29.1"
4
+ VERSION = "0.30.0"
5
5
  end
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.29.1
4
+ version: 0.30.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Harvest Team