[telemetry] cmd/stacks: change shouldRepoen so that it works with Delve

1 view
Skip to first unread message

Alessandro Arzilli (Gerrit)

unread,
4:57 AM (10 hours ago) 4:57 AM
to goph...@pubsubhelper.golang.org, golang-co...@googlegroups.com

Alessandro Arzilli has uploaded the change for review

Commit message

cmd/stacks: change shouldRepoen so that it works with Delve

Also add some verbose logging so that similar problems are easier to
debug in the future.
Change-Id: I66740240d57baf5b5d461462f03048eea2b892d5

Change diff

diff --git a/cmd/stacks/stacks.go b/cmd/stacks/stacks.go
index bc70189..54d24f0 100644
--- a/cmd/stacks/stacks.go
+++ b/cmd/stacks/stacks.go
@@ -97,6 +97,8 @@
daysFlag = flag.Int("days", 7, "number of previous days of telemetry data to read")

dryRun = flag.Bool("n", false, "dry run, avoid updating issues")
+
+ verbose = flag.Bool("v", false, "verbose")
)

// ProgramConfig is the configuration for processing reports for a specific
@@ -648,14 +650,20 @@
if !issue.isFixed() {
return false
}
+ if *verbose {
+ log.Printf("shouldReopen %q\n", issue.Title)
+ }
issueProgram, issueVersion, ok := parseMilestone(issue.Milestone)
if !ok {
+ if *verbose {
+ log.Printf("unparsable milestone %#v\n", issue.Milestone)
+ }
return false
}

matchProgram := func(infoProg string) bool {
switch issueProgram {
- case "gopls":
+ case "gopls", "dlv":
return path.Base(infoProg) == issueProgram
case "go":
// At present, we only care about compiler stacks.
@@ -668,6 +676,9 @@

for _, stack := range issue.newStacks {
for info := range stacks[stack] {
+ if *verbose {
+ log.Printf("\tmatchProgram %v (%q %q) semver.Compare %v\n", matchProgram(info.Program), issueProgram, info.Program, semver.Compare(semVer(info.ProgramVersion), issueVersion))
+ }
if matchProgram(info.Program) && semver.Compare(semVer(info.ProgramVersion), issueVersion) >= 0 {
log.Printf("reopening issue #%d: purportedly fixed in %s@%s, but found a new stack from version %s",
issue.Number, issueProgram, issueVersion, info.ProgramVersion)

Change information

Files:
  • M cmd/stacks/stacks.go
Change size: S
Delta: 1 file changed, 12 insertions(+), 1 deletion(-)
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: I66740240d57baf5b5d461462f03048eea2b892d5
Gerrit-Change-Number: 743000
Gerrit-PatchSet: 1
Gerrit-Owner: Alessandro Arzilli <alessandr...@gmail.com>
unsatisfied_requirement
satisfied_requirement
open
diffy
Reply all
Reply to author
Forward
0 new messages