Closed Bug 748848 Opened 13 years ago Closed 10 years ago

Reimplement TBPL's server-side duplicate starring bug comment detection feature

Categories

(Tree Management Graveyard :: TBPL, enhancement)

enhancement
Not set
normal

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: emorley, Unassigned)

References

Details

(Keywords: sheriffing-untriaged)

Broken out from bug 658436 comment 2: If two people both star within the 2 min TBPL refresh time, or one person loads the summary, wanders off and adds the star on return without spotting someone else has starred, the existing duplicate detection code does not seem to work, causing double comments to be posted the bugzilla. (Phil Ringnalda (:philor) from bug 658436 comment #3) > Fixing that requires that someone look at the existing > code which believes it is already preventing multiple bug comments by > fetching the bug comments and looking for the URL in them before adding a > comment, and figure out whether that's just broken, or is fundamentally not > workable because the API caches too much and doesn't return a comment from a > minute or two before, and either fix the brokenness or rewrite it so that > tbpl tracks what comments it has made rather than counting on BzAPI to tell > it.
Whiteboard: [sheriff-want]
Ok, the current check does: 31 // check to make sure that the bug has not already been commented on 32 $bug_comments = file_get_contents("https://api-dev.bugzilla.mozilla.org/latest/bug/$bugid/comment"); 33 if ($bug_comments !== false) { 34 if (preg_match("/([\d]+\.[\d]+\.[\d]+)\.gz$/", $_POST['comment'], $matches)) { 35 $logid = $matches[1]; 36 if (strpos($bug_comments, $logid) !== false) 37 exit; 38 } 39 } Short version: The regex is wrong & has been pointlessly requesting bug comments that would never match, since bug 658541 landed. We need to match against the new URL, of form: https://tbpl.mozilla.org/php/getParsedLog.php?id=15925204&tree=Mozilla-Inbound Long version: Given the number of comments on some of the top oranges, is requesting all the comments the best idea? bzapi caching may still prevent this from working + we may avoid extra b.m.o load by keeping track of this in TBPL.
Blocks: 658541
Blocks: 799534
No longer blocks: 799534
Depends on: 799603
The broken bug comment fetching is being removed by bug 799603 to reduce bzapi/b.m.o load. When we come to fix this bug, we shouldn't reinstate it, but instead should do the duplicate comment check within TBPL itself, per comment 0 and comment 1.
Summary: Fix TBPL's server-side multiple comment detection feature → Reimplement TBPL's server-side multiple comment detection feature
Summary: Reimplement TBPL's server-side multiple comment detection feature → Reimplement TBPL's server-side duplicate starring bug comment detection feature
Whiteboard: [sheriff-want]
Product: Webtools → Tree Management
Wontfix since TBPL is being replaced by Treeherder.
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → WONTFIX
Product: Tree Management → Tree Management Graveyard
You need to log in before you can comment on or make changes to this bug.