-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Consider using externalized common logging base model for WES and TES #217
Comments
A common base schema for WES Proposed base schemaWe could, for example, define a schema BaseCommandLog:
title: BaseCommandLog
type: object
properties:
name:
type: string
description: Descriptive name for the command execution.
examples:
- sleep
- "md5 sum"
cmd:
type: array
items:
type: string
description: >
The executed command expressed as a sequence of program arguments, where
the first argument is the program to execute.
examples:
- ["sleep", "5"]
- ["/bin/md5sum", "/data/file_in", ">", "/data/file_out"]
start_time:
type: string
description: >
Time at which the execution started, in ISO 8601- and RFC 3339-compliant
"YYYY-MM-DDThh:mm:ssZ" format
examples:
- 2020-10-02T11:00:00Z
- 2020-01-31T23:59:01Z
end_time:
type: string
description: >
Time at which the execution permanently concluded, in ISO8601- and RFC
3339-compliant "YYYY-MM-DDThh:mm:ssZ" format
examples:
- 2020-10-02T23:00:00Z
- 2020-02-01T00:01:59Z
stdout:
type: string
description: >
A URL to retrieve complete standard output logs of the command
execution. The URL may change between requests, and it may not be
available until the command execution has permantly concluded. Should be
accessible through credentials that a client who is acting on behalf of
the owner of the corresponding resource will typically have, such as
those used to access the service or other outputs resulting from the
associated resource.
examples:
- s3://my-object-store/sleep.stdout
- https://my.service.org/api/v1/resources/Q2D36M7/md5_sum.stdout
stderr:
type: string
description: >
A URL to retrieve complete standard error logs of the command execution.
The URL may change between requests, and it may not be available until
the command execution has permantly concluded. Should be accessible
through credentials that a client who is acting on behalf of the owner
of the corresponding resource will typically have, such as those used to
access the service or other outputs resulting from the associated
resource.
examples:
- s3://my-object-store/sleep.stdout
- https://my.service.org/api/v1/resources/Q2D36M7/md5_sum.stderr
exit_code:
type: integer
description: Exit code of the command execution.
format: int32
examples:
- 0
- 1
system_logs:
type: array
items:
type: string
description: >
Logs that the implementation decides are relevant, but which are not
tied directly to the command execution, e.g., format, size, error
message that caused a `SYSTEM_ERROR`.
examples:
- "total output size: N/A"
- "system error: no space left on volume"
description: Command execution log. Changes with respect to current schemasThe following table lists the changes for the WES
UsageThe schema WES
|
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 TEStesExecutorLog
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 TEStesExecutorLog
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 TEStesExecutorLog
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 WESLog
and TEStesExecutorLog
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
schemaTES
tesExecutorLog
schemaComparison
Properties
Log
tesExecutorLog
name
name
is defined for TEStesTask
, two levels upstream oftesExecutorLog
, with a slightly different description (generic in WES, not generic in TES)cmd
command
property is defined in TEStesExecutor
, which is available throughtesTask.executors[]
; however, it is defined more explicitly as an array of string components (but representing a single command)start_time
Log
description is generic, the TEStesExecutorLog
description is not (refers to "executor"); (2) the WESLog
time format is more narrowly defined, expecting ISO 8601 with "%Y-%m-%dT%H:%M:%SZ" (which is also RFC 3339 compliant), compared to TEStesExecutorLog
which just references RFC 3339 (see here for a comparison of ISO 8601 and RFC 3339); (3) an example is provided for TEStesExecutorLog
, but not for WESLog
end_time
start_time
stdout
Log
is a lot more narrowly defined than TEStesExecutorLog
, with all valid WESLog
stdout
responses being valid TEStesExecutorLog
stdout
responses, but the same is not true vice versastderr
stdout
exit_code
exit_code
is required in TEStesExecutorLog
, but not in WESLog
system_logs
system_logs
are defined for TEStesTaskLog
, one level upstream oftesExecutorLog
, with a slightly different description (not generic for both WES and TES)Other fields
Log
(but not TEStesExecutorLog
) has atitle
fieldLog
description is generic, the TEStesExecutorLog
description is not (refers to "executor")The text was updated successfully, but these errors were encountered: