2009-01-07 06:41:25 |
Stuart Bishop |
bug |
|
|
added bug |
2009-01-07 06:41:41 |
Stuart Bishop |
launchpad-bazaar: status |
New |
Triaged |
|
2009-01-07 06:41:41 |
Stuart Bishop |
launchpad-bazaar: statusexplanation |
|
|
|
2009-02-05 05:02:15 |
Jonathan Lange |
launchpad-bazaar: status |
Triaged |
Incomplete |
|
2009-02-05 05:02:15 |
Jonathan Lange |
launchpad-bazaar: assignee |
|
mwhudson |
|
2009-02-05 05:02:15 |
Jonathan Lange |
launchpad-bazaar: statusexplanation |
|
All good questions! Michael, what do you think?
P.S. Not sure why this bug is "Triaged". |
|
2009-02-05 05:55:52 |
Michael Hudson-Doyle |
launchpad-bazaar: status |
Incomplete |
Triaged |
|
2009-02-05 05:55:52 |
Michael Hudson-Doyle |
launchpad-bazaar: statusexplanation |
All good questions! Michael, what do you think?
P.S. Not sure why this bug is "Triaged". |
Yes, we should prune old codeimportresults for sure. But it would be better to prune all but the last $N for each codeimport -- if an import started failing a few weeks ago, I'd want to be able to see the last few results so I could tell why. I don't suppose this would be much harder to arrange. |
|
2009-02-05 06:09:35 |
Jonathan Lange |
launchpad-bazaar: importance |
Undecided |
Low |
|
2009-02-05 06:09:35 |
Jonathan Lange |
launchpad-bazaar: statusexplanation |
Yes, we should prune old codeimportresults for sure. But it would be better to prune all but the last $N for each codeimport -- if an import started failing a few weeks ago, I'd want to be able to see the last few results so I could tell why. I don't suppose this would be much harder to arrange. |
|
|
2009-02-05 06:14:58 |
Jonathan Lange |
launchpad-bazaar: assignee |
mwhudson |
stub |
|
2009-02-05 06:14:58 |
Jonathan Lange |
launchpad-bazaar: statusexplanation |
|
Maybe it would be easiest for you to do it, stub? |
|
2009-02-19 04:59:41 |
Stuart Bishop |
launchpad-bazaar: assignee |
stub |
|
|
2009-02-19 04:59:41 |
Stuart Bishop |
launchpad-bazaar: statusexplanation |
Maybe it would be easiest for you to do it, stub? |
I have no idea where CodeImportResult rows get created and am not familiar with the tests, so I doubt it is easier for me to do.
I think all that requires being done is doing 'codeimport.log_file.expires = now + timedelta(days=60)' after creating the codeimport object.
Or if you really do want to ensure preservation of the 'last N', do the
following after creating a codeimport:
store.execute("""
UPDATE LibraryFileAlias
SET expires = CURRENT_TIMESTAMP AT TIME ZONE 'UTC' + interval '60 days'
FROM CodeImport
WHERE
LibraryFileAlias.id = CodeImport.log_file
AND expires IS NULL
AND CodeImport.branch = %s
AND CodeImport.id NOT IN (
SELECT id
FROM CodeImport
WHERE branch = %s
ORDER BY id DESC
LIMIT %s)
""" % (codeimport.branch, codeimport.branch, N))
Oh - and me doing the equivalent manually for all the historical records.
|
|
2009-02-26 09:53:03 |
Stuart Bishop |
launchpad-bazaar: assignee |
|
stub |
|
2009-02-26 09:53:03 |
Stuart Bishop |
launchpad-bazaar: statusexplanation |
I have no idea where CodeImportResult rows get created and am not familiar with the tests, so I doubt it is easier for me to do.
I think all that requires being done is doing 'codeimport.log_file.expires = now + timedelta(days=60)' after creating the codeimport object.
Or if you really do want to ensure preservation of the 'last N', do the
following after creating a codeimport:
store.execute("""
UPDATE LibraryFileAlias
SET expires = CURRENT_TIMESTAMP AT TIME ZONE 'UTC' + interval '60 days'
FROM CodeImport
WHERE
LibraryFileAlias.id = CodeImport.log_file
AND expires IS NULL
AND CodeImport.branch = %s
AND CodeImport.id NOT IN (
SELECT id
FROM CodeImport
WHERE branch = %s
ORDER BY id DESC
LIMIT %s)
""" % (codeimport.branch, codeimport.branch, N))
Oh - and me doing the equivalent manually for all the historical records.
|
I'll implement good old Oscar the Grouch with a 2009 standard name to delete the old records, as I've got some other tables that need pruning too and we don't need to implement this multiple times.
Please confirm the deletion rules. I'm going with 'all CodeImportResult rows created more than 30 days ago, unless they are one of the four most recent CodeImportResults for a branch' unless someone says otherwise. And this is deletion, so don't come crying once the data is gone ;) |
|
2009-02-26 09:53:03 |
Stuart Bishop |
launchpad-bazaar: milestone |
|
2.2.3 |
|
2009-03-19 15:56:22 |
Stuart Bishop |
launchpad-bazaar: status |
Triaged |
In Progress |
|
2009-03-25 20:04:26 |
Stuart Bishop |
launchpad-bazaar: status |
In Progress |
Fix Committed |
|
2009-04-05 23:23:08 |
Tim Penhey |
launchpad-bazaar: status |
Fix Committed |
Fix Released |
|
2010-04-02 06:25:57 |
Stuart Bishop |
branch unlinked |
lp:~stub/launchpad/garbo |
|
|