Skip to content

Commit

Permalink
docs: clarify when the job history is included in responses
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Adler <[email protected]>
  • Loading branch information
michaeladler authored and stormc committed Jan 19, 2024
1 parent c554374 commit 9ddcacd
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 7 deletions.
10 changes: 8 additions & 2 deletions docs/workflows.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,14 @@ After a job has been created, its `definition`, `status`, and `tags` can be upda
the changes. To simplify things for client authors, wfx automatically updates the `status.definitionHash` whenever the
`definition` changes. This provides a mechanism for detecting changes in the `definition`.

wfx stores the previous `status` of the job, as well as the previous `definition`, in the job `history` array. This
allows reviewing job updates later on and diagnose problems.
### Job History

Whenever a job's `status` or `definition` changes, wfx prepends the current value to the job's `history` array.
This allows for reviewing job updates later on and diagnosing problems.

**Note**: By default, the job history is omitted from all `Job` responses, primarily due to its diagnostic nature but
also for bandwidth reasons. Clients requiring a job's historical data must explicitly request the specific job and
include the `history=true` parameter in their request.

### Deleting Jobs

Expand Down
2 changes: 2 additions & 0 deletions generated/model/job.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions generated/northbound/restapi/embedded_spec.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions generated/southbound/restapi/embedded_spec.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion spec/wfx.swagger.yml
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,9 @@ definitions:
readOnly: true
x-nullable: true
history:
description: The job's history. Last in, first out (LIFO). Array is truncated if its length exceeds the maximum allowed length.
description: |
The job's history. Last in, first out (LIFO). Array is truncated if its length exceeds the maximum allowed length.
By default, the job history is omitted from responses unless explicitly requested by the client (see the `history` URL parameter).
type: array
x-omitempty: true
<<: *maxHistoryCount
Expand Down

0 comments on commit 9ddcacd

Please sign in to comment.