ga4gh / ga4gh/task-execution-schemas

Allow `202` Accepted response on cancel task

Open
#166 1 comment 0 reactions 0 assignees View on GitHub
Due: Sep
Dominant language
No language data
Stars
95
Forks
32
PR merge metrics
No merged PRs in 30d

Description

The cancellation of a task might not be synchronous, in some implementations it might be a multi-step operation or a notification sent to a event bus or pub sub queue, and for fast running tasks it may not be processed before the task is complete.

From the RFC

>10.2.3 202 Accepted
>
>The request has been accepted for processing, but the processing has not been completed. The request might or might not eventually be acted upon, as it might be disallowed when processing actually takes place. There is no facility for re-sending a status code from an asynchronous operation such as this.
>
>The 202 response is intentionally non-committal. Its purpose is to allow a server to accept a request for some other process (perhaps a batch-oriented process that is only run once per day) without requiring that the user agent's connection to the server persist until the process is completed. The entity returned with this response SHOULD include an indication of the request's current status and either a pointer to a status monitor or some estimate of when the user can expect the request to be fulfilled.

Given that, a `202` response might be more appropriate.

Contributor guide

Open the contributing guide

Research direction

Start at the task-cancellation API definition and inspect how its current response status is specified. Compare that definition with the RFC guidance quoted in the issue, then identify the related validation or conformance tests if present. Done means the cancellation operation permits a 202 Accepted response without removing existing synchronous behavior.

Written by the indexing model from the issue text.

Assessment

Domain
api
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.