You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
returnfalse, fmt.Errorf("recording overlay data-only layers support status: %w", err2)
}
returnsupportsDataOnly, err
}
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:
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 supportsDataOnlyLayers() is not helpful either, it is just EINVAL so just invalid argument as text without any context. That is certainly not much more helpful then no message.
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: