How do I run a workflow where a step reports warnings?

Table of Contents

The warning configuration of the identity workflow. The ores-shell block below is tangled into the runnable script library as identity_with_warnings.ores.

1. Question

How do I tell a clean run from a lossy one?

2. Answer

The second step reports warn, so the engine marks it completed_with_warnings and keeps the log entries the handler recorded. The instance still completes: a warning is not a failure, and only the step log says the run was lossy.

workflow start identity_workflow '{"steps":[{"name":"one"},{"name":"two","behaviour":"warn"}]}' --instance-id 10000000-0000-4000-8000-000000000003
workflow wait 10000000-0000-4000-8000-000000000003 --timeout 60 --expect-state completed

workflow wait fails unless the instance reaches the state named, so this script fails when the path it covers does nothing.

3. Script

projects/ores.shell/scripts/library/workflow/identity_with_warnings.ores – generated from this recipe by compass build --direct tangle_shell_scripts (do not edit the .ores by hand).

4. Tested by

Manual: compass shell -f identity_with_warnings.ores against a running fleet.

5. See also

Emacs 29.3 (Org mode 9.6.15)