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

Fixes dangling files in provision cache #614

Merged
merged 2 commits into from
Mar 24, 2020
Merged

Conversation

DylanVerstraete
Copy link
Contributor

No description provided.

@codecov
Copy link

codecov bot commented Mar 23, 2020

Codecov Report

Merging #614 into master will decrease coverage by 0.06%.
The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #614      +/-   ##
==========================================
- Coverage   35.57%   35.51%   -0.07%     
==========================================
  Files          74       74              
  Lines        5374     5384      +10     
==========================================
  Hits         1912     1912              
- Misses       3189     3198       +9     
- Partials      273      274       +1
Impacted Files Coverage Δ
pkg/provision/local_store.go 26.96% <0%> (-1.39%) ⬇️

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 aeca858...87cc25a. Read the comment docs.

// if a file with size 0 is present we can assume its empty and remove it
if info.Size() == 0 {
err := os.Remove(path)
if err != nil {
Copy link
Contributor

Choose a reason for hiding this comment

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

Seems in both case you do need to return, so you can just do

return os.Remove(path)

@zaibon zaibon merged commit 309157c into master Mar 24, 2020
@zaibon zaibon deleted the fix_provision_cache_issue branch March 24, 2020 07:38
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.

provisiond: is emtpy reservation cached file are found provisiond fails to start
2 participants