This is an archive of the discontinued LLVM Phabricator instance.

Prevent page crash when using default comparer on Global Status page
ClosedPublic

Authored by tnfchris on Aug 6 2020, 4:02 AM.

Details

Reviewers
thopre
gkistanova
Summary

When LNT was still Python 2 the default comparer was able to handle None values with <, however Python 3 doesn't support this. As a result after the Python 3 upgrade the Global Status page crashes when sorting any values with None in them in the second column.

I believe this happens when there is no regression detected so this is a valid state.

There are two ways to handle this, either filter out the None values or sort them all the same. I have choosen the second approach since I believe that is what Python 2 did.

Diff Detail

Event Timeline

tnfchris requested review of this revision.Aug 6 2020, 4:02 AM
tnfchris created this revision.
thopre accepted this revision.Aug 6 2020, 4:28 AM

I can reproduce the issue and the patch LGTM. Thanks!

This revision is now accepted and ready to land.Aug 6 2020, 4:28 AM
thopre requested changes to this revision.Aug 6 2020, 4:33 AM

Actually, could you try adding a testcase? There's a test for global_status in tests/server/ui/V4Pages.py

This revision now requires changes to proceed.Aug 6 2020, 4:33 AM

Actually, could you try adding a testcase? There's a test for global_status in tests/server/ui/V4Pages.py

I've created a test for it in D87235. I'll approve this once the test is approved by Chris.

thopre accepted this revision.Oct 3 2020, 12:30 AM

Actually, could you try adding a testcase? There's a test for global_status in tests/server/ui/V4Pages.py

I've created a test for it in D87235. I'll approve this once the test is approved by Chris.

As promised, approved. I'll commit it on your behalf.

This revision is now accepted and ready to land.Oct 3 2020, 12:30 AM