Merge lp:~adeuring/launchpad/cronscript-for-hwdb-report-fixes into lp:launchpad
Status: | Merged |
---|---|
Approved by: | Abel Deuring |
Approved revision: | no longer in the source branch. |
Merged at revision: | 13946 |
Proposed branch: | lp:~adeuring/launchpad/cronscript-for-hwdb-report-fixes |
Merge into: | lp:launchpad |
Diff against target: |
341 lines (+174/-26) 3 files modified
cronscripts/reprocess-hwdb-submissions.py (+38/-18) lib/lp/hardwaredb/scripts/hwdbsubmissions.py (+6/-7) lib/lp/hardwaredb/scripts/tests/test_hwdbsubmissions.py (+130/-1) |
To merge this branch: | bzr merge lp:~adeuring/launchpad/cronscript-for-hwdb-report-fixes |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Graham Binns (community) | code | Approve | |
Review via email: mp+75214@code.launchpad.net |
Commit message
[r=gmb][bug=849159] convert scripts/
Description of the change
This branch converts scripts/
We need to reprocess a larger number of reports to the hardware database, coming from checkbox in Lucid, Marvierick and Natty, which could not be processed due to, well... a number of reasons. The core fixes which allow to process these submissions are already merged, but we want to include data from those reports that are marked as bad.
The number of these reports is in the order of 10**5 -- more than should be done in a single script run. The idea of the script simple: Run a query like
SELECT ... FROM HWSubmission WHERE id > (variable number) AND status=(bad) LIMIT whatever;
in a TunableLoop: The first run should begin with the first bad report that could come from Lucid; it tries to process a number of reports and records the ID of the last touched report. In the next run, it continues with higher IDs.
(variable number) above is stored in a file; when the script starts, it reads the value from the file; when it finishes, it writes a new value into the same file.
The test test_run_
@@ -3113,8 +3112,6 @@
- if len(submissions) > 0:
- self.start = submissions[-1].id + 1
return submissions
were nonsense: The method __call__() can terminate before all submissions from a chunk have been processed: When the number of already processed submissions goes beyond self.max_
if self.max_
if self.max_
The new tests look a bit odd: All except one are disabled. I described the reason in bug 849056...
test: ./bin/test hardwaredb -vvt lp.hardwaredb.
I removed a bit of lint from lib/lp/
= Launchpad lint =
Checking for conflicts and issues in changed files.
Linting changed files:
cronscripts/
lib/lp/
lib/lp/
./cronscripts/
27: '_pythonpath' imported but unused
./lib/lp/
26: redefinition of unused 'etree' from line 24
3070: local variable 'error' is assigned to but never used
1696: E261 at least two spaces before inline comment
./lib/lp/
159: Line exceeds 78 characters.
[1]
210 + # Disabled due to bug 849056.
220 + # Disabled due to bug 849056.
220 + # Disabled due to bug 849056.
229 + # Disabled due to bug 849056.
240 + # Disabled due to bug 849056.
255 + # Disabled due to bug 849056.
270 + # Disabled due to bug 849056.
These should be XXXs, or one big XXX should come before all these defs, with a closing marker so we know where the bad tests begin and end.