-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add prune support and fix containerd gc #249
Conversation
This is ready for review now. |
cache/manager.go
Outdated
@@ -69,42 +70,49 @@ func NewManager(opt ManagerOpt) (Manager, error) { | |||
return cm, nil | |||
} | |||
|
|||
// init loads all snapshots from metadata state and tries to load the from the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
load the ...?
cache/manager.go
Outdated
} | ||
|
||
if cr.isDead() { | ||
continue |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no unlock?
cache/refs.go
Outdated
func (cr *cacheRecord) mref() *mutableRef { | ||
ref := &mutableRef{cacheRecord: cr} | ||
cr.refs[ref] = struct{}{} | ||
return ref | ||
} | ||
|
||
// hold ref locak before calling |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
locak -> lock
Signed-off-by: Tonis Tiigi <[email protected]>
Signed-off-by: Tonis Tiigi <[email protected]>
Signed-off-by: Tonis Tiigi <[email protected]>
Signed-off-by: Tonis Tiigi <[email protected]>
Signed-off-by: Tonis Tiigi <[email protected]>
Signed-off-by: Tonis Tiigi <[email protected]>
Signed-off-by: Tonis Tiigi <[email protected]>
Signed-off-by: Tonis Tiigi <[email protected]>
@AkihiroSuda updated |
fixes #25
fixes #159
Contrary to the original plan, I don't think anymore that (at least the current implementation) of leases are a good fit to BuildKit. Problem with leases is that they are hidden from the api and interfaces, hard to use in oci worker and because they only apply on creation they make it impossible for two users to share resources. Eg. one blob can't have 2 leases and I think this can cause broken pulls even on concurrent pulls with ctr.
Instead, I've created wrappers that make the create-delete model work again with the GC backed implementation so callers don't need to know the implementation differences of gc and labels. Managing the labels, instead of removing object also makes it easier to share data between build cache and exported resources.
Missing: