[LNT] r266630 - Be more robust to regression list changes
Chris Matthews via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 18 10:03:51 PDT 2016
Author: cmatthews
Date: Mon Apr 18 12:03:51 2016
New Revision: 266630
URL: http://llvm.org/viewvc/llvm-project?rev=266630&view=rev
Log:
Be more robust to regression list changes
Sometimes other subprocesses will delete stuff from the regression list.
That is okay, but we should not fail with using the list in other places.
For now, lets just regenerate the list if something was deleted from it.
Modified:
lnt/trunk/lnt/server/db/fieldchange.py
Modified: lnt/trunk/lnt/server/db/fieldchange.py
URL: http://llvm.org/viewvc/llvm-project/lnt/trunk/lnt/server/db/fieldchange.py?rev=266630&r1=266629&r2=266630&view=diff
==============================================================================
--- lnt/trunk/lnt/server/db/fieldchange.py (original)
+++ lnt/trunk/lnt/server/db/fieldchange.py Mon Apr 18 12:03:51 2016
@@ -1,5 +1,6 @@
import re
import sqlalchemy.sql
+from sqlalchemy.orm.exc import ObjectDeletedError
import lnt.server.reporting.analysis
from lnt.testing.util.commands import warning
from lnt.testing.util.commands import note, timed
@@ -122,7 +123,14 @@ def regenerate_fieldchanges_for_run(ts,
field=field)
ts.add(f)
ts.commit()
- found, new_reg = identify_related_changes(ts, regressions, f)
+ try:
+ found, new_reg = identify_related_changes(ts, regressions, f)
+ except ObjectDeletedError:
+ # This can happen from time to time.
+ # So, lets retry once.
+ regressions = ts.query(ts.Regression).all()[::-1]
+ found, new_reg = identify_related_changes(ts, regressions, f)
+
if found:
regressions.append(new_reg)
note("Found field change: {}".format(run.machine))
More information about the llvm-commits
mailing list