ukaea / piezo

1 stars 0 forks source link

Make Spark job names unique #51

Closed robert-clegg-tessella closed 5 years ago

robert-clegg-tessella commented 5 years ago

Submitting a job request to the web app more than once with the same name input causes all but the first request to be rejected (409 error: conflict). This happens even if the first job has finished, and can only be resolved by deleting the first job.

A solution is to append a unique identifier tag to each spark job before passing it onto the Spark Operator.

Notes

Acceptance criteria

When submitting a job, the response notifies the user of the new job name: this will be the submitted job name, plus a unique identifier tag.

Subsequent requests to get the logs of, get the status of, or to delete this job must use the unique job name (using the original job name should result in a 404 Not Found response).

Multiple submissions of the same job name should result in a 200 Ok response, and a different unique job name each time.

Submitting a job name that is very long (>200 characters) should result in a 400 Bad Request response, with a message explaining why.

Test Scenarios