You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: doc-source/design-principles.rst
+64-39Lines changed: 64 additions & 39 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -47,11 +47,16 @@ evidence (see :py:mod:`compliance.evidence`):
47
47
See :ref:`fetchers` section for conventions and expectations with
48
48
respect to modifying RawEvidence.
49
49
50
-
All evidence has a ``ttl`` field (Time To Live) which defines for how
51
-
long an evidence should be considered valid. For instance, healthcheck
52
-
data is only valid during 1 day since new input is generated everyday. For
53
-
this reason, any check trying to use an evidence with an expired ``ttl``
54
-
must error.
50
+
All evidence has a settable ``ttl`` (Time To Live) property that defines how
51
+
long an evidence should be considered valid. For instance, if new data is
52
+
generated on a daily basis then evidence gathered for that data should only be
53
+
valid for 1 day. For this reason, any check trying to use evidence with an
54
+
expired ``ttl`` will error.
55
+
56
+
All evidence has an ``is_empty`` property that defines an evidence's empty
57
+
state. This provides value when monitoring evidence content for completness.
58
+
The property can be overridden to define "empty" for any given evidence. By default evidence is considered empty if it has no content, is all whitespace,
59
+
or if it is JSON and is an empty dictionary or list (``{}``, ``[]``).
55
60
56
61
57
62
Evidence Locker
@@ -89,22 +94,22 @@ for:
89
94
90
95
* Validating the ``ttl`` for a given evidence. An optional evidence
91
96
``ttl`` tolerance value can be configured to be applied during
92
-
fetcher execution. Check execution is not affected by this optional
93
-
tolerance value because checks should only interact with evidence that
94
-
is fresh (not stale). This value (in seconds) tells fetchers to
97
+
fetcher execution. This value (in seconds) tells fetchers to
95
98
retrieve evidence that is nearly but not yet stale. If no value is
96
99
supplied then fetchers will only retrieve new evidence after ``ttl``
97
100
has expired. You can set the optional ``ttl_tolerance`` value in
0 commit comments