Bug 39771: Make `data` attribute nullable for jobs

This patch makes the `data` attribute nullable. This happens when
`$job->finish()` is called with no parameters.

To test:
1. Apply the regression tests patch
2. Run:
   $ ktd --shell
  k$ prove t/db_dependent/api/v1/jobs.t
=> FAIL: Tests don't pass, a 500 is returned when `finish()` was called
with no data
3. Apply this patch
4. Rebuild the API spec:
  k$ yarn api:bundle
5. Repeat 2
=> SUCCESS: Tests pass! The API doesn't explode
6. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Tadeusz „tadzik” Sośnierz <tadeusz@sosnierz.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This commit is contained in:
Tomas Cohen Arazi 2025-04-29 07:52:41 -03:00 committed by Katrin Fischer
parent 01e3a6f600
commit b0f21ad50a
No known key found for this signature in database
GPG Key ID: 0EF6E2C03357A834
1 changed files with 3 additions and 1 deletions

View File

@ -31,7 +31,9 @@ properties:
type: string
data:
description: job data
type: object
type:
- object
- "null"
context:
description: job context
type: object