bitfab 0.72.1 → 0.73.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/scenarios.rb +12 -4
- 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: 1a30e89baf273769afece482948a0ff108d9a1a2481fad9b2edbcbf8169a344f
|
|
4
|
+
data.tar.gz: c6807a2ba664c08f1626b879242fab202a37859f0c8c3af2c833e6fc5df74b0d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: fffcdc93382999f0f4e087f8cdeab967768afebfc14ef98d9235257102604d5a9e2203d4953f5fa2f04e77c4656fdd14d08113276c5ccbb34162663bdd9a2180
|
|
7
|
+
data.tar.gz: 123101bb86a8eafa4fb4f89e86f1856a29e9d262adfc134b0fbad9ca505e9bf51b46532df51658509d1d7c54b7d7362c0faa8ebb71cd15b3cc880660eb4707a4
|
data/lib/bitfab/scenarios.rb
CHANGED
|
@@ -9,14 +9,22 @@ module Bitfab
|
|
|
9
9
|
RECORDS_KEYS_IN_DATA = %w[records sources].freeze
|
|
10
10
|
private_constant :RECORDS_KEYS_IN_DATA
|
|
11
11
|
|
|
12
|
+
# Reads the scenario built from trace_id, in any creation state, and returns its hash. "creationStatus" is
|
|
13
|
+
# "empty" when nothing has started building it, "generating" while Bitfab builds it or waits for the scenario
|
|
14
|
+
# callback to save it, "created" once it is built, and "error" when building failed, with "creationError" saying
|
|
15
|
+
# why. "trigger", "data", "triggerSummary", and "dataSummary" are nil until the scenario is built. After
|
|
16
|
+
# generate_scenario, poll this until "creationStatus" is "created" or "error". A trace with no scenario at all
|
|
17
|
+
# raises an error.
|
|
12
18
|
def get_scenario(trace_id)
|
|
13
19
|
@http_client.get(scenario_path(trace_id))["scenario"]
|
|
14
20
|
end
|
|
15
21
|
|
|
16
|
-
# Starts building the scenario for trace_id and returns at once, without waiting for it.
|
|
17
|
-
#
|
|
18
|
-
#
|
|
19
|
-
#
|
|
22
|
+
# Starts building the scenario for trace_id and returns at once, without waiting for it. Poll get_scenario until
|
|
23
|
+
# its "creationStatus" is "created" or "error". Returns {"status", "traceId", "scenarioId", "creationStatus"}:
|
|
24
|
+
# "status" is "started" while Bitfab builds it in the background, or "already_generated" when the trace already
|
|
25
|
+
# has a scenario, which is left as it is and named by "scenarioId". A scenario whose build failed is started
|
|
26
|
+
# again. "scenarioId" is nil while the trace has no scenario yet, and "creationStatus" is the scenario's creation
|
|
27
|
+
# status right after the call.
|
|
20
28
|
#
|
|
21
29
|
# A replay, a trace outside the organization, or a trace Bitfab cannot build a scenario for (not
|
|
22
30
|
# noah-agent-turn and no scenario callback) raises an error. Adding a trace to a dataset starts the same build
|
data/lib/bitfab/version.rb
CHANGED