opengeospatial / opengeospatial/ogcapi-processes

Part 4: Allow job start to return 202 instead of 200

Open
#461 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Part 4 (Job Management)
Dominant language
AsciiDoc
Stars
63
Forks
46
Avg merge
2d 1h
Merged PRs (30d)
8

Description

Referring to this requirement:

https://github.com/opengeospatial/ogcapi-processes/blob/02627da57ab4782fdf41d8e8f421dd3c9b422eb6/extensions/job_management/standard/requirements/job-management/start/REQ_response.adoc?plain=1#L6C1-L6C110

When a job is pending execution with status: created, and that POST /jobs/{jobId}/results is requested to trigger its execution, an implementation can still choose this "trigger" to simply consist of placing the job in queue for processing (as if it was directly submitted originally by Prefer: respond-async).

Therefore, even if the execution trigger was acknowledged, it might still not have been performed "yet", due to pending resources acquisition or other prerequisites. For this reason, a server might prefer to highlight this situation using HTTP 202 Accepted rather than "HTTP 200 OK". The HTTP 200 OK can give the wrong impression that resources (i.e.: GET /jobs/{jobId}/results) would now be available, when in fact they are almost certainly not yet ready for a long processing graph/workflow.

See https://github.com/opengeospatial/ogcapi-processes/issues/451#issuecomment-2426624016 for details about the execution modes.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with extensions/job_management/standard/requirements/job-management/start/REQ_response.adoc and read the linked execution-mode discussion in issue 451. Update the requirement so a pending job trigger may return HTTP 202 instead of HTTP 200, and verify that the wording matches the described queued-execution behavior.

Written by the indexing model from the issue text.

Assessment

Domain
api, documentation
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
58/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.