From bb8f01002283f4044ce9218e7705cbaf91d61f8e Mon Sep 17 00:00:00 2001 From: Ben Hoyt Date: Mon, 16 Oct 2023 11:22:58 +1300 Subject: [PATCH] docs: add note to set_results about maximum size --- ops/charm.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ops/charm.py b/ops/charm.py index bf00b30ef..9d938ed4a 100755 --- a/ops/charm.py +++ b/ops/charm.py @@ -162,6 +162,11 @@ def set_results(self, results: Dict[str, Any]): alphanumeric, and can only contain lowercase alphanumeric, hyphens and periods. + Because results are passed to Juju using the command line, the maximum + size is around 100KB. However, actions results are designed to be + small: a few key-value pairs shown in the Juju CLI. If larger content + is needed, store it in a file and use something like ``juju scp``. + If any exceptions occur whilst the action is being handled, juju will gather any stdout/stderr data (and the return code) and inject them into the results object. Thus, the results object might contain the following keys,