-
Notifications
You must be signed in to change notification settings - Fork 45
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
Proposal OGC API - Processs - Part4: Job Management #437
Changes from all commits
717321a
ca03fbd
6b7acb3
4aaf777
8a6d469
3281c3d
7b7ed5d
160869a
c127cb7
c40f9f3
de992c9
18bad72
5469b35
dfe6472
a3ed0c0
a36f218
16c0fda
33677d8
ad78f24
df465c5
dacc370
60c04ab
166d805
d12e0a6
3737503
80cbc5d
40e94ab
06656a8
05209d9
7b79c50
efb4e8e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
.DS_Store | ||
.idea | ||
.vscode | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# Standard template | ||
|
||
This folder contains the content for the OGC API - Processes - Part 4: Job Management (JM). | ||
|
||
This extension provides the ability to create new jobs without starting its execution. Meaning that you can prepare a job and execute it later. This extension also provides ways to track history associated with the execution, starting with the job definition. | ||
|
||
The repo is organized as follows: | ||
|
||
* standard - the main standard document content | ||
- organized in multiple sections and directories (recommendations, requirements, etc.) | ||
* xml - normative XML/XSD components specified by the standard | ||
* examples - JSON and XML examples | ||
|
||
The schemas associated with this extension are stored from the root directory in `openapi/*{api,parameters,path,responses,schemas}*/processes-job-management`. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Add JSON examples to this directory. If not used, delete the directory. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Add XML examples to this directory. If not used, delete the directory. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
= OGC API - Processes - Part 4: Job Management | ||
:doctype: standard | ||
:docsubtype: implementation | ||
:docnumber: 24-051 | ||
:status: draft | ||
:copyright-year: 2019 | ||
:edition: 1.0 | ||
:language: en | ||
:published-date: yyyy-mm-dd | ||
:received-date: yyyy-mm-dd | ||
:issued-date: yyyy-mm-dd | ||
:external-id: http://www.opengis.net/doc/IS/ogcapi-processes-4/1.0 | ||
:keywords: process, instance, spatial, data, openapi, job, create, update, delete, add, remove, REST, PATCH, POST, DELETE | ||
:submitting-organizations: Geolabs; Terradue Srl.; Computer Research Institute of Montréal (CRIM). | ||
:editor: Gérald Fenoy | ||
:mn-document-class: ogc | ||
:mn-output-extensions: xml,html,doc,pdf | ||
|
||
//// | ||
Make sure to complete each included document | ||
//// | ||
include::sections/clause_0_front_material.adoc[] | ||
|
||
include::sections/clause_1_scope.adoc[] | ||
|
||
include::sections/clause_2_conformance.adoc[] | ||
|
||
include::sections/clause_3_references.adoc[] | ||
|
||
include::sections/clause_4_terms_and_definitions.adoc[] | ||
|
||
include::sections/clause_5_conventions.adoc[] | ||
|
||
include::sections/clause_6_job_management.adoc[] | ||
|
||
include::sections/clause_7_ogcapi-processes.adoc[] | ||
|
||
include::sections/clause_8_openeo.adoc[] | ||
|
||
include::sections/clause_9_provenance.adoc[] | ||
|
||
include::sections/clause_10_oas.adoc[] | ||
|
||
include::sections/clause_11_media_types.adoc[] | ||
|
||
include::sections/clause_12_security_considerations.adoc[] | ||
|
||
include::sections/annex_ats.adoc[] | ||
|
||
//// | ||
Revision History should be the last annex before the Bibliography | ||
Bibliography should be the last annex | ||
//// | ||
include::sections/annex_history.adoc[] | ||
|
||
include::sections/annex_bibliography.adoc[] |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
This folder contains the text for part 4 of the OGC API Processes standard. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
[[ats_jm]] | ||
[conformance_class] | ||
.Job Management | ||
==== | ||
[%metadata] | ||
identifier:: http://www.opengis.net/spec/ogcapi-processes-4/1.0/conf/job-management | ||
subject:: <<rc_job-management,http://www.opengis.net/spec/ogcapi-processes-4/1.0/conf/job-management>> | ||
classification:: Target Type:Web API | ||
conformance-test:: /conf/dru/deploy/post-op | ||
==== | ||
|
||
==== Create operation | ||
|
||
include::jm/create/ATS_post-op.adoc[] |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
This folder contains the Abstract Test Suite. | ||
|
||
Each file describes a single test. The naming convention for these files is: | ||
|
||
"cc/TESTn.adoc" where "cc" corresponds to the identifier for the requirements class and "n" corresponds to the test number. Numbers should have preceeding zeros appropriate for the total number of tests in the conformance class (e.g., the first test could be TEST001 if less than 1000 tests are anticipated). | ||
|
||
The test is expressed according to this pattern: | ||
|
||
```` | ||
===== Test case title | ||
|
||
(( additional discussion, if needed )) | ||
|
||
====== a) Test Purpose: | ||
(( description )) | ||
|
||
====== b) Pre-conditions: | ||
* (( list all preconditions )) | ||
|
||
====== c) Test Method: | ||
* (( steps to execute and assertions to test )) | ||
|
||
====== d) References: | ||
* <<req_cc_req,Requirement /req/cc/req>> | ||
```` | ||
|
||
NOTE: for each test, there must be one or more requirements in the "requirements" folder. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
===== Test case title | ||
|
||
(( additional discussion, if needed )) | ||
|
||
====== a) Test Purpose: | ||
(( description )) | ||
|
||
====== b) Pre-conditions: | ||
* (( list all preconditions )) | ||
|
||
====== c) Test Method: | ||
* (( steps to execute and assertions to test )) | ||
|
||
====== d) References: | ||
* <<req_cc_req,Requirement /req/cc/req>> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
[[ats_jm_deploy_post-op]] | ||
|
||
[abstract_test] | ||
==== | ||
[%metadata] | ||
identifier:: /conf/jm/create/post-op | ||
target:: <<req_job-management_create_post-op,/req/job-management/create/post-op>> | ||
test-purpose:: Validate that the server support HTTP POST operation at the path /jobs/ | ||
test-method:: | ||
+ | ||
-- | ||
1. Construct a path for the {root}/jobs path. | ||
|
||
2. Issue an HTTP POST request for each path. | ||
|
||
3. Validate that the response header does not contain `405 Method not allowed` | ||
-- | ||
==== | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
Figures go here. | ||
|
||
Each figure is a separate file with the naming convention: | ||
|
||
"PTm_FIGn.xxx" where "m" is a number with leading zeroes appropriate for the total number of parts, "n" is a number with leading zeroes appropriate for the total number of figures and "xxx" is the appropriate extension for the file type. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
Image files for graphics go here. | ||
|
||
Each graphic is a separate file with the naming convention: | ||
|
||
"FIGn.xxx" where "n" is a number with leading zeroes appropriate for the total number of figures and "xxx" is the appropriate extension for the file type. | ||
|
||
or, for other graphics not associated with figures: | ||
|
||
"GRPn.xxx" where "n" is a sequential number with leading zeroes appropriate for the total number of graphics and "xxx" is the appropriate extension for the file type. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
OGC API - Processes - Part 4: Job Management recommendations. | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
[[per_job-management_additional-status-codes]] | ||
[permission] | ||
==== | ||
[%metadata] | ||
label:: /per/job-management/additional-status-codes | ||
part:: Servers MAY support other HTTP protocol capabilities. Therefore, the server may return other status codes than those listed in <<status_codes>>. | ||
Comment on lines
+5
to
+6
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @m-mohr FYI, about the mentioned status code flexibility. |
||
==== |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
[[per_job-management_create_body]] | ||
[permission] | ||
==== | ||
[%metadata] | ||
label:: /per/job-management/create-body | ||
part:: A server MAY support any encoding in the body of a HTTP POST operation. | ||
==== |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
[[per_job-management_create_content-schema]] | ||
[permission] | ||
==== | ||
[%metadata] | ||
label:: /per/job-management/create-content-schema | ||
part:: The `Content-Schema` header MAY be an URI to a JSON or OpenAPI 3.0 Schema document that describes the structure of the request body. | ||
==== | ||
Comment on lines
+1
to
+7
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can someone explain to me, how this is meant to work? I'm lacking some context... It feels like that schemas per endpoint are just too generic and will be difficult to implement. Maybe we should be more specific here. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The idea is that a client would send a request similar to the following: POST /jobs HTTP/1.1
Content-Type: application/json
Content-Schema: https://raw.githubusercontent.com/common-workflow-language/cwl-v1.2/main/json-schema/cwl.yaml
{"cwl-workflow": "..."} POST /jobs HTTP/1.1
Content-Type: application/json
Content-Schema: https://api.openeo.org/assets/pg-schema.json
{"openeo-process-graph": "..."} POST /jobs HTTP/1.1
Content-Type: application/json
Content-Schema: https://raw.githubusercontent.com/opengeospatial/ogcapi-processes/refs/heads/master/openapi/schemas/processes-workflows/execute-workflows.yaml
{"oap-ad-hoc-workflow": "..."} This would allow the server to (explicitly) distinguish between different contents submitted with similar JSON (or YAML, etc.) types, while giving the flexibility to the server to decide which content schema it prefers to use by default, and does not introduce modifications to A server that is already more OGC API - Processes - Workflows, CWL or openEO aligned can then continue to submit its contents as before, and has a way to indicate the alternate In every case, a mismatch of
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think there should be more alignment then just the endpoint name and then specifying which type it will be.
or CWL:
etc. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
[[rec_job-management_create_body-ogcapi-processes]] | ||
[recommendation] | ||
==== | ||
[%metadata] | ||
label:: /rec/job-management/create-body-ogcapi-processes | ||
|
||
part:: If the job can be encoded as an <<rc_ogcapi-processes,OGC API - Processes - Workflow Execute Request>>, implementation SHOULD consider supporting the <<rc_ogcapi-processes,OGC API - Processes - Workflow Execute Request>> encoding. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The |
||
==== |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
[[rec_job-management_create_body-openeo]] | ||
[recommendation] | ||
==== | ||
[%metadata] | ||
label:: /rec/job-management/create-body-openeo | ||
|
||
part:: If the job can be encoded as an <<rc_openeo,OpenEO graph>>, implementation SHOULD consider supporting the <<rc_openeo,OpenEO graph>> encoding. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. As for the OAP Workflow Execute Request case, this should probably recommend an established There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The question for openEO is, what you actually submit here? A job or a process? I guess it's a job description - and then I'm wondering whether there's a way to align that a bit more across encodings/specs... There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. For submission, it would be the contents of https://api.openeo.org/#tag/Batch-Jobs/operation/create-job I'd expect |
||
==== |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
[[per_job-management_update_body]] | ||
[permission] | ||
==== | ||
[%metadata] | ||
label:: /per/job-management/update-body | ||
part:: A server MAY support any encoding in the body of a HTTP PATCH operation. | ||
==== |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
[[per_job-management_update_content-schema]] | ||
[permission] | ||
==== | ||
[%metadata] | ||
label:: /per/job-management/update-content-schema | ||
part:: The `Content-Schema` header MAY be used to indicate the schema of a request body for updating a job. | ||
==== |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
[[rec_job-management_update-ogcapi-processes]] | ||
[recommendation] | ||
==== | ||
[%metadata] | ||
label:: /rec/job-management/update-body-ogcapi-processes | ||
|
||
part:: If a job can be created from an <<rc_ogcapi-processes,OGC API - Processes - Workflow Execute Request>>, implementations SHOULD consider supporting the <<rc_ogcapi-processes,OGC API - Processes - Workflow Execute Request>> encoding. | ||
|
||
==== |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
[[rec_job-management_update-openeo]] | ||
[recommendation] | ||
==== | ||
[%metadata] | ||
label:: /rec/job-management/update-body-openeo | ||
|
||
part:: If a job can be created from an <<rc_openeo,OpenEO Process Graph>>, implementations SHOULD consider supporting the <<rc_openeo,OpenEO Process Graph>> encoding. | ||
|
||
==== |
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is there any reason for these to be defined separately? |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
[[per_ogcapi-processes_create_content-schema]] | ||
[permission] | ||
==== | ||
[%metadata] | ||
label:: /per/ogcapi-processes/create-content-schema | ||
part:: The `Content-Schema` header MAY be pointing to the OpenAPI 3.0 schema https://github.com/opengeospatial/ogcapi-processes/blob/master/openapi/schemas/processes-workflows/execute-workflows.yaml[execute-workflows.yaml]. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ideally, all endpoints should use the URI to the expected location when published |
||
==== |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
[[per_ogcapi-processes_update_content-schema]] | ||
[permission] | ||
==== | ||
[%metadata] | ||
label:: /per/ogcapi-processes/update-content-schema | ||
part:: The `Content-Schema` header MAY be pointing to the OpenAPI 3.0 schema https://github.com/opengeospatial/ogcapi-processes/blob/master/openapi/schemas/processes-workflows/execute-workflows.yaml[execute-workflows.yaml]. | ||
==== |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
[[per_openeo_create_content-schema]] | ||
[permission] | ||
==== | ||
[%metadata] | ||
label:: /per/openeo/create-content-schema | ||
part:: The `Content-Schema` header MAY be pointing to https://raw.githubusercontent.com/Open-EO/openeo-processes/master/meta/subtype-schemas.json#/definitions/process-graph[OpenEO Process Graph schema]. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Similarly, we should look for an "official" endpoint where a static/versioned document can be found. @m-mohr does one exist ? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes. For example https://processes.openeo.org/1.2.0/meta/subtype-schemas.json |
||
==== |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
[[per_openeo_update_content-schema]] | ||
[permission] | ||
==== | ||
[%metadata] | ||
label:: /per/openeo/update-content-schema | ||
part:: The `Content-Schema` header MAY be pointing to https://raw.githubusercontent.com/Open-EO/openeo-processes/master/meta/subtype-schemas.json#/definitions/process-graph[OpenEO Process Graph schema]. | ||
==== |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
[[per_job-provenance_run_content-negotiation]] | ||
[permission] | ||
==== | ||
[%metadata] | ||
label:: /per/provenance/run-content-negotiation | ||
part:: Content negotiation MAY be supported to provide alternate representations of the response. | ||
part:: The server MAY support the following additional content type: `application/ld+json` for PROV-O as JSON-LD | ||
part:: The server MAY support the following additional content type: `application/xml` for PROV-XML | ||
part:: The server MAY support the following additional content type: `text/provenance-notation; charset="UTF-8"` for PROV-N. | ||
==== |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
[[req_job-management_create_body]] | ||
[requirement] | ||
==== | ||
[%metadata] | ||
label:: /req/job-management/create-body | ||
part:: The body of the POST request SHALL be in JSON format. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. On one hand, it says in a permission that any encoding is allowed, but here it's required to be JSON?! |
||
==== |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
[[req_job-management_create_content-type]] | ||
[requirement] | ||
==== | ||
[%metadata] | ||
label:: /req/job-management/create-content-type | ||
part:: The `Content-Type` https://tools.ietf.org/html/rfc2616#section-14.17[header] SHALL be used to declare the media type of the request. | ||
==== |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
[[req_job-management_create_post-op]] | ||
[requirement] | ||
==== | ||
[%metadata] | ||
label:: /req/job-management/create-post-op | ||
part:: The server SHALL support the HTTP POST operation at the path `/jobs`. | ||
==== |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
[[req_job-management_create_response-body]] | ||
[requirement] | ||
==== | ||
[%metadata] | ||
label:: /req/job-management/create-response-body | ||
part:: The response SHALL include a body that contains a status information of the created job that conforms to the https://schemas.opengis.net/ogcapi/processes/part1/1.0/openapi/schemas/statusInfo.yaml[statusInfo.yaml] schema. | ||
part:: The response SHALL contain a `created` status code and the `id` property that contains the job identifier. | ||
==== |
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -0,0 +1,7 @@ | ||||||
[[req_job-management_create_response-jobid]] | ||||||
[requirement] | ||||||
==== | ||||||
[%metadata] | ||||||
label:: /req/job-management/create-response-jobid | ||||||
part:: If the operation completes, the server SHALL generate a job identifier (i.e. `{jobId}`) for the created job. | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
I this variable is confusing w/o context. |
||||||
==== |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
[[req_job-management_create_response_success]] | ||
[requirement] | ||
==== | ||
[%metadata] | ||
label:: /req/job-management/create-response-success | ||
part:: A successful execution of the operation SHALL be reported as a response with a HTTP status code `201`. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Given that some servers could want to handle the case evoked in the meeting, (ie: job "created" and deleted right away to do a "sync" execution), a 200 OK or 202 Accepted, might be considered. This could also be used by async execution, to indicate that the job was accepted, but not yet "running". There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. How does this requirement relate to https://github.com/opengeospatial/ogcapi-processes/pull/437/files#r1789867436 ? (Comment is unrelated to Francis' comment) |
||
part:: A response with HTTP status code `201` SHALL include a `Location` header with the URI of the deployed processes (path: `/jobs/{jobId}`). | ||
==== |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
[[req_job-management_create_unsupported-media-type]] | ||
[requirement] | ||
==== | ||
[%metadata] | ||
label:: /req/job-management/create-unsupported-media-type | ||
|
||
part:: If the server does not support the Content-Type header associated with the request body, the code of the response SHALL be `415 Unsupported Media Type`. | ||
gfenoy marked this conversation as resolved.
Show resolved
Hide resolved
|
||
part:: The content of that response SHALL be based upon the OpenAPI | ||
3.0 schema https://raw.githubusercontent.com/opengeospatial/ogcapi-processes/master/core/openapi/schemas/exception.yaml[exception.yaml]. | ||
part:: The `type` of the exception SHALL be “http://www.opengis.net/def/exceptions/ogcapi-processes-4/1.0/unsupported-media-type”. | ||
==== |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
[[req_job-management_create_unsupported-schema]] | ||
[requirement] | ||
==== | ||
[%metadata] | ||
label:: /req/job-management/create-unsupported-schema | ||
|
||
part:: If the server does not support the Content-Schema header associated with the request body, the code of the response SHALL be `422 Unprocessable Content`. | ||
part:: The content of that response SHALL be based upon the OpenAPI | ||
3.0 schema https://raw.githubusercontent.com/opengeospatial/ogcapi-processes/master/core/openapi/schemas/exception.yaml[exception.yaml]. | ||
part:: The `type` of the exception SHALL be “http://www.opengis.net/def/exceptions/ogcapi-processes-4/1.0/unsupported-schema”. | ||
==== |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The actual concept is called "User-defined process (UDP)", process graph is just one part of it.
The more general link is probably https://api.openeo.org/#section/Processes