- Sponsor
-
Notifications
You must be signed in to change notification settings - Fork 74
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 support for OCI engine #914
Merged
+7,540
−213
Merged
Changes from 1 commit
Commits
Show all changes
45 commits
Select commit
Hold shift + click to select a range
ebc1c00
revert "temp: remove docker image processor"
ezekg 3b80495
add tests for docker image worker
ezekg 573e1db
add enumeratorio to improve memory efficiency
ezekg 9de0639
refactor npm worker to use enumeratorio
ezekg 1d8014d
update naming
ezekg afcbf80
fix typo
ezekg 49cabe8
update image processor to use index.json
ezekg 7548ded
adjust tarball min/max sizes
ezekg 91207ec
s/docker/oci/
ezekg 82c343b
add regex support to upload matcher
ezekg 19c6359
add base for oci routes
ezekg 8775471
refactor oci image processing to store media types
ezekg c1051ab
remove unsupported chunked writes
ezekg da5fa6b
add support for multiple manifests per artifact
ezekg 144c0d6
add unique index on manifest content path
ezekg c4cfaa5
s/fixme/todo/
ezekg 803b4e7
add tests for oci spec conformance
ezekg 8094f2d
fix manifest and descriptor authz
ezekg 1053303
refactor manifest and descriptor authz into policies
ezekg 3094047
add tests for oci manifest api
ezekg 56ec1e7
s/docker/oci spec/
ezekg 6242f5a
add note on octal encoding
ezekg 3a349f6
remove json minification
ezekg 519ea2f
fix format
ezekg a470198
fix typo
ezekg a9ca675
remove superfluous requires
ezekg 1c6fd30
fix max size mismatch between factory and worker
ezekg 2f00098
rename filename to path
ezekg e8763e1
fix indexes
ezekg 1ed1470
add tests for blobs
ezekg b36d6cb
fix content type indexes
ezekg d964f9a
add tests for vanity urls
ezekg af06760
temp: update max tarball size
ezekg 6e3ae9f
s/delete/yank/
ezekg eff5e84
add schema version to index
ezekg 645c59b
refactor digestio into lib
ezekg 6dc74cf
update oci engine to be ee-only
ezekg 92bc4c7
refactor content-type/accept logic
ezekg c9ca307
refactor jsonapi/json content-type logic
ezekg 89ec8bd
fix casing for as keyword
ezekg 3747574
refactor and fix oci image layout parsing
ezekg 51ae037
remove superfluous config/layer methods
ezekg 88314e2
add oci tags endpoint
ezekg 6cb97e2
add artifact/release assert to descriptors
ezekg 91adef1
fix descriptor download keyword
ezekg File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
add enumeratorio to improve memory efficiency
commit 573e1dbcb5d09f0f3c3c00842e1d86f1c061c489
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# frozen_string_literal: true | ||
|
||
require_dependency Rails.root / 'lib' / 'enumerator_io' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# frozen_string_literal: true | ||
|
||
class EnumeratorIO | ||
def initialize(enum) | ||
@enum = enum | ||
@buffer = ''.b | ||
@eof = false | ||
end | ||
|
||
def eof? = @eof && @buffer.empty? | ||
def read(length = nil, buffer = nil) | ||
buffer ||= +'' | ||
buffer.clear | ||
|
||
# fill the buffer until it has enough data or EOF | ||
while !@eof && (length.nil? || @buffer.bytesize < length) | ||
begin | ||
@buffer << @enum.next | ||
rescue StopIteration | ||
@eof = true | ||
|
||
break | ||
end | ||
end | ||
|
||
# extract the requested amount of data from the buffer | ||
if length | ||
buffer << @buffer.slice!(0, length) | ||
else | ||
buffer << @buffer | ||
|
||
@buffer.clear | ||
end | ||
|
||
buffer.empty? ? nil : buffer | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
buffer.presence
should suffice?