Skip to content

[question] how to deal partial success in prune API? #33957

@allencloud

Description

@allencloud

Hi, All,

I found that in prune API, for partial success docker daemon directly returns 500, while I think we could improve this.

Here is an example:

A user has 10 unused images, and he sends an image prune API request. If docker daemon succeeds in removing 5 unused images, and fails to remove the others, what should docker daemon return for the client request?

Current Docker Daemon's response:

Docker Daemon directly responses with a 500 error, and ignore the 5 images which have already been removed. And the 5 removed images' space size cannot be passed to the client side.

I think the is a partial success case. For the successful part, the corresponding data is still important for user, thus I think we need to make docker daemon will transfer the data to client side? Then what kind of status code is reasonable? 200, 500, 207?

ping @stevvooe @mlaventure

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions