Skip to content
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

fix(sync): fixed harbor authentication issues on _catalog endpoint #2891

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

eusebiu-constantin-petu-dbk
Copy link
Collaborator

What type of PR is this?

Which issue does this PR fix:

What does this PR do / Why do we need it:

If an issue # is not available please add repro steps and logs showing the issue:

Testing done on this change:

Automation added to e2e:

Will this break upgrades or downgrades?

Does this PR introduce any user-facing change?:


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Copy link

codecov bot commented Jan 18, 2025

Codecov Report

Attention: Patch coverage is 85.71429% with 4 lines in your changes missing coverage. Please review.

Project coverage is 91.88%. Comparing base (b843799) to head (02cce1e).

Files with missing lines Patch % Lines
pkg/extensions/sync/httpclient/client.go 85.71% 3 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2891      +/-   ##
==========================================
- Coverage   91.90%   91.88%   -0.03%     
==========================================
  Files         170      170              
  Lines       30291    30300       +9     
==========================================
+ Hits        27839    27841       +2     
- Misses       1825     1830       +5     
- Partials      627      629       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@@ -174,4 +174,5 @@ var (
ErrInvalidSearchQuery = errors.New("invalid search query")
ErrImageNotFound = errors.New("image not found")
ErrAmbiguousInput = errors.New("input is not specific enough")
ErrUnexpectedAuthHeader = errors.New("expected bearer auth header, received basic")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The string does not match the variable name exactly. How about having a more generic string here, and wrapping the error adding the specifics of 'bearer'/basic' in the code where it is used?

@vooon
Copy link

vooon commented Jan 20, 2025

Tested on Harbor 2.12.2 - works fine, both onDemand true and false.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Cannot sync from an Harbor registry
3 participants