-
Notifications
You must be signed in to change notification settings - Fork 99
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: add a host-based auth cache as a fallback #651
Conversation
This PR obviously still needs
|
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #651 +/- ##
==========================================
+ Coverage 75.41% 75.46% +0.04%
==========================================
Files 59 59
Lines 5606 5640 +34
==========================================
+ Hits 4228 4256 +28
- Misses 1015 1019 +4
- Partials 363 365 +2 ☔ View full report in Codecov by Sentry. |
6d09a8f
to
7e865b8
Compare
I also added unit tests for the hostCache and exported |
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.
LGTM and thanks for the update.
@ktarplee LoL. The DCO check failed. Could you fix that? |
The cache is implemented as a fallback cache with a host-based as the fallback. Signed-off-by: Kyle M. Tarplee <[email protected]>
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.
LGTM
This PR adds a new exported method called
NewRobustCache()
and changes theDefaultCache
to use the robust cache. The robust cache uses scoped based auth but falls back to host based auth to better handle the situations described in #650 but retain the benefits of scoped based auth (where the token for a repo might be different than another repo in the same registry).Closes #650