Skip to content
This repository has been archived by the owner on Jul 16, 2021. It is now read-only.

Refresh all the repos #470

Merged
merged 1 commit into from
Jun 22, 2018
Merged

Refresh all the repos #470

merged 1 commit into from
Jun 22, 2018

Conversation

FengyunPan2
Copy link
Contributor

Currently if config file have a bad repo and some right repos,
monocualr-api don't get charts from repos and no error message to
user. We should try all the repos.

log.WithFields(log.Fields{
"repo": repo,
"error": err,
}).Error("Error on refresh charts from repo")
Copy link
Member

Choose a reason for hiding this comment

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

the error message should start with a lowercase: "error on refresh..."

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

@prydonius
Copy link
Member

This is great, thanks @FengyunPan2. Can you update the tests as these are failing because they were expecting the error:

--- FAIL: TestNewRefreshDataError (0.00s)
	assert.go:138: /go/src/github.com/kubernetes-helm/monocular/src/api/data/cache/auto_refresher_test.go:38: given error for Error executing refresh was nil when it shouldn't have been
--- FAIL: TestCachedChartsRefreshErrorPropagation (0.00s)
    --- FAIL: TestCachedChartsRefreshErrorPropagation/invalid_repo_url (0.00s)
    	assert.go:138: /go/src/github.com/kubernetes-helm/monocular/src/api/data/cache/cache_test.go:183: given error for invalid repo url was nil when it shouldn't have been
    --- FAIL: TestCachedChartsRefreshErrorPropagation/inexistant_repo (0.00s)
    	assert.go:138: /go/src/github.com/kubernetes-helm/monocular/src/api/data/cache/cache_test.go:183: given error for inexistant repo was nil when it shouldn't have been
=== RUN   TestCachedChartsRefreshErrorDownloadingPackage

Currently if config file have a bad repo and some right repos,
monocualr-api don't get charts from repos and no error message to
user. We should try all the repos.
@codecov-io
Copy link

Codecov Report

Merging #470 into master will decrease coverage by 0.08%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #470      +/-   ##
==========================================
- Coverage   83.86%   83.77%   -0.09%     
==========================================
  Files          26       26              
  Lines        1549     1553       +4     
==========================================
+ Hits         1299     1301       +2     
- Misses        198      199       +1     
- Partials       52       53       +1
Impacted Files Coverage Δ
src/api/data/cache/cache.go 90.1% <100%> (+0.22%) ⬆️
src/api/data/cache/auto_refresher.go 87.5% <0%> (-12.5%) ⬇️

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 03ac29c...2eada73. Read the comment docs.

Copy link
Member

@prydonius prydonius left a comment

Choose a reason for hiding this comment

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

lgtm!

@prydonius prydonius merged commit d130146 into helm:master Jun 22, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants