Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 15 Next »

Background

Some submission are runnable. When a user submits a runnable submission to a queue, the queue's Submission Application would check and start the runnable process. This process could take a long time. We want to provide users the ability to stop their running process at anytime that it is running.

PLFM-4091 - Getting issue details... STATUS

Current Work Flow

When a user A submits a submission B to queue C, an Submission (immutable object) and SubmissionStatus (mutable object) are created.

Queue C's Application starts the running process for submission B and update submission B's Submission Status.

Proposal

Add the following fields to Submission Status:

Submission Status
currentFields
canCancel : Boolean (Default FALSE)
cancelRequested : Boolean (Default FALSE)

When the queue's Application starts the running process, it would change canCancel to TRUE.

Add an API that allows user to request to cancel their submissions:

ActionIntended UsersURIMethodRequest ParamsRequest BodyResponse Body
Request to Cancel a SubmissionThe user who submitted the Submission/evaluation/submission/{subId}/cancellationPUTNoneNoneNone

When a user make such request, we will check for:

  • Is the user who making the request submitted the submission?
  • Is canCancel's value for the request submission TRUE?

If both conditions are met, we will set the cancelRequested value to TRUE and return 200. We will throw an appropriate 400 status code for error.

The queue's Application are responsible to check for cancelRequested value and update SubmissionStatus appropriately.

Queryable Annotations

Both canCancel and cancelRequested will be added to the list of Queryable Annotations. We will also add Cancel Control object to this lis.

CancelControl
submissionId : String
canCancel : Boolean
userId : String


Service Layer

Add a new boolean field to submission status called 'cancelRequested'.

When a submission is created the value is false.

Add CANCELED as a submission status in the ss enum.

The field is mapped to a 'public' annotation in the query table.

Anyone with permission to modify the submission status can modify the cancelRequested field as well.

A new service can be called by an authorized user to update this field:

PUT /evaluation/submission/{subId}/cancellation

If the authenticated user is the submitter of the submission indicated by the submission ID and the current state is false then it becomes true.

If the authenticated user is different from the submitter then a 403 Forbidden is returned.  

If the submission ID is invalid a 404 Not Found is returned.


To view and cancel submissions in the Synapse Portal:

Add a leaderboard widget, including an executionStatus column.  The query should use 'where userId==@CURRENT_USER' to show just the submitter's jobs.

Choose the 'stop button' renderer for this column.

The button shows "CANCEL" when the state is false.

When the button is pressed, the cancellation service is called.   The portal should then update the display to show the new state. (Note:  There is an asynchronous job to update the queryable annotations.)




  • No labels