-
Notifications
You must be signed in to change notification settings - Fork 184
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
Feat/oci registry collector #2185
Feat/oci registry collector #2185
Conversation
2bffbec
to
80631d0
Compare
This is still a WIP, but thought I should push what I have so far. A couple more thoughts:
Any feedback or suggestions would be greatly appreciated! cc @ridhoq |
8f87c71
to
3bac6ae
Compare
I've created a basic test suite which is working for the registry collector. It is an attempt to model the Pull Workflow that starts from a call to the catalog endpoint. Below are a couple of points that might be of interest to reviewers:
|
45009e2
to
871dc46
Compare
@robert-cronin is this ready for review? |
Sorry, I've just noticed some TODO statements that need to be resolved. I guess at this stage any comments on the overall approach and whether I'm missing any key elements would be appreciated. I am still learning my way around the source code. |
871dc46
to
0a415eb
Compare
I've now addressed the TODO comments and also tried to add the registry collector to the collect sub although I'm not confident I haven't missed anything there; I think I am still confused about how exactly the CollectSources get picked up by the respective collectors. |
Thanks @robert-cronin! Let me take a look first thing in the morning and I will review your PR. |
@pxp928 no problems, feel free to take your time. Thank you! |
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.
Awesome PR @robert-cronin , cool implementation with the recursive collectors and great testing! I have a couple comments suggesting some changes, but mostly LGTM. Can i also request we split this into the collector implementation and the CLI changes in another PR? Thanks!
0a415eb
to
9272eb5
Compare
9272eb5
to
4f629c2
Compare
I agree, this PR could do with some splitting in two. I've added the CLI-relevant changes to a new PR: #2241. This PR should be merged before that one. Thanks for the review @lumjjb ! back over to you for round 2 👍 |
Really nice! |
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 is great! Just a very minor nit otherwise it looks great! LGTM
I can see how that would be helpful! I'm wondering would it make sense then to have an option on the collector CLI that takes a regex pattern? e.g. |
Thank you @pxp928! |
4f629c2
to
38a060b
Compare
Signed-off-by: robert-cronin <robert.owen.cronin@gmail.com>
38a060b
to
20bdd4f
Compare
Description of the PR
This is my attempt at progressing #1279 cc @ridhoq
I think this feature is still one we want to add long-term
Partial fix for #298, this should be merged first and then #2241 will fix the issue.
A couple of thoughts I've had along the way:
/v2/_catalog
requires authentication for many registries (e.g. ghcr.io, ghr.io to name two)regclient
silently fails on a 401 response from the registry and doesn't seek to reconcile it by attempting login with local creds even when we pass WithDockerCreds in. I'm not sure if that is still the case. Relevant issue: [Question] regctl repo ls with authentication regclient/regclient#748 (comment)mcr.microsoft.com
to return a list of repos (see https://mcr.microsoft.com/v2/_catalog for this list) however the call returns around 2k+ repos with some having upwards of 100+ tags, so unless we implement some kind of concurrency, I think unit testing might be infeasible. Also, it looks like mcr doesn't yet support limits (e.g. https://mcr.microsoft.com/v2/_catalog?n=5).Any guidance on the testing or concurrency would be appreciated!
PR Checklist
-s
flag togit commit
.make generate
has been runmake generate
has been runmake generate
has been runcollectsub
protobuf has been changed,make proto
has been run