Merge pull request #38589 from runcom/fix-ImageStatus-comment

Automatic merge from submit-queue

CRI: fix ImageStatus comment

**What this PR does / why we need it**:

GRPC cannot encode `nil` (CRI-O itself panic while trying to encode `nil` for `ImageStatus`). This PR fixes `ImageStatus` comment to say that when the image does not exist the call returns a response having `Image` set to `nil` (instead of saying implementors should return `nil` directly).

/cc @mrunalp @vishh @feiskyer 

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #

**Special notes for your reviewer**:

**Release note**:

```release-note
```

Signed-off-by: Antonio Murdaca <runcom@redhat.com>
This commit is contained in:
Kubernetes Submit Queue 2016-12-12 17:30:11 -08:00 committed by GitHub
commit 22db6c99a7
2 changed files with 6 additions and 3 deletions

View File

@ -3675,7 +3675,8 @@ type ImageServiceClient interface {
// ListImages lists existing images.
ListImages(ctx context.Context, in *ListImagesRequest, opts ...grpc.CallOption) (*ListImagesResponse, error)
// ImageStatus returns the status of the image. If the image is not
// present, returns nil.
// present, returns a response with ImageStatusResponse.Image set to
// nil.
ImageStatus(ctx context.Context, in *ImageStatusRequest, opts ...grpc.CallOption) (*ImageStatusResponse, error)
// PullImage pulls an image with authentication config.
PullImage(ctx context.Context, in *PullImageRequest, opts ...grpc.CallOption) (*PullImageResponse, error)
@ -3735,7 +3736,8 @@ type ImageServiceServer interface {
// ListImages lists existing images.
ListImages(context.Context, *ListImagesRequest) (*ListImagesResponse, error)
// ImageStatus returns the status of the image. If the image is not
// present, returns nil.
// present, returns a response with ImageStatusResponse.Image set to
// nil.
ImageStatus(context.Context, *ImageStatusRequest) (*ImageStatusResponse, error)
// PullImage pulls an image with authentication config.
PullImage(context.Context, *PullImageRequest) (*PullImageResponse, error)

View File

@ -71,7 +71,8 @@ service ImageService {
// ListImages lists existing images.
rpc ListImages(ListImagesRequest) returns (ListImagesResponse) {}
// ImageStatus returns the status of the image. If the image is not
// present, returns nil.
// present, returns a response with ImageStatusResponse.Image set to
// nil.
rpc ImageStatus(ImageStatusRequest) returns (ImageStatusResponse) {}
// PullImage pulls an image with authentication config.
rpc PullImage(PullImageRequest) returns (PullImageResponse) {}