I encountered an interesting problem when the Travis-CI build ran after I pushed a commit to the TechEmpower FrameworkBenchmarks repo. In
gluon.admin.create_missing_folders, each of two Meinheld workers generated a
File exists: '.../web2py/deposit' error. The relevant code is:
if not os.path.exists(path):
os.mkdir(path)
I've run the tests many times via the VM with no problem, and I immediately re-ran the Travis-CI build and it passed, so I'm assuming this was a (hopefully rare) race condition, with both workers attempting to create the /deposit directory after confirming it does not exist.
Perhaps we should instead wrap os.mkdir in a try/except. Would probably need to do the same thing in
create_missing_app_folders (and maybe in some other places).
Thoughts?
If we push a commit to fix this, I can update the benchmarking setup code to point to the latest commit so we don't run into this problem when they run the real tests.
Anthony