Skip to content

Commit 9ddcacd

Browse files
michaeladlerstormc
authored andcommitted
docs: clarify when the job history is included in responses
Signed-off-by: Michael Adler <[email protected]>
1 parent c554374 commit 9ddcacd

File tree

5 files changed

+17
-7
lines changed

5 files changed

+17
-7
lines changed

docs/workflows.md

+8-2
Original file line numberDiff line numberDiff line change
@@ -106,8 +106,14 @@ After a job has been created, its `definition`, `status`, and `tags` can be upda
106106
the changes. To simplify things for client authors, wfx automatically updates the `status.definitionHash` whenever the
107107
`definition` changes. This provides a mechanism for detecting changes in the `definition`.
108108

109-
wfx stores the previous `status` of the job, as well as the previous `definition`, in the job `history` array. This
110-
allows reviewing job updates later on and diagnose problems.
109+
### Job History
110+
111+
Whenever a job's `status` or `definition` changes, wfx prepends the current value to the job's `history` array.
112+
This allows for reviewing job updates later on and diagnosing problems.
113+
114+
**Note**: By default, the job history is omitted from all `Job` responses, primarily due to its diagnostic nature but
115+
also for bandwidth reasons. Clients requiring a job's historical data must explicitly request the specific job and
116+
include the `history=true` parameter in their request.
111117

112118
### Deleting Jobs
113119

generated/model/job.go

+2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

generated/northbound/restapi/embedded_spec.go

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

generated/southbound/restapi/embedded_spec.go

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

spec/wfx.swagger.yml

+3-1
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,9 @@ definitions:
290290
readOnly: true
291291
x-nullable: true
292292
history:
293-
description: The job's history. Last in, first out (LIFO). Array is truncated if its length exceeds the maximum allowed length.
293+
description: |
294+
The job's history. Last in, first out (LIFO). Array is truncated if its length exceeds the maximum allowed length.
295+
By default, the job history is omitted from responses unless explicitly requested by the client (see the `history` URL parameter).
294296
type: array
295297
x-omitempty: true
296298
<<: *maxHistoryCount

0 commit comments

Comments
 (0)