-
Notifications
You must be signed in to change notification settings - Fork 5
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 RC1 Support #12
Add RC1 Support #12
Conversation
@aviral26 thanks for the review! I have addressed your comments:
|
|
||
// ErrorCodeMalformedNextToken is returned when uploading a blob if the | ||
// provided digest does not match the blob contents. | ||
ErrorCodeMalformedNextToken = errcode.Register(errGroup, errcode.ErrorDescriptor{ |
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.
I've been giving this some thought myself, but we may want to introduce some way to register errors from the extension API itself.
enumerateExtension.Endpoints = append(enumerateExtension.Endpoints, path) | ||
} | ||
|
||
enumeratedExtensions = append(enumeratedExtensions, enumerateExtension) | ||
// add extension to list if endpoints exist | ||
if len(enumerateExtension.Endpoints) > 0 { |
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.
Just looking for some context on the changes to this file.
- Previously, both repository and registry routes were returned but now it seems to be one of the two?
- Why are extensions added only if endpoints exist - when would that not be the case?
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.
- Yes that's correct. So previously, both routes were returned but the subset of routes we want to return depends on if the discover request is at the registry or repository level. The distinction is now being made at the
EnumerateRegistered
level. If the Repository field in the context is nil, then we know that we are operating at the registry level and only want to return registry level routes for that extension namespace. - It's possible that for an extension namespace, that there doesn't exist any routes at the scoped registry or repository level. In that case, we wouldn't want to add the
enumerateExtension
object to the list since no endpoints were added. The referrers extension would be an example: referrers only operates at the repository level but if we are enumerating at the registry level, then thescopedRoutes
would be empty and we wouldn't want to add to theenumeratedExtensions
list.
}) | ||
// append the descriptors, which don't have a created annotation, to the end | ||
referrersSorted = append(referrersSorted, referrersUnsorted...) | ||
return referrersSorted, nil |
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.
This now may also contain a whole lot of annotations. Do we want to limit the maximum size of the returned response?
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.
I have removed the annotations from the referrers response since the referrers spec sample response does not contain the field. There's also a concern that a large number of annotations can cause response size issues.
Signed-off-by: Akash Singhal <[email protected]>
…over response Signed-off-by: Akash Singhal <[email protected]>
Signed-off-by: Akash Singhal <[email protected]>
Signed-off-by: Akash Singhal <[email protected]>
Signed-off-by: Akash Singhal <[email protected]>
Signed-off-by: Akash Singhal <[email protected]>
Signed-off-by: Akash Singhal <[email protected]>
Signed-off-by: Akash Singhal <[email protected]>
Signed-off-by: Akash Singhal <[email protected]>
Signed-off-by: Akash Singhal <[email protected]>
Signed-off-by: Akash Singhal <[email protected]>
Signed-off-by: Akash Singhal <[email protected]>
Signed-off-by: Akash Singhal <[email protected]>
Follow up PR to add GC and more extensions unit tests will be made to the rc1 branch |
References #4