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

Add support for multiple search repositories #108

Merged
merged 2 commits into from Oct 25, 2020
Merged

Add support for multiple search repositories #108

merged 2 commits into from Oct 25, 2020

Conversation

tjamet
Copy link
Contributor

@tjamet tjamet commented Oct 14, 2020

Up until now, whalebrew restricts its searches to https://hub.docker.com/u/whalebrew

This commit introduces the ability to customize search organization under docker hub.

To customize it, place a file like

repositories:
- url: https://hub.docker.com
  owner: whalebrew

You can add as many search repositories as desired, all of them will be searched.

Currently, there is no authentication to the search repositories. Only public images will be retrieved.

A step forward for whaleebrew tap discussed in #102

@codecov-io
Copy link

codecov-io commented Oct 14, 2020

Codecov Report

Merging #108 into master will decrease coverage by 2.68%.
The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #108      +/-   ##
==========================================
- Coverage   47.73%   45.04%   -2.69%     
==========================================
  Files          15       15              
  Lines         794      717      -77     
==========================================
- Hits          379      323      -56     
+ Misses        386      365      -21     
  Partials       29       29              
Impacted Files Coverage Δ
cmd/search.go 3.84% <0.00%> (-4.16%) ⬇️
cmd/version.go 25.00% <0.00%> (-15.00%) ⬇️
cmd/uninstall.go 5.00% <0.00%> (-4.53%) ⬇️
cmd/edit.go 4.76% <0.00%> (-4.33%) ⬇️
cmd/list.go 12.50% <0.00%> (-3.29%) ⬇️
packages/manager.go 62.85% <0.00%> (-2.97%) ⬇️
cmd/root.go 87.50% <0.00%> (-2.50%) ⬇️
cmd/run.go 80.82% <0.00%> (-1.54%) ⬇️
packages/package_diff.go 33.47% <0.00%> (-1.38%) ⬇️
... and 6 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1b12326...e5e6a6f. Read the comment docs.

Up until now, whalebrew restricts its searches to https://hub.docker.com/u/whalebrew

This commit introduces the ability to customize search organization
under docker hub.

To customize it, place a file like

```
registries:
- dockerHub:
    owner: whalebrew
```

You can add as many search repositories as desired, all of them will be
searched.

Currently, there is no authentication to the search repositories. Only
public images will be retrieved.

A step forward for whaleebrew tap discussed in #102
@tjamet tjamet merged commit a1c3d31 into master Oct 25, 2020
@tjamet tjamet deleted the tap/multi-repo branch October 25, 2020 15:58
tjamet added a commit that referenced this pull request Oct 26, 2020
Refactor how search is actually working to allow hooking and injecting
several search methods.
The alternative search method is using the registry
[catalog](https://docs.docker.com/registry/spec/api/#catalog) listing
all images in the registry and filtering them according to the searched
term.

Though this method is particularly inefficient with large registries.
We should at some point implement some kind of cache to speed up
consequent searches and avoid over-loading the remote server.
Similarly, to improve performances, we should probably think of a way to
integrate directly with the registries APIs so we can get better
performances.

Finally, this method can not be used on docker hub, that still uses the
dedicated docker hub search method, as the catalog has been
[disabled on docker hub](https://stackoverflow.com/a/37518393)
because it would list all the images available on docker hub

fixes: #108
tjamet added a commit that referenced this pull request Oct 26, 2020
Refactor how search is actually working to allow hooking and injecting
several search methods.
The alternative search method is using the registry
[catalog](https://docs.docker.com/registry/spec/api/#catalog) listing
all images in the registry and filtering them according to the searched
term.

Though this method is particularly inefficient with large registries.
We should at some point implement some kind of cache to speed up
consequent searches and avoid over-loading the remote server.
Similarly, to improve performances, we should probably think of a way to
integrate directly with the registries APIs so we can get better
performances.

Finally, this method can not be used on docker hub, that still uses the
dedicated docker hub search method, as the catalog has been
[disabled on docker hub](https://stackoverflow.com/a/37518393)
because it would list all the images available on docker hub

fixes: #108
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.

None yet

2 participants