-
Notifications
You must be signed in to change notification settings - Fork 233
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
cachedFeatureCheck()/cachedFeatureRecord() error reporting broken #1891
Comments
The files were created by us… so they are “trusted” in principle; but now that we have past versions having written empty data into the files, I agree that consumers need at least a fallback error text. |
Trust is a hard word I agree. I am fine if there is a fallback message. Btw the error message on WSL from |
There are cases why the code returns empty error string causing big confusion for users, i.e. containers/podman#22439 (comment)
Let's take data only layers as an example:
storage/drivers/overlay/overlay.go
Lines 2035 to 2051 in c051e2a
The first time around there will be no cache so it goes down to call supportsDataOnlyLayers() which will return false on WSL at least, then cachedFeatureRecord() writes an empty file to suggest it does not support this.
On the second run cachedFeatureCheck() will read the empty file and know it does not support this so it uses the empty cached text on line 2044 as error, thus returning an empty error message.
AFAICT this seems to effect more than this one caller. IMO we should never trust the file content as error message.
The text was updated successfully, but these errors were encountered: