Repository navigation
Conversation
7c04305 to
4255ba2
Compare
|
Thank you @Wwwsylvia for excellent comments and suggestions. |
|
Spent some time testing out the integration of the new ORAS v2 library. Below are the results
The migration looks good, but there does need to be additional work into the one validation failure scenario as described above in addition to the now conflicting |
|
@sabre1041 how would you like to handle the plain HTTP issue? With a |
|
@zregvart Personally, I would like to have feature parity with |
|
@sabre1041 added support |
|
@zregvart This looks good. Can you resolve the conflict and we should be in good shape |
a3cd03e to
1ee13f3
Compare
|
Hi @zregvart @sabre1041, FYI, oras-go |
@zregvart if you want to update, I can retest again |
| } | ||
| for _, option := range options { | ||
| option(client) | ||
| if client.err != nil { |
There was a problem hiding this comment.
I don't love this. Maybe you can do the validation of options after all the callbacks are processed. This appears to only be used for the deprecated resolver option.
| LoginOption func(*loginOperation) | ||
|
|
||
| loginOperation struct { | ||
| username string |
There was a problem hiding this comment.
I think you'd be better off keeping all these values in loginOperation as a context and doing all the validation after all the callbacks have been processed. This would avoid the error in member and the panic calls.
I don't like this options/operations pattern in general, but that is another matter.
| credentialsStore credentials.Store | ||
| httpClient *http.Client | ||
| plainHTTP bool | ||
| err error // pass any errors from the ClientOption functions |
There was a problem hiding this comment.
| err error // pass any errors from the ClientOption functions | |
| resolverSet bool |
|
Thanks @TerryHowe for the review, I think I incorporated the suggestions you made, can you have another look? |
14dcee5 to
ff83b10
Compare
Actually, I can see the tests fail with these changes. I don't have the time or the energy to go troubleshoot this so I'll leave this up to the community. |
|
Kindly ping for merging this PR. We NEED this. |
TerryHowe
left a comment
There was a problem hiding this comment.
it looks like there are some other test failures around credential deletion/logout.
|
|
||
| manifest, err := oras.Copy(ctx, repository, parsedRef.String(), memoryStore, "", oras.CopyOptions{ | ||
| CopyGraphOptions: oras.CopyGraphOptions{ | ||
| PreCopy: func(ctx context.Context, desc ocispec.Descriptor) error { |
There was a problem hiding this comment.
| PreCopy: func(ctx context.Context, desc ocispec.Descriptor) error { | |
| PreCopy: func(_ context.Context, desc ocispec.Descriptor) error { |
|
Found some time today to look at this. I found a race condition around concurrent slice append here, and went back to the idea of keeping the error within the |
|
Hi. Any update here? |
Updates from `oras.land/oras-go` to `oras.land/oras-go/v2`. The main user facing change is that the `--plain-http` parameter is now required even when accessing OCI registries running on `localhost`. I'm new to this codebase and some tests needed to be adjusted to match the new dependency, please look over the test changes to see if there are any issues with those. Fixes helm#11821 Signed-off-by: Zoran Regvart <[email protected]>
This restores the `ClientOptResolver` function which now panics on invocation and previous signature of the `LoginOption` function. Signed-off-by: Zoran Regvart <[email protected]>
|
Just realizing: #13382 |
What this PR does / why we need it:
Updates from
oras.land/oras-gotooras.land/oras-go/v2. The main user facing change is that the--plain-httpparameter is now required even when accessing OCI registries running onlocalhost.Fixes #11821
Special notes for your reviewer:
I'm new to this codebase and some tests needed to be adjusted to match the new dependency, please look over the test changes to see if there are any issues with those.
If applicable: