8000 Fix response schema for delete batch/v1/jobs · kubernetes/kubernetes@09ae333 · GitHub
[go: up one dir, main page]

Skip to content

Commit 09ae333

Browse files
committed
Fix response schema for delete batch/v1/jobs
DELETE batch/v1/jobs actually returns a Job resource, not the generic Status object. We can use ReturnDeletedObject: true in the storage configuration to fix this. Without this fix clients that are generated will be incorrectly unmarshalling the json and, at least for the Java client, throw an exception.
1 parent 2ff70c7 commit 09ae333

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

pkg/registry/batch/job/storage/storage.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ func NewREST(optsGetter generic.RESTOptionsGetter) (*REST, *StatusREST, error) {
6868
UpdateStrategy: job.Strategy,
6969
DeleteStrategy: job.Strategy,
7070
ResetFieldsStrategy: job.Strategy,
71+
ReturnDeletedObject: true,
7172

7273
TableConvertor: printerstorage.TableConvertor{TableGenerator: printers.NewTableGenerator().With(printersinternal.AddHandlers)},
7374
}

0 commit comments

Comments
 (0)
0