leases: support resource management#3304
Conversation
|
Build succeeded.
|
|
Build succeeded.
|
|
Build succeeded.
|
|
The failed case is here : I think we should check close status before we start to handle call or message |
|
Build succeeded.
|
Codecov Report
@@ Coverage Diff @@
## master #3304 +/- ##
==========================================
+ Coverage 44.6% 44.78% +0.17%
==========================================
Files 112 112
Lines 12180 12299 +119
==========================================
+ Hits 5433 5508 +75
- Misses 5913 5943 +30
- Partials 834 848 +14
Continue to review full report at Codecov.
|
Codecov Report
@@ Coverage Diff @@
## master #3304 +/- ##
==========================================
+ Coverage 44.6% 44.78% +0.17%
==========================================
Files 112 112
Lines 12180 12299 +119
==========================================
+ Hits 5433 5508 +75
- Misses 5913 5943 +30
- Partials 834 848 +14
Continue to review full report at Codecov.
|
|
Build succeeded.
|
There was a problem hiding this comment.
I wonder if this would be a good place to use ErrNotImplemented to distinguish between a bad request and something that could be used in the future to check for compatibility. Just a thought.
There was a problem hiding this comment.
it is reasonable to me. Updated. PTAL
dmcgowan
left a comment
There was a problem hiding this comment.
LGTM
I am ok deferring the error code discussion
Add three methods for lease service so that the client can use it to
manage the resource by lease, not just gc.root label. With the following
methods, it is easy for client to maintain their own cache system.
```
- AddResource(context.Context, Lease, Resource) error
- RemoveResource(context.Context, Lease, Resource) error
- ListResources(context.Context, Lease) ([]Resource, error)
```
And the resource is to be
```golang
type Resource {
ID string
Type string
}
```
For the snapshots, the Type field will be formatted by
snapshots/%{type}, like snapshots/overlayfs.
fix: containerd#3295
Signed-off-by: Wei Fu <[email protected]>
|
Build succeeded.
|
|
ping @tonistiigi , do you want to review this? |
|
@crosbymichael Design LGTM, for buildkit ns support would also need a #3307 follow-up |
|
LGTM |
Add three methods for lease service so that the client can use it to
manage the resource by lease, not just gc.root label. With the following
methods, it is easy for client to maintain their own cache system.
And the resource is to be
For the snapshots, the Type field will be formatted by
snapshots/%{type}, like snapshots/overlayfs.
fix: #3295
Signed-off-by: Wei Fu [email protected]