bitfab 0.33.4 → 0.33.5
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/replay.rb +17 -7
- 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: 40eaaf83e783c54b0a0b373b681d82e1d96b01f4e99a424f68af1fffcd82a79e
|
|
4
|
+
data.tar.gz: ed01d854b7ed2ee101a6bab9d659bd977c7f5ee6f0cbd0b481675d76dba449ec
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 8965c0c940f603355b3ddb75c9a93fc33e56d839a730bcbe750f2eee6db558cb4fcc2de79e9551ce5431737c8907284a7593abaa63935c84d49268b2a7eb1ed2
|
|
7
|
+
data.tar.gz: 6c8883368d7b7bc68c823cd73860722a6460543484c2a5b687b4beec7b26f8737f46d935a33fdaf9b5760fc413ba04f6313426e67b4cc624429840ec0d9d12f7
|
data/lib/bitfab/replay.rb
CHANGED
|
@@ -127,10 +127,10 @@ module Bitfab
|
|
|
127
127
|
# source_trace_id/source_span_id aliases), and returns [new_args, new_kwargs].
|
|
128
128
|
# Runs per item inside the same rescue as the method, so a raising adapter
|
|
129
129
|
# sets that item's :error rather than crashing the run.
|
|
130
|
-
# @param db_branch [Hash, nil]
|
|
131
|
-
#
|
|
132
|
-
# +:min_cu+/+:max_cu+ are the branch compute's autoscaling floor
|
|
133
|
-
# ceiling in Neon Compute Units, and +:warmup_sql+ warms the branch's
|
|
130
|
+
# @param db_branch [Boolean, Hash, nil] +true+ branches with the mirror
|
|
131
|
+
# project's own sizing; a Hash tunes it and +false+/+nil+ leave branching
|
|
132
|
+
# off. Keys +:min_cu+/+:max_cu+ are the branch compute's autoscaling floor
|
|
133
|
+
# and ceiling in Neon Compute Units, and +:warmup_sql+ warms the branch's
|
|
134
134
|
# cache before the replayed method sees it. Read the resolved branch
|
|
135
135
|
# inside the method with +Bitfab.current_replay_branch+.
|
|
136
136
|
# @param on_progress [#call, nil] optional callback invoked once per item as
|
|
@@ -192,7 +192,7 @@ module Bitfab
|
|
|
192
192
|
# the count), so it's omitted from the request entirely.
|
|
193
193
|
effective_limit = trace_ids ? nil : (limit || 5)
|
|
194
194
|
|
|
195
|
-
include_db_branch_lease =
|
|
195
|
+
include_db_branch_lease = db_branch_enabled?(db_branch)
|
|
196
196
|
|
|
197
197
|
# code_change_files controls capture: omitted auto-captures, an array
|
|
198
198
|
# wins, and explicit nil opts out. Preserve a caller-supplied description
|
|
@@ -335,16 +335,26 @@ module Bitfab
|
|
|
335
335
|
CC_MAX_FILE_BYTES = 500_000
|
|
336
336
|
CC_MAX_TOTAL_BYTES = 2_000_000
|
|
337
337
|
|
|
338
|
+
# Whether the caller asked for database branching. +true+ and a Hash both
|
|
339
|
+
# turn it on; +false+ and +nil+ leave it off. Kept separate from
|
|
340
|
+
# +db_branch_settings+ because +db_branch: true+ enables branching while
|
|
341
|
+
# contributing no settings, so the presence of settings can't stand in for
|
|
342
|
+
# the switch.
|
|
343
|
+
def db_branch_enabled?(db_branch)
|
|
344
|
+
!db_branch.nil? && db_branch != false
|
|
345
|
+
end
|
|
346
|
+
|
|
338
347
|
# Convert the caller's +db_branch+ options to the wire shape, or nil when
|
|
339
348
|
# nothing was set. Dropping the key entirely keeps the request identical to
|
|
340
|
-
# what older SDKs send.
|
|
349
|
+
# what older SDKs send. Booleans carry no settings: they only move the
|
|
350
|
+
# switch.
|
|
341
351
|
#
|
|
342
352
|
# Keys: :min_cu and :max_cu are the branch compute's autoscaling floor and
|
|
343
353
|
# ceiling in Neon Compute Units (equal values pin the size, keeping items
|
|
344
354
|
# comparable); :warmup_sql is appended to the branch's readiness check so it
|
|
345
355
|
# warms the cache before the replayed function sees the lease.
|
|
346
356
|
def db_branch_settings(db_branch)
|
|
347
|
-
return nil if db_branch.nil? || db_branch.empty?
|
|
357
|
+
return nil if db_branch.nil? || db_branch == true || db_branch == false || db_branch.empty?
|
|
348
358
|
|
|
349
359
|
# Symbol or string keys, matching normalize_code_change_files: a hash
|
|
350
360
|
# assembled from JSON or YAML would otherwise be read as empty, leaving
|
data/lib/bitfab/version.rb
CHANGED