-
Notifications
You must be signed in to change notification settings - Fork 546
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 --blobs-to-disk to 'crane registry serve' #1731
Conversation
Signed-off-by: Jason Hall <jason@chainguard.dev>
m.lock.Lock() | ||
defer m.lock.Unlock() | ||
|
||
fi, err := os.Stat(filepath.Join(m.dir, h.String())) |
Check failure
Code scanning / CodeQL
Uncontrolled data used in path expression
m.lock.Lock() | ||
defer m.lock.Unlock() | ||
|
||
return os.Open(filepath.Join(m.dir, h.String())) |
Check failure
Code scanning / CodeQL
Uncontrolled data used in path expression
m.lock.Lock() | ||
defer m.lock.Unlock() | ||
|
||
f, err := os.Create(filepath.Join(m.dir, h.String())) |
Check failure
Code scanning / CodeQL
Uncontrolled data used in path expression
m.lock.Lock() | ||
defer m.lock.Unlock() | ||
|
||
return os.Remove(filepath.Join(m.dir, h.String())) |
Check failure
Code scanning / CodeQL
Uncontrolled data used in path expression
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.
Can we add test coverage for this?
Signed-off-by: Jason Hall <jason@chainguard.dev>
Signed-off-by: Jason Hall <jason@chainguard.dev>
Signed-off-by: Jason Hall <jason@chainguard.dev>
Codecov Report
@@ Coverage Diff @@
## main #1731 +/- ##
==========================================
- Coverage 72.02% 71.88% -0.14%
==========================================
Files 121 122 +1
Lines 9777 9818 +41
==========================================
+ Hits 7042 7058 +16
- Misses 2060 2080 +20
- Partials 675 680 +5
|
This only writes blobs to disk, and keeps manifests in memory. This is mostly a short-term bandaid to be able to store more/larger images while we work on a storage backend that writes to an OCI layout.
...do some pushes...