0.0.2
0.0.2: Several (BREAKING) improvements to output handling:
-
An stderr/stdout file will not be written to disk until the first byte is written to disk. This prevents the "Empty Output" from appearing in UIs. For example, if nothing has been written to
stdout
, then a call to/v1/jobs/{job-id}/stdout
will return a 404 (previously, it was returning an empty file, which was ambiguous) -
BREAKING API CHANGE: Changed the job outputs HTTP API entrypoint (
/v1/jobs/{job-id}/outputs)
). The entrypoint now returns a response containing an array of job outputs (previously, it returned an object containing outputs). This change was made so that the order of outputs from a job matches entries in the new (also changed) job spec for outputs. Developers can now stipulate the order in which outputs appear. Moving the entries "one level down" into.entries
(rather than just returning an array) was done for forward-compatability with REST links etc. -
A job output in
/v1/jobs/{job-id}/outputs
now also contains the size of the output in bytes (aptly named.sizeInBytes
). This information is useful for downstream clients (rendering decisions, putting the size in download links, etc.) -
BREAKING SPEC CHANGE: Renamed
outputs
in the spec files toexpectedOutputs
to offer some symmetry withexpectedInputs
and to make it clear to developers (and the codebase) that the entries
are a statement of intention ("I expect these outputs) rather than assertion (these are the outputs). -
BREAKING SPEC CHANGE: The
expectedOutputs
are now an array of expected output entries. Previously, it was an object withoutputId
for the key and theexpectedOutput
details for the value. -
BREAKING SPEC CHANGE: An
expectedOutput
entry inexpectedOutputs
must provide anid
field (previously, this was taken as the key in the object layout). The ID field is propagated to the job outputs API. -
id
may be a template string, following the same rules as template strings inarguments
. For example, developers may stipulate that an output has anid
of ${request.id}_results.tar.gz`, which will put the request ID into the output filename (this is useful for clients, because it means if they download results from multiple
jobs those results won't all have the same name and be confusing to work with). -
name
was added as an optional field toexpectedOutput
s. This allows developers to set a human-readable name for the output. Thename
is propagated to the job outputs API. -
description
was added as an optional field toexpectedOutput
s. This allows developers to set a human-readable description for the output. Thedescription
is propagated to the job outputs API. -
metadata
was added as an optional field toexpectedOutput
s. This string-key, string-value object is guaranteed to be left unused by Jobson itself. However, it will be propagated through the job output API, so downstream clients (e.g. UIs) may use it for rendering hints without worrying about whether Jobson will manipulate the value in later versions.