-
Notifications
You must be signed in to change notification settings - Fork 3
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
refactor: upgrade cache logic to vendir 0.38.0 #147
Conversation
…lify our own cache logic and make it more granular to operate on vendir.yaml directory level
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## dev #147 +/- ##
==========================================
+ Coverage 54.33% 54.58% +0.24%
==========================================
Files 23 23
Lines 2341 2325 -16
==========================================
- Hits 1272 1269 -3
+ Misses 874 862 -12
+ Partials 195 194 -1 ☔ View full report in Codecov by Sentry. |
internal/myks/util.go
Outdated
@@ -321,6 +321,15 @@ func isExist(path string) (bool, error) { | |||
return false, err | |||
} | |||
|
|||
func isExistsSloppy(path string) bool { |
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.
I'm puzzled by the purpose of this function. I have two points to that:
- If you don't want to do error handling in the client code, you can use the following:
exists, _ := isExists(path)
- However, I'd suggest against that.
ErrNotExist
is not the only possible error; in case of other errors, you probably want to be aware of them. (Example)
With the improved handling of lock files in vendir 0.38.0 we can simplify our own cache logic and make it more granular to operate on vendir.yaml directory level