[telemetry] cmd/stacks: record current predicate in each "claimed by comment

1 view
Skip to first unread message

Alan Donovan (Gerrit)

unread,
9:23 AM (9 hours ago) 9:23 AM
to goph...@pubsubhelper.golang.org, golang-co...@googlegroups.com

Alan Donovan has uploaded the change for review

Commit message

cmd/stacks: record current predicate in each "claimed by comment

The predicate in the issue body evolves over time, losing history.
This change causes each "claimed by" appendage to an existing
issue to record the predicate as it was at that moment.
Change-Id: Ie667f228c3ba257ad167cdefe316050a0427f19b

Change diff

diff --git a/cmd/stacks/stacks.go b/cmd/stacks/stacks.go
index bc70189..37d3524 100644
--- a/cmd/stacks/stacks.go
+++ b/cmd/stacks/stacks.go
@@ -435,7 +435,8 @@
issue.Number, err, block)
continue
}
- issue.predicate = pred
+ issue.predicate = block
+ issue.matches = pred
}
}

@@ -569,7 +570,7 @@
byPredicate := false
if strings.Contains(issue.Body, id) {
// nop
- } else if issue.predicate != nil && issue.predicate(stack) {
+ } else if issue.matches != nil && issue.matches(stack) {
byPredicate = true
} else {
continue
@@ -605,7 +606,16 @@

// Add a comment to the existing issue listing all its new stacks.
// (Save the ID of each stack for the second step.)
+ //
+ // We record the predicate expression at the time of
+ // the match, as the predicate in the issue body will
+ // evolve as users edit it and we need to leave a
+ // record of its history.
comment := new(bytes.Buffer)
+ if issue.predicate != "" {
+ fmt.Fprintf(comment, "\n\nFound new stacks for predicate:\n")
+ fmt.Fprintf(comment, "```\n#!stacks\n%s\n```\n\n", strings.TrimSpace(issue.predicate))
+ }
var newStackIDs []string
for _, stack := range issue.newStacks {
id := stackID(stack)
@@ -638,7 +648,7 @@
continue
}

- log.Printf("added stacks %s to issue #%d", newStackIDs, issue.Number)
+ log.Printf("added stacks %s to issue #%d (%s)", newStackIDs, issue.Number, issue.Title)
}
}

@@ -1156,7 +1166,8 @@
Milestone *Milestone

// Set by readIssues.
- predicate func(string) bool // matching predicate over stack text
+ predicate string // predicate source expression
+ matches func(string) bool // reports whether predicate over stack text

// Set by claimIssues.
newStacks []string // new stacks to add to existing issue (comments and IDs)

Change information

Files:
  • M cmd/stacks/stacks.go
Change size: S
Delta: 1 file changed, 15 insertions(+), 4 deletions(-)
Open in Gerrit

Related details

Attention set is empty
Submit Requirements:
  • requirement is not satisfiedCode-Review
  • requirement satisfiedNo-Unresolved-Comments
  • requirement is not satisfiedReview-Enforcement
  • requirement is not satisfiedTryBots-Pass
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: newchange
Gerrit-Project: telemetry
Gerrit-Branch: master
Gerrit-Change-Id: Ie667f228c3ba257ad167cdefe316050a0427f19b
Gerrit-Change-Number: 730380
Gerrit-PatchSet: 1
Gerrit-Owner: Alan Donovan <adon...@google.com>
Gerrit-Reviewer: Alan Donovan <adon...@google.com>
unsatisfied_requirement
satisfied_requirement
open
diffy

Alan Donovan (Gerrit)

unread,
9:23 AM (9 hours ago) 9:23 AM
to goph...@pubsubhelper.golang.org, Michael Pratt, Madeline Kalil, Go LUCI, golang-co...@googlegroups.com
Attention needed from Michael Pratt

Alan Donovan voted Auto-Submit+1

Auto-Submit+1
Open in Gerrit

Related details

Attention is currently required from:
  • Michael Pratt
Submit Requirements:
  • requirement is not satisfiedCode-Review
  • requirement satisfiedNo-Unresolved-Comments
  • requirement is not satisfiedReview-Enforcement
  • requirement is not satisfiedTryBots-Pass
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: telemetry
Gerrit-Branch: master
Gerrit-Change-Id: Ie667f228c3ba257ad167cdefe316050a0427f19b
Gerrit-Change-Number: 730380
Gerrit-PatchSet: 1
Gerrit-Owner: Alan Donovan <adon...@google.com>
Gerrit-Reviewer: Alan Donovan <adon...@google.com>
Gerrit-Reviewer: Michael Pratt <mpr...@google.com>
Gerrit-CC: Madeline Kalil <mka...@google.com>
Gerrit-Attention: Michael Pratt <mpr...@google.com>
Gerrit-Comment-Date: Tue, 16 Dec 2025 14:23:52 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
unsatisfied_requirement
satisfied_requirement
open
diffy

Alan Donovan (Gerrit)

unread,
9:24 AM (9 hours ago) 9:24 AM
to goph...@pubsubhelper.golang.org, Michael Pratt, Madeline Kalil, Go LUCI, golang-co...@googlegroups.com
Attention needed from Michael Pratt

Alan Donovan added 1 comment

Open in Gerrit

Related details

Attention is currently required from:
  • Michael Pratt
Submit Requirements:
  • requirement is not satisfiedCode-Review
  • requirement satisfiedNo-Unresolved-Comments
  • requirement is not satisfiedReview-Enforcement
  • requirement is not satisfiedTryBots-Pass
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: telemetry
Gerrit-Branch: master
Gerrit-Change-Id: Ie667f228c3ba257ad167cdefe316050a0427f19b
Gerrit-Change-Number: 730380
Gerrit-PatchSet: 1
Gerrit-Owner: Alan Donovan <adon...@google.com>
Gerrit-Reviewer: Alan Donovan <adon...@google.com>
Gerrit-Reviewer: Michael Pratt <mpr...@google.com>
Gerrit-CC: Madeline Kalil <mka...@google.com>
Gerrit-Attention: Michael Pratt <mpr...@google.com>
Gerrit-Comment-Date: Tue, 16 Dec 2025 14:24:28 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
unsatisfied_requirement
satisfied_requirement
open
diffy

Alan Donovan (Gerrit)

unread,
9:25 AM (9 hours ago) 9:25 AM
to goph...@pubsubhelper.golang.org, golang-co...@googlegroups.com
Attention needed from Alan Donovan and Michael Pratt

Alan Donovan uploaded new patchset

Alan Donovan uploaded patch set #2 to this change.
Open in Gerrit

Related details

Attention is currently required from:
  • Alan Donovan
  • Michael Pratt
Submit Requirements:
  • requirement is not satisfiedCode-Review
  • requirement satisfiedNo-Unresolved-Comments
  • requirement is not satisfiedReview-Enforcement
  • requirement is not satisfiedTryBots-Pass
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: newpatchset
Gerrit-Project: telemetry
Gerrit-Branch: master
Gerrit-Change-Id: Ie667f228c3ba257ad167cdefe316050a0427f19b
Gerrit-Change-Number: 730380
Gerrit-PatchSet: 2
Gerrit-Owner: Alan Donovan <adon...@google.com>
Gerrit-Reviewer: Alan Donovan <adon...@google.com>
Gerrit-Reviewer: Michael Pratt <mpr...@google.com>
Gerrit-CC: Madeline Kalil <mka...@google.com>
Gerrit-Attention: Michael Pratt <mpr...@google.com>
Gerrit-Attention: Alan Donovan <adon...@google.com>
unsatisfied_requirement
satisfied_requirement
open
diffy

Alan Donovan (Gerrit)

unread,
9:27 AM (9 hours ago) 9:27 AM
to goph...@pubsubhelper.golang.org, golang-co...@googlegroups.com
Attention needed from Alan Donovan and Michael Pratt

Alan Donovan uploaded new patchset

Alan Donovan uploaded patch set #3 to this change.
Following approvals got outdated and were removed:
  • TryBots-Pass: LUCI-TryBot-Result-1 by Go LUCI
Open in Gerrit

Related details

Attention is currently required from:
  • Alan Donovan
  • Michael Pratt
Submit Requirements:
  • requirement is not satisfiedCode-Review
  • requirement satisfiedNo-Unresolved-Comments
  • requirement is not satisfiedReview-Enforcement
  • requirement is not satisfiedTryBots-Pass
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: newpatchset
Gerrit-Project: telemetry
Gerrit-Branch: master
Gerrit-Change-Id: Ie667f228c3ba257ad167cdefe316050a0427f19b
Gerrit-Change-Number: 730380
Gerrit-PatchSet: 3
Gerrit-Owner: Alan Donovan <adon...@google.com>
Gerrit-Reviewer: Alan Donovan <adon...@google.com>
Gerrit-Reviewer: Michael Pratt <mpr...@google.com>
unsatisfied_requirement
satisfied_requirement
open
diffy
Reply all
Reply to author
Forward
0 new messages