-
Notifications
You must be signed in to change notification settings - Fork 22
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
Introduce caching for GitHub access method and add tests for the downloader #57
Conversation
@Skarlso Thank you for your contribution. |
96e11f7
to
87387a6
Compare
1975d2b
to
1bd8122
Compare
a73cb49
to
74f2934
Compare
&oauth2.Token{AccessToken: token}, | ||
) | ||
httpclient = oauth2.NewClient(context.Background(), ts) | ||
} | ||
if u.Hostname() == "github.com" { |
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 will use an enterprise client with an incorrect URL (it adds api/v3
to the URL) in case of vanity URLs like k8s.io
.
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.
We probably can ignore this for now, but we need a better way of detecting URLs which will require an enterprise client.
b97a87c
to
f003be6
Compare
f003be6
to
6428068
Compare
@yitsushi I can't assign multiple reviewers so pinging you here for exposure. :) |
@mandelsoft You have pull request review open invite, please check |
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 downloader package is no access method, so the place does not seem to be a good choice.
May be we could just put it into the accessio package.
The provided default implementation, is it used somewhere?
Sure, I'll move it.
There is no default implementation. Which implementation do you have in mind? |
edaf7af
to
ee4b955
Compare
ee4b955
to
5ffdc0e
Compare
Please review new changes, thanks!
This PR will wait until #40 is merged. Then we can rebase on it.This PR does some refactoring around the usage of the
Downloader
and adds blob caching to the Github access method.Manual Test
Without creds: