-
Notifications
You must be signed in to change notification settings - Fork 125
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
SNOW-614539: incorrect error messages in writeOCSPCacheFile in ocsp.go #589
Comments
Hmm, has the automation run amok here? I don't see a change in the most recent version, where the Line 820 in 435e805
Thanks |
hi, thank you for submitting this issue with us ! indeed the automation went a little bit amok last summer, but it has been rectified and this issue reopened. |
fix is merged and will be part of April's release, expected to come towards the end of the month |
fix released with 1.6.20 |
gosnowflake/ocsp.go
Line 820 in 4f0bbba
Hello, there's some inconsistent error messages in
writeOCSPCacheFile()
:The first two might be more about showing the high-level intentions of the code rather than the lower-level indicator of what exactly failed, but in my experience, trying to give higher-level descriptions of failures is more confusing than helpful:
The first
logger.Debugf()
reports a failure to write the cache file, but what actually failed was astat(2)
on the lock file. The wrong filename is given in the error message.The second
logger.Debugf()
reports the name of the cache file, not the lock file, despite the operation being on the lock file. The wrong filename is given in the error message.The fourth
logger.Debugf()
reports the wrong operation.I'm not accustomed to seeing lock directories used; especially since all the log messages here are discussing lock files. There's two very similar variables in play here,
cacheFileName
andcacheLockFileName
and I'm worried that some of these operations may be using the wrong one.Also left unhandled is if the original
os.Mkdir(cacheLockFileName, 0600)
fails for other reasons: permission denied, operation not permitted, I/O error, too many open files, etc.Thanks
The text was updated successfully, but these errors were encountered: