Merge lp://staging/~gmb/launchpad/not-nullify-bwa.result-bug-546774 into lp://staging/launchpad/db-devel

Proposed by Graham Binns
Status: Merged
Approved by: Graham Binns
Approved revision: no longer in the source branch.
Merged at revision: not available
Proposed branch: lp://staging/~gmb/launchpad/not-nullify-bwa.result-bug-546774
Merge into: lp://staging/launchpad/db-devel
Diff against target: 185 lines (+51/-14)
7 files modified
database/schema/patch-2207-47-0.sql (+6/-0)
lib/lp/bugs/doc/bug-watch-activity.txt (+9/-5)
lib/lp/bugs/interfaces/bugwatch.py (+14/-0)
lib/lp/bugs/model/bugwatch.py (+6/-1)
lib/lp/bugs/scripts/checkwatches/scheduler.py (+4/-4)
lib/lp/bugs/stories/bugwatches/xx-bugwatch-errors.txt (+8/-2)
lib/lp/bugs/tests/test_bugwatch.py (+4/-2)
To merge this branch: bzr merge lp://staging/~gmb/launchpad/not-nullify-bwa.result-bug-546774
Reviewer Review Type Date Requested Status
Björn Tillenius (community) db Approve
Gavin Panella (community) code Approve
Stuart Bishop (community) db Approve
Review via email: mp+22934@code.staging.launchpad.net

Commit message

Make BugWatchActivity.result NOT NULL and add a default SYNC_SUCCESS BugWatchActivityStatus.

Description of the change

This branch adds a DB patch to make BugWatchActivity.result NOT NULL,
updates all existing BugWatchActivity's with a NULL result to have a
result of BugWatchActivityStatus.SYNC_SUCCESS, which is now our base
success status.

== database/schema/patch-2207-99-0.sql ==

 - This patch updates all existing BugWatchActivity records with a NULL
   result to have a result value of 9, which corresponds with
   BugWatchActivityStatus.SYNC_SUCCESS.
 - The patch also makes BugWatchActivity.result NOT NULL.

== lib/lp/bugs/doc/bug-watch-activity.txt ==

 - I've updated the tests to account for the fact that
   BugWatchActivity.result can't now be None.

== lib/lp/bugs/interfaces/bugwatch.py ==

 - I've added a SYNC_SUCCESS status to BugWatchActivityStatus.
 - I've added a list of BugWatchActivityStatuses considered successful
   which we can use in queries and so on. We plan to expand this later.

== lib/lp/bugs/model/bugwatch.py ==

 - I've updated addActivity() so that it now sets the result of the new
   BugWatchActivity entry to SYNC_SUCCESS if no other value is
   specified.

== lib/lp/bugs/scripts/checkwatches/scheduler.py ==

 - I've updated the scheduler query to query for activity without a
   success status rather than just querying for result is not null.

== lib/lp/bugs/tests/test_bugwatch.py ==

 - I've updated the test to ensure that the scheduler treats success
   results correctly (i.e. by ignoring them when it calculates when next
   to check the watch).

To post a comment you must log in.
Revision history for this message
Stuart Bishop (stub) wrote :

Looks good. Approved as patch-2207-47-0.sql

review: Approve (db)
Revision history for this message
Gavin Panella (allenap) :
review: Approve (code)
Revision history for this message
Björn Tillenius (bjornt) :
review: Approve (db)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches

to status/vote changes: