-
Notifications
You must be signed in to change notification settings - Fork 38
Description
Problem
Using the same schemas or base schemas across APIs to support identical or similar use cases facilitates implementation and therefore has the potential to increase adoption.
However, even though the WES Log
schema and the TES tesExecutorLog
schema are very similar to one another and likely originate from the same ancestor, they diverged over time. While this may well be for good reasons, it is also plausible that the divergence is simply a result of largely different communities working separately on the further development of the different APIs.
It might thus be worthwhile to explore whether the WES Log
and TES tesExecutorLog
schemas could be harmonized and how that could simplify or otherwise benefit the specifications.
Possible solution
A possible solution is to replace WES Log
and TES tesExecutorLog
with a new schema that is defined in an independent, external OpenAPI document that could be maintained by the Cloud API and/or DaMaSC communities. An alternative to using the same identical schema for WES Log
and TES tesExecutorLog
could be to instead define a base schema that both schemas inherit from and extend differently.
The differences between the specifications are highlighted in the "Additional context" section below.
Possible alternatives
If differences and/or use cases between both schemas are too different, it would not make sense to harmonize schemas. In that case, nothing should be done.
Additional context
Schemas
WES Log
schema
Log:
title: Log
type: object
properties:
name:
type: string
description: The task or workflow name
cmd:
type: array
items:
type: string
description: The command line that was executed
start_time:
type: string
description: When the command started executing, in ISO 8601 format "%Y-%m-%dT%H:%M:%SZ"
end_time:
type: string
description: When the command stopped executing (completed, failed, or cancelled), in ISO 8601 format "%Y-%m-%dT%H:%M:%SZ"
stdout:
type: string
description: A URL to retrieve standard output logs of the workflow run or task. This URL may change between status requests, or may not be available until the task or workflow has finished execution. Should be available using the same credentials used to access the WES endpoint.
stderr:
type: string
description: A URL to retrieve standard error logs of the workflow run or task. This URL may change between status requests, or may not be available until the task or workflow has finished execution. Should be available using the same credentials used to access the WES endpoint.
exit_code:
type: integer
description: Exit code of the program
format: int32
system_logs:
type: array
items:
type: string
description: |-
System logs are any logs the system decides are relevant,
which are not tied directly to a workflow.
Content is implementation specific: format, size, etc.
System logs may be collected here to provide convenient access.
For example, the system may include an error message that caused
a SYSTEM_ERROR state (e.g. disk is full), etc.
description: Log and other info
TES tesExecutorLog
schema
tesExecutorLog:
required:
- exit_code
type: object
properties:
start_time:
type: string
description: Time the executor started, in RFC 3339 format.
example: 2020-10-02T10:00:00-05:00
end_time:
type: string
description: Time the executor ended, in RFC 3339 format.
example: 2020-10-02T11:00:00-05:00
stdout:
type: string
description: |-
Stdout content.
This is meant for convenience. No guarantees are made about the content.
Implementations may chose different approaches: only the head, only the tail,
a URL reference only, etc.
In order to capture the full stdout client should set Executor.stdout
to a container file path, and use Task.outputs to upload that file
to permanent storage.
stderr:
type: string
description: |-
Stderr content.
This is meant for convenience. No guarantees are made about the content.
Implementations may chose different approaches: only the head, only the tail,
a URL reference only, etc.
In order to capture the full stderr client should set Executor.stderr
to a container file path, and use Task.outputs to upload that file
to permanent storage.
exit_code:
type: integer
description: Exit code.
format: int32
description: ExecutorLog describes logging information related to an Executor.
Comparison
Properties
Property | WES Log |
TES tesExecutorLog |
Identical type/format | Differences |
---|---|---|---|---|
name |
✔️ | ❌ | ( ✔️ ) | name is defined for TES tesTask , two levels upstream of tesExecutorLog , with a slightly different description (generic in WES, not generic in TES) |
cmd |
✔️ | ❌ | ( ✔️ ) | An equivalent command property is defined in TES tesExecutor , which is available through tesTask.executors[] ; however, it is defined more explicitly as an array of string components (but representing a single command) |
start_time |
✔️ | ✔️ | ✔️ | (1) the WES Log description is generic, the TES tesExecutorLog description is not (refers to "executor"); (2) the WES Log time format is more narrowly defined, expecting ISO 8601 with "%Y-%m-%dT%H:%M:%SZ" (which is also RFC 3339 compliant), compared to TES tesExecutorLog which just references RFC 3339 (see here for a comparison of ISO 8601 and RFC 3339); (3) an example is provided for TES tesExecutorLog , but not for WES Log |
end_time |
✔️ | ✔️ | ✔️ | same as for start_time |
stdout |
✔️ | ✔️ | ✔️ | WES Log is a lot more narrowly defined than TES tesExecutorLog , with all valid WES Log stdout responses being valid TES tesExecutorLog stdout responses, but the same is not true vice versa |
stderr |
✔️ | ✔️ | ✔️ | same as for stdout |
exit_code |
✔️ | ✔️ | ✔️ | (1) slight difference in description text; (2) exit_code is required in TES tesExecutorLog , but not in WES Log |
system_logs |
✔️ | ❌ | ( ✔️ ) | system_logs are defined for TES tesTaskLog , one level upstream of tesExecutorLog , with a slightly different description (not generic for both WES and TES) |
Other fields
- WES
Log
(but not TEStesExecutorLog
) has atitle
field - The WES
Log
description is generic, the TEStesExecutorLog
description is not (refers to "executor")