2
2
Troubleshooting services
3
3
========================
4
4
5
- Crash diagnostics
6
- =================
7
- Services save the following data to the cloud if they crash while processing a question:
5
+ Diagnostics
6
+ ===========
7
+ Services save the following data to the cloud if they crash while processing a question (the default), or when they
8
+ finish processing a question successfully if diagnostics are permanently turned on (not the default):
8
9
9
10
- Input values
10
11
- Input manifest and datasets
11
12
- Child configuration values
12
13
- Child configuration manifest and datasets
13
- - Inputs to and messages received in answer to each question the service asked its children (if it has any). These are
14
+ - Inputs to and events received in response to each question the service asked its children (if it has any). These are
14
15
stored in the order the questions were asked.
15
16
16
17
.. important ::
@@ -19,24 +20,24 @@ Services save the following data to the cloud if they crash while processing a q
19
20
configuration (:ref: `octue.yaml <octue_yaml >` file) set to a Google Cloud Storage path.
20
21
21
22
22
- Accessing crash diagnostics
23
- ===========================
24
- In the event of a crash, the service will upload the crash diagnostics and send the upload path to the parent as a log
25
- message. A user with credentials to access this path can use the ``octue `` CLI to retrieve the crash diagnostics data:
23
+ Accessing diagnostics
24
+ =====================
25
+ If diagnostics are enabled, a service will upload the diagnostics and send the upload path to the parent as a log
26
+ message. A user with credentials to access this path can use the ``octue `` CLI to retrieve the diagnostics data:
26
27
27
28
.. code-block :: shell
28
29
29
- octue get-crash- diagnostics < cloud-path>
30
+ octue get-diagnostics < cloud-path>
30
31
31
32
More information on the command:
32
33
33
34
.. code-block ::
34
35
35
- >>> octue get-crash- diagnostics -h
36
+ >>> octue get-diagnostics -h
36
37
37
- Usage: octue get-crash- diagnostics [OPTIONS] CLOUD_PATH
38
+ Usage: octue get-diagnostics [OPTIONS] CLOUD_PATH
38
39
39
- Download crash diagnostics for an analysis from the given directory in
40
+ Download diagnostics for an analysis from the given directory in
40
41
Google Cloud Storage. The cloud path should end in the analysis ID.
41
42
42
43
CLOUD_PATH: The path to the directory in Google Cloud Storage containing the
@@ -46,24 +47,24 @@ More information on the command:
46
47
--local-path DIRECTORY The path to a directory to store the directory of
47
48
diagnostics data in. Defaults to the current working
48
49
directory.
49
- --download-datasets If provided, download any datasets from the crash
50
+ --download-datasets If provided, download any datasets from the
50
51
diagnostics and update their paths in their
51
52
manifests to the new local paths.
52
53
-h, --help Show this message and exit.
53
54
54
- .. _ test_fixtures_from_crash_diagnostics :
55
+ .. _ test_fixtures_from_diagnostics :
55
56
56
- Creating test fixtures from crash diagnostics
57
- =============================================
58
- You can create test fixtures directly from crash diagnostics, allowing you to recreate the exact conditions that caused
57
+ Creating test fixtures from diagnostics
58
+ =======================================
59
+ You can create test fixtures directly from diagnostics, allowing you to recreate the exact conditions that caused
59
60
your service to fail.
60
61
61
62
.. code-block :: python
62
63
63
64
from unittest.mock import patch
64
65
65
66
from octue import Runner
66
- from octue.utils.testing import load_test_fixture_from_crash_diagnostics
67
+ from octue.utils.testing import load_test_fixture_from_diagnostics
67
68
68
69
69
70
(
@@ -72,7 +73,7 @@ your service to fail.
72
73
input_values,
73
74
input_manifest,
74
75
child_emulators,
75
- ) = load_test_fixture_from_crash_diagnostics (path = " path/to/downloaded/crash /diagnostics" )
76
+ ) = load_test_fixture_from_diagnostics (path = " path/to/downloaded/diagnostics" )
76
77
77
78
# You can explicitly specify your children here as shown or
78
79
# read the same information in from your app configuration file.
@@ -108,9 +109,9 @@ your service to fail.
108
109
analysis = runner.run(input_values = input_values, input_manifest = input_manifest)
109
110
110
111
111
- Disabling crash diagnostics
112
- ===========================
113
- When asking a question to a child, parents can disable crash diagnostics upload in the child on a question-by-question
112
+ Disabling diagnostics
113
+ =====================
114
+ When asking a question to a child, parents can disable diagnostics upload in the child on a question-by-question
114
115
basis by setting ``save_diagnostics `` to ``"SAVE_DIAGNOSTICS_OFF" `` in :mod: `Child.ask <octue.resources.child.Child.ask> `.
115
116
For example:
116
117
0 commit comments