BugWatch properties should be reset when the watch's remotebug field is updated.

Bug #618549 reported by era
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Launchpad itself
Triaged
High
Unassigned

Bug Description

Don't know how or whether this is a general problem, but the task linked to the upstream Gnome bug in bug #188422 recently (2010-08-15 03:04:48) changed to "Invalid" even though the only recent change to the upstream bug was to change it from UNCONFIRMED to NEW -- along with some other minor changes; full transcript at https://bugzilla.gnome.org/show_activity.cgi?id=553929

As Bryce discovered, this is because the bug watch's remotebug value was updated but because of the way we deal with remote watches (not updating if they haven't changed remotely), the watch was never updated.

Solution:
The solution is to do the following when BugWatch.remotebug is altered:

 * lastchanged -> None
 * lastchecked -> None
 * remotestatus -> None
 * remoteimportance ->
 * last_error_type -> None
 * next_check -> datetime.now(). (We could maybe set it to None and let the scheduler take care of it, though)

We should also clear the BugWatchActivity entries for the BugWatch, since they're no longer relevant.

era (era)
description: updated
description: updated
Revision history for this message
Graham Binns (gmb) wrote :

This is a bit bizarre. According to the bug watch, the last status pulled for the bug was "RESOLVED DUPLICATE," which it's never had, according to the history presented by Bugzilla. It should update again in 24 hours or so. When it does, we'll see what status is getting imported for it. At the moment, I can't reproduce this locally.

I'll mark this Incomplete as a reminder to check the watch again tomorrow.

Changed in malone:
status: New → Incomplete
Revision history for this message
era (era) wrote :

@Graham Binns: hello, did you remember to check back?

(Sorry for the dupe / de-dupe spam a couple of days ago -- switched tabs in Firefox too quickly.)

Revision history for this message
Graham Binns (gmb) wrote :

I'd forgotton to check; thanks for the reminder.

So, I checked, and it's still showing RESOLVED DUPLICATE as being the most recent status, whilst the remote bug is NEW.

My guess is that we're seeing a "this updated successfully message" but that's actually masking the fact that the remote bug hasn't changed since we last checked it, and for some reason we have a nonsense status in the remotestatus field of the bug watch, but I don't have time to investigate the code paths to diagnose this.

Changed in malone:
importance: Undecided → High
status: Incomplete → Triaged
Revision history for this message
Bryce Harrington (bryce) wrote :

It looks like the bugwatch was originally for bugzilla bug 514361. That upstream bug got marked as a dupe of 553929. Someone then changed the bugwatch in launchpad to point at this second bug. 553929 has not changed at all since then. Could it be that launchpad doesn't recognize that the link itself changed?

Revision history for this message
Bryce Harrington (bryce) wrote :

I'm not certain whether a. the link for 553929 already existed (someone mentioned it in a comment on 8-16) and someone set it as the bugwatch, or b. it did not exist and someone pasted the url in.

In either case, it sort of sounds like when it did this, the lastchanged date was set for the prior bugwatch and since that date was newer than the new bugwatched bug's last update, it didn't update it. Could it be that lastchanged needs to be set to None when the remote bugwatch is changed? (I.e. either in createBugWatch() or addWatch()?)

Revision history for this message
Graham Binns (gmb) wrote :

Bryce, you've nailed the problem. The solution is to do the following when BugWatch.remotebug is altered:

 * lastchanged -> None
 * lastchecked -> None
 * remotestatus -> None
 * remoteimportance ->
 * last_error_type -> None
 * next_check -> datetime.now(). (We could maybe set it to None and let the scheduler take care of it, though)

We should also clear the BugWatchActivity entries for the BugWatch, since they're no longer relevant.

summary: - Upstream Gnome bug mysteriously changed to "Invalid"
+ BugWatch properties should be reset when the watch's remotebug field is
+ updated.
description: updated
Revision history for this message
era (era) wrote :

Is this still a problem? It looks to my uninformed self like it works correctly now.

Revision history for this message
Robert Collins (lifeless) wrote :

Possibly, needs a code check (should be very easy to do) and if its either doing what the bug says, or making a new watch object, then its fixed. Otherwise the simple code needs to be added and a trivial test.

tags: added: trivial
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.