I had a number of test failures caused by the change to updateHeat to also update the bug target caches. Many procs are changing bugs and thus are implicitly using SELECT and UPDATE to work with distros, DSPs, products, projects. Creating a DSP on demand also requires read SELECT on sourcepackagepublishinghistory and section. To pass the tests, I need to give bugnotification, checkwatches, queued, and uploading scripts access.
I also saw some very strange storm timing issues that were fixed by adding a call to flush() when we mutate the DSP to create a db instance on demand.
I hesitate to do this without your okay. If we do not do this, I think we need to rethink how bug targets keep that bug heat cache data in sync. We could reuse the old bug-heat script user to update thousands of targets every day, or consider a job.
Hi.
I had a number of test failures caused by the change to updateHeat to also update the bug target caches. Many procs are changing bugs and thus are implicitly using SELECT and UPDATE to work with distros, DSPs, products, projects. Creating a DSP on demand also requires read SELECT on sourcepackagepu blishinghistory and section. To pass the tests, I need to give bugnotification, checkwatches, queued, and uploading scripts access.
I also saw some very strange storm timing issues that were fixed by adding a call to flush() when we mutate the DSP to create a db instance on demand.
I hesitate to do this without your okay. If we do not do this, I think we need to rethink how bug targets keep that bug heat cache data in sync. We could reuse the old bug-heat script user to update thousands of targets every day, or consider a job.
{{{
=== modified file 'database/ schema/ security. cfg' schema/ security. cfg 2010-08-15 11:29:23 +0000 schema/ security. cfg 2010-08-23 21:17:14 +0000 bugwatchactivit y = SELECT, INSERT, UPDATE cvereference = SELECT, INSERT, UPDATE distribution = SELECT distribution = SELECT, UPDATE distributionsou rcepackage = SELECT, INSERT, UPDATE distroseries = SELECT emailaddress = SELECT, INSERT packagebugsuper visor = SELECT personlanguage = SELECT productseries = SELECT questionsubscri ption = SELECT sourcepackagepu blishinghistory = SELECT sourcepackagena me = SELECT sourcepackagere lease = SELECT structuralsubsc ription = SELECT teammembership = SELECT teamparticipati on = SELECT, INSERT signedcodeofcon duct = SELECT distribution = SELECT distribution = SELECT, UPDATE distroseries = SELECT, UPDATE distroarchserie s = SELECT sourcepackagepu blishinghistory = SELECT bugnotification recipient = SELECT, INSERT bugnomination = SELECT messagechunk = SELECT, INSERT questionsubscri ption = SELECT answercontact = SELECT personlanguage = SELECT structuralsubsc ription = SELECT
--- database/
+++ database/
@@ -535,7 +535,8 @@
public.
public.cve = SELECT, INSERT, UPDATE
public.
-public.
+public.
+public.
public.
public.
public.job = SELECT, INSERT, UPDATE
@@ -548,13 +549,16 @@
public.
public.person = SELECT, INSERT, UPDATE
public.
-public.product = SELECT
+public.product = SELECT, UPDATE
public.
-public.project = SELECT
+public.project = SELECT, UPDATE
public.questionbug = SELECT
public.question = SELECT
public.
+public.section = SELECT
+public.
public.
+public.
public.
public.
public.
@@ -1083,7 +1087,7 @@
# to insert it.
public.gpgkey = SELECT, INSERT
public.
-public.
+public.
public.
public.
public.
@@ -1140,8 +1144,8 @@
public.
public.
public.bugtask = SELECT, UPDATE
-public.product = SELECT
-public.project = SELECT
+public.product = SELECT, UPDATE
+public.project = SELECT, UPDATE
public.bugmessage = SELECT, INSERT
public.message = SELECT, INSERT
public.
@@ -1163,6 +1167,7 @@
public.
public.
public.
+public.section = SELECT
public.
# Diffing against ancestry and maintenance tasks. archivepermissi on = SELECT distribution = SELECT distribution = SELECT, UPDATE distroseries = SELECT distroarchserie s = SELECT bugnotification recipient = SELECT, INSERT bugnomination = SELECT messagechunk = SELECT, INSERT questionsubscri ption = SELECT answercontact = SELECT personlanguage = SELECT structuralsubsc ription = SELECT packagesetgroup = SELECT distribution = SELECT, UPDATE packagebugsuper visor = SELECT personlanguage = SELECT productseries = SELECT distribution = SELECT distributionsou rcepackage = SELECT, INSERT, UPDATE distroseries = SELECT sourcepackagena me = SELECT sourcepackagere lease = SELECT sourcepackagepu blishinghistory = SELECT
@@ -1190,7 +1195,7 @@
public.archive = SELECT, UPDATE
public.archivearch = SELECT, UPDATE
public.
-public.
+public.
public.
public.
public.processor = SELECT
@@ -1241,8 +1246,8 @@
public.
public.
public.bugtask = SELECT, UPDATE
-public.product = SELECT
-public.project = SELECT
+public.product = SELECT, UPDATE
+public.project = SELECT, UPDATE
public.bugmessage = SELECT, INSERT
public.message = SELECT, INSERT
public.
@@ -1264,6 +1269,7 @@
public.
public.
public.
+public.section = SELECT
public.
public.packageset = SELECT
public.
@@ -1312,13 +1318,14 @@
public.bugtag = SELECT
public.bugtask = SELECT, INSERT, UPDATE
public.bugwatch = SELECT
+public.
public.job = SELECT, INSERT, UPDATE
public.component = SELECT
public.
public.person = SELECT
public.
-public.product = SELECT
-public.project = SELECT
+public.product = SELECT, UPDATE
+public.project = SELECT, UPDATE
public.
public.question = SELECT
public.questionbug = SELECT
@@ -1326,6 +1333,7 @@
public.
public.
public.
+public.section = SELECT
public.
public.
public.
=== modified file 'lib/lp/ bugs/doc/ bug-heat. txt' bugs/doc/ bug-heat. txt 2010-06-22 16:08:05 +0000 bugs/doc/ bug-heat. txt 2010-08-23 19:09:33 +0000
--- lib/lp/
+++ lib/lp/
@@ -287,8 +287,6 @@
>>> product = factory. makeProduct( ) makeBug( product= product) max_bug_ heat max_bug_ heat
>>> bug = factory.
- >>> print product.
- None
>>> bug.setHeat(123)
>>> print product.
123
=== modified file 'lib/lp/ registry/ model/distribut ionsourcepackag e.py' registry/ model/distribut ionsourcepackag e.py 2010-08-22 19:10:39 +0000 registry/ model/distribut ionsourcepackag e.py 2010-08-23 17:49:13 +0000
dsp.sourcepac kagename = sourcepackagename
dsp.is_ upstream_ link_allowed = is_upstream_ link_allowed
Store. of(distribution ).add(dsp) distribution) .flush( )
--- lib/lp/
+++ lib/lp/
@@ -566,6 +566,7 @@
+ Store.of(
return dsp
@classmethod
}}}