From cdd304ffdbb1ceaa5fd357eb82f21dabb72533d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sybren=20A=2E=20St=C3=BCvel?= Date: Thu, 20 Oct 2022 13:13:03 +0200 Subject: [PATCH] OAPI: add endpoint for a pre-flight job check Add an endpoint that mimicks the job submission endpoint, to see whether the job survives the job compiler script. This can be used to fail early, before actually sending files to the farm. --- pkg/api/flamenco-openapi.yaml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/pkg/api/flamenco-openapi.yaml b/pkg/api/flamenco-openapi.yaml index 856bff70..e717e524 100644 --- a/pkg/api/flamenco-openapi.yaml +++ b/pkg/api/flamenco-openapi.yaml @@ -650,6 +650,36 @@ paths: application/json: schema: { $ref: "#/components/schemas/Error" } + /api/v3/jobs/check: + summary: Check the job for validity, without creating it. + post: + operationId: submitJobCheck + summary: Submit a new job for Flamenco Manager to check. + tags: [jobs] + requestBody: + description: Job to check + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/SubmittedJob" + responses: + "204": + description: Job was succesfully compiled into individual tasks. The job and tasks have NOT been stored in the database, though. + "412": + description: > + The given job type etag does not match the job type etag on the + Manager. This is likely due to the client caching the job type for + too long. + content: + application/json: + schema: { $ref: "#/components/schemas/Error" } + default: + description: Error message + content: + application/json: + schema: { $ref: "#/components/schemas/Error" } + /api/v3/jobs/query: summary: Obtain jobs with filtering and sorting. post: