The benchmark-results.txt has wrong operating system records for Ubuntu #56314
Labels
No Label
Priority::High
Priority::Low
Priority::Normal
Status::Archived
Status::Confirmed
Status::Duplicate
Status::Needs Information from Developers
Status::Needs Triage
Status::Resolved
Type::Bug
Type::Design
Type::Report
Type::To Do
No Milestone
No project
No Assignees
4 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: infrastructure/blender-open-data#56314
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Case
When using the blender benchmark 1.0beta, saving the benchmark-results.txt with a Ubuntu 18.04.1 machine results in JSON wrong records:
This contradicts with the distribution supplied tuple ('Ubuntu', '18.04', 'bionic').
How To Reproduce
Problem
To find the bug, I compared the system supplied platform.py (/usr/lib/python3.6/platform.py) with the blender supplied (blender-benchmark-1.0beta-linux-glibc219-x86_64/2.80/python/lib/python3.6/platform.py), and indeed the lines determining the ubuntu version are missing.
NOTE: This is also the case for "blender-2.80-d7b5e2fa72c-linux-glibc219-x86_64". So the supplied solution idea should work for the official blender tree.
Solution
A simple replacement of the buggy file with the official Python Software Foundation owned one should work as the lines determining the Ubuntu version are the only differences in the whole file.
Added subscriber: @jbrink
Added subscriber: @mont29
We are using official python files, most likely ours is slightly older, that’s all. Note that we are going to switch to py3.7 (hopefully 3.7.1 if it comes out soon enough), so that should fix it.
Ok. I took a look at the python-dev git and as of commit 8b94b41ab7b12f745dea744e8940631318816935 (2018-05-16), the function platform.linux_distribution() is no longer in the PSF python tree. It has been deprecated since version 3.5 and will be removed in 3.8. But even if you pick a version prior to said commit (say 3.7), the supplied platform.py still has the bug mentioned in the beginning. One way is to use https://pypi.org/project/distro which is mentioned in the discussion on bugs.python.org.
See https:*bugs.python.org/issue28167 or https:*docs.python.org/3/library/platform.html or 8b94b41ab7b12f745dea744e8940631318816935@https://github.com/python/cpython/Lib/platform.py.
Added subscriber: @dr.sybren
The
platform.linux_distribution()
function works fine on my Ubuntu 17.10 install. However, it's clearly deprecated and distro can be stripped down to just one file (distro.py
) that we can bundle easily. Thanks for doing the digging and making fixing this easy!This issue was referenced by infrastructure/blender-benchmark-bundle@84faded0cc
Changed status from 'Open' to: 'Resolved'