| Lorenz Brun | 6211e4d | 2023-11-14 19:09:40 +0100 | [diff] [blame] | 1 | From d65088ac138e652772c73ce2b19be03b1966c42a Mon Sep 17 00:00:00 2001 |
| 2 | From: Lorenz Brun <lorenz@monogon.tech> |
| 3 | Date: Tue, 28 Nov 2023 18:05:11 +0100 |
| 4 | Subject: [PATCH] Use Unimplemented implementation for gRPC forward compat |
| 5 | |
| 6 | Otherwise any newly-added methods will cause build failures. |
| 7 | --- |
| 8 | pkg/cri/instrument/instrumented_service.go | 2 ++ |
| 9 | pkg/cri/sbserver/service.go | 2 ++ |
| 10 | pkg/cri/server/service.go | 2 ++ |
| 11 | 3 files changed, 6 insertions(+) |
| 12 | |
| 13 | diff --git a/pkg/cri/instrument/instrumented_service.go b/pkg/cri/instrument/instrumented_service.go |
| 14 | index 2f388d56d..ce290559c 100644 |
| 15 | --- a/pkg/cri/instrument/instrumented_service.go |
| 16 | +++ b/pkg/cri/instrument/instrumented_service.go |
| 17 | @@ -61,6 +61,8 @@ type GRPCAlphaServices interface { |
| 18 | // instrumentedService wraps service with containerd namespace and logs. |
| 19 | type instrumentedService struct { |
| 20 | c criService |
| 21 | + runtime.UnimplementedRuntimeServiceServer |
| 22 | + runtime.UnimplementedImageServiceServer |
| 23 | } |
| 24 | |
| 25 | func NewService(c criService) GRPCServices { |
| 26 | diff --git a/pkg/cri/sbserver/service.go b/pkg/cri/sbserver/service.go |
| 27 | index 9348c6081..9b636aaf8 100644 |
| 28 | --- a/pkg/cri/sbserver/service.go |
| 29 | +++ b/pkg/cri/sbserver/service.go |
| 30 | @@ -72,6 +72,8 @@ type CRIService interface { |
| 31 | |
| 32 | // criService implements CRIService. |
| 33 | type criService struct { |
| 34 | + runtime.UnimplementedRuntimeServiceServer |
| 35 | + runtime.UnimplementedImageServiceServer |
| 36 | // config contains all configurations. |
| 37 | config criconfig.Config |
| 38 | // imageFSPath is the path to image filesystem. |
| 39 | diff --git a/pkg/cri/server/service.go b/pkg/cri/server/service.go |
| 40 | index 5d946f4a2..b56509534 100644 |
| 41 | --- a/pkg/cri/server/service.go |
| 42 | +++ b/pkg/cri/server/service.go |
| 43 | @@ -70,6 +70,8 @@ type CRIService interface { |
| 44 | |
| 45 | // criService implements CRIService. |
| 46 | type criService struct { |
| 47 | + runtime.UnimplementedRuntimeServiceServer |
| 48 | + runtime.UnimplementedImageServiceServer |
| 49 | // config contains all configurations. |
| 50 | config criconfig.Config |
| 51 | // imageFSPath is the path to image filesystem. |
| 52 | -- |
| 53 | 2.42.0 |
| 54 | |