Skip to content

Commit b3cfa00

Browse files
authored
MRG: Merge pull request #668 from octue/improve-manifest-download
Download manifest dataset to same tempdir by default
2 parents 3dc86aa + ed77f40 commit b3cfa00

28 files changed

+568
-1039
lines changed

docs/source/asking_questions.rst

-2
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,6 @@ access the event store and run:
123123
{
124124
"event": {
125125
"kind": "delivery_acknowledgement",
126-
"datetime": "2024-03-06T15:44:18.156044"
127126
},
128127
},
129128
{
@@ -156,7 +155,6 @@ access the event store and run:
156155
{
157156
"event": {
158157
"kind": "heartbeat",
159-
"datetime": "2024-03-06T15:46:18.167424"
160158
},
161159
},
162160
{

docs/source/inter_service_compatibility.rst

+81-79
Large diffs are not rendered by default.

docs/source/manifest.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ Download all or a subset of datasets from a manifest.
8383
8484
.. note::
8585

86-
Datasets are downloaded to temporary directories if no paths are given.
86+
Datasets are downloaded to a temporary directory if no paths are given.
8787

8888

8989
Further information

docs/source/testing_services.rst

+128-105
Large diffs are not rendered by default.

docs/source/troubleshooting_services.rst

+23-22
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,16 @@
22
Troubleshooting services
33
========================
44

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):
89

910
- Input values
1011
- Input manifest and datasets
1112
- Child configuration values
1213
- 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
1415
stored in the order the questions were asked.
1516

1617
.. important::
@@ -19,24 +20,24 @@ Services save the following data to the cloud if they crash while processing a q
1920
configuration (:ref:`octue.yaml <octue_yaml>` file) set to a Google Cloud Storage path.
2021

2122

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:
2627

2728
.. code-block:: shell
2829
29-
octue get-crash-diagnostics <cloud-path>
30+
octue get-diagnostics <cloud-path>
3031
3132
More information on the command:
3233

3334
.. code-block::
3435
35-
>>> octue get-crash-diagnostics -h
36+
>>> octue get-diagnostics -h
3637
37-
Usage: octue get-crash-diagnostics [OPTIONS] CLOUD_PATH
38+
Usage: octue get-diagnostics [OPTIONS] CLOUD_PATH
3839
39-
Download crash diagnostics for an analysis from the given directory in
40+
Download diagnostics for an analysis from the given directory in
4041
Google Cloud Storage. The cloud path should end in the analysis ID.
4142
4243
CLOUD_PATH: The path to the directory in Google Cloud Storage containing the
@@ -46,24 +47,24 @@ More information on the command:
4647
--local-path DIRECTORY The path to a directory to store the directory of
4748
diagnostics data in. Defaults to the current working
4849
directory.
49-
--download-datasets If provided, download any datasets from the crash
50+
--download-datasets If provided, download any datasets from the
5051
diagnostics and update their paths in their
5152
manifests to the new local paths.
5253
-h, --help Show this message and exit.
5354
54-
.. _test_fixtures_from_crash_diagnostics:
55+
.. _test_fixtures_from_diagnostics:
5556

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
5960
your service to fail.
6061

6162
.. code-block:: python
6263
6364
from unittest.mock import patch
6465
6566
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
6768
6869
6970
(
@@ -72,7 +73,7 @@ your service to fail.
7273
input_values,
7374
input_manifest,
7475
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")
7677
7778
# You can explicitly specify your children here as shown or
7879
# read the same information in from your app configuration file.
@@ -108,9 +109,9 @@ your service to fail.
108109
analysis = runner.run(input_values=input_values, input_manifest=input_manifest)
109110
110111
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
114115
basis by setting ``save_diagnostics`` to ``"SAVE_DIAGNOSTICS_OFF"`` in :mod:`Child.ask <octue.resources.child.Child.ask>`.
115116
For example:
116117

0 commit comments

Comments
 (0)