[ws-daemon] Improve cache error handling#8366
Conversation
|
@utam0k can you review this change, please? (you added the tests). The current behavior returns an error, but that pollutes the logs. Is this change acceptable? |
|
/werft run 👍 started the job as gitpod-build-aledbf-cache.2 |
Thanks for your PR. I think we can investigate this a little more carefully. This is because this update is performed when the pod is updated, so it's unnatural that these file doesn't exist. I think we can accept this PR as it stands, but I think we need to create an issue to resolve or research this problem. |
|
/hold |
| // TODO(toru): find out why the file does not exists | ||
| if errors.Is(err, fs.ErrNotExist) { |
There was a problem hiding this comment.
Most likely the file doesn't exist anymore because our "dispatch" mechanism takes too long to cancel the context. I.e. the container is already removed before the dispatch mechanism shuts down this mechanism.
There was a problem hiding this comment.
Should we have todos in the code? If we have them we should at least create an issue and reference them in the comment.
There was a problem hiding this comment.
I saw it 👍 , but was asking more generally if we should have todos in the code.
There was a problem hiding this comment.
Thanks for your comment 🙏 It seems quite unnatural to ignore only this error. So I'd like to write something about the reason.
Codecov Report
@@ Coverage Diff @@
## main #8366 +/- ##
==========================================
+ Coverage 12.31% 14.42% +2.10%
==========================================
Files 20 49 +29
Lines 1161 4701 +3540
==========================================
+ Hits 143 678 +535
- Misses 1014 3963 +2949
- Partials 4 60 +56
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
|
/lgtm |
Description
A non-existing file is not an error (in these cases)
Check logging events https://cloudlogging.app.goo.gl/FPPVKf8QeobE9PYq6
Release Notes