bitfab 0.78.1 → 0.78.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/agent_session_experiments.rb +40 -0
- data/lib/bitfab/cloudReplay.mjs +24170 -0
- data/lib/bitfab/cloud_replay_cli.rb +4 -3
- data/lib/bitfab/replay.rb +7 -0
- data/lib/bitfab/version.rb +1 -1
- metadata +3 -2
- data/lib/bitfab/cloudReplay.py +0 -3758
|
@@ -7,7 +7,8 @@ module Bitfab
|
|
|
7
7
|
module CloudReplayCli
|
|
8
8
|
HINT = "Add --cloud to run the same replay on GitHub Actions; bitfab-replay --cloud --help explains it."
|
|
9
9
|
|
|
10
|
-
HELPER = File.expand_path("cloudReplay.
|
|
10
|
+
HELPER = File.expand_path("cloudReplay.mjs", __dir__)
|
|
11
|
+
NO_NODE = "Cloud replay needs Node.js 18+ on PATH as node"
|
|
11
12
|
REPLAY_EXECUTABLE = File.expand_path("../../exe/bitfab-replay", __dir__)
|
|
12
13
|
|
|
13
14
|
module_function
|
|
@@ -21,7 +22,7 @@ module Bitfab
|
|
|
21
22
|
"BITFAB_REPLAY_COMMAND" => JSON.generate([RbConfig.ruby, REPLAY_EXECUTABLE]),
|
|
22
23
|
"BITFAB_SDK_LANGUAGE" => "ruby"
|
|
23
24
|
}
|
|
24
|
-
pid = Process.spawn(env, "
|
|
25
|
+
pid = Process.spawn(env, "node", helper, *argv)
|
|
25
26
|
begin
|
|
26
27
|
_, status = Process.wait2(pid)
|
|
27
28
|
rescue Interrupt
|
|
@@ -29,7 +30,7 @@ module Bitfab
|
|
|
29
30
|
end
|
|
30
31
|
status.exitstatus || ((status.termsig == Signal.list["INT"]) ? 130 : 1)
|
|
31
32
|
rescue Errno::ENOENT
|
|
32
|
-
warn
|
|
33
|
+
warn NO_NODE
|
|
33
34
|
1
|
|
34
35
|
end
|
|
35
36
|
end
|
data/lib/bitfab/replay.rb
CHANGED
|
@@ -5,6 +5,7 @@ require "json"
|
|
|
5
5
|
require "open3"
|
|
6
6
|
require "timeout"
|
|
7
7
|
|
|
8
|
+
require_relative "agent_session_experiments"
|
|
8
9
|
require_relative "constants"
|
|
9
10
|
require_relative "git_command"
|
|
10
11
|
require_relative "mock_override"
|
|
@@ -477,6 +478,12 @@ module Bitfab
|
|
|
477
478
|
experiment_url = replay_data["experimentUrl"] || replay_data["testRunUrl"]
|
|
478
479
|
# Nil for a dry run: current servers create no experiment for one.
|
|
479
480
|
full_experiment_url = experiment_url && "#{client.service_url}#{experiment_url}"
|
|
481
|
+
if experiment_id && full_experiment_url
|
|
482
|
+
AgentSessionExperiments.record(
|
|
483
|
+
experiment_id:, experiment_url: full_experiment_url, name:,
|
|
484
|
+
service_url: client.service_url, explicit_agent_session_id: agent_session_id
|
|
485
|
+
)
|
|
486
|
+
end
|
|
480
487
|
if on_experiment_start && experiment_id
|
|
481
488
|
begin
|
|
482
489
|
on_experiment_start.call({experiment_id:, experiment_url: full_experiment_url})
|
data/lib/bitfab/version.rb
CHANGED
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.78.
|
|
4
|
+
version: 0.78.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Harvest Team
|
|
@@ -170,11 +170,12 @@ files:
|
|
|
170
170
|
- exe/bitfab-seed
|
|
171
171
|
- lib/bitfab.rb
|
|
172
172
|
- lib/bitfab/agent_session.rb
|
|
173
|
+
- lib/bitfab/agent_session_experiments.rb
|
|
173
174
|
- lib/bitfab/assertions.rb
|
|
174
175
|
- lib/bitfab/baml.rb
|
|
175
176
|
- lib/bitfab/categories.rb
|
|
176
177
|
- lib/bitfab/client.rb
|
|
177
|
-
- lib/bitfab/cloudReplay.
|
|
178
|
+
- lib/bitfab/cloudReplay.mjs
|
|
178
179
|
- lib/bitfab/cloud_replay_cli.rb
|
|
179
180
|
- lib/bitfab/commit_ref.rb
|
|
180
181
|
- lib/bitfab/compress.rb
|