Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

x/build/devapp: duplicate CL lines on /release page #26113

Closed
bradfitz opened this issue Jun 28, 2018 · 5 comments
Closed

x/build/devapp: duplicate CL lines on /release page #26113

bradfitz opened this issue Jun 28, 2018 · 5 comments
Labels
Builders x/build issues (builders, bots, dashboards) FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done.
Milestone

Comments

@bradfitz
Copy link
Contributor

I just noticed duplicate lines for an open CL:

dup

@bradfitz bradfitz added the NeedsFix The path to resolution is known, but the work has not been done. label Jun 28, 2018
@gopherbot gopherbot added this to the Unreleased milestone Jun 28, 2018
@gopherbot gopherbot added the Builders x/build issues (builders, bots, dashboards) label Jun 28, 2018
@bradfitz
Copy link
Contributor Author

bradfitz commented Aug 3, 2018

/cc @dmitshur

@dmitshur
Copy link
Contributor

dmitshur commented Aug 6, 2018

This seems to happen when the CL description mentions the same issue more than once. For example, here's a current occurrence of this bug:

image

Here's the commit message of CL 26650 mentioning that issue twice:

image

Seems like a straightforward bug to fix; I'll use it as a warm up.

@dmitshur
Copy link
Contributor

dmitshur commented Aug 6, 2018

maintner.GerritCL has a field GitHubIssueRefs of type []GitHubIssueRef. Currently, if the CL description mentions the same issue more than once, there will be multiple identical GitHubIssueRef entries in that slice. E.g.:

corpus, err := godata.Get(context.Background())
if err != nil {
	return err
}
proj := corpus.Gerrit().Project("go.googlesource.com", "sys")
cl := proj.CL(26650)
for _, ref := range cl.GitHubIssueRefs {
	fmt.Println(ref.Repo.ID(), ref.Number)
}

// Output:
// golang/go 14873
// golang/go 14873

While it's possible to deduplicate these lines in devapp-only, I suspect a better fix is to deduplicate them in maintner.

(At least at this time, GitHubIssueRef doesn't track anything other than repo and issue number, so multiple entries carry very little information. If we ever want to change that to also have a "character position" or something to make multiple entries non-unique, then we can stop deduplicating.)

@gopherbot
Copy link

Change https://golang.org/cl/128119 mentions this issue: maintner: deduplicate issue references in parseGithubRefs

@dmitshur
Copy link
Contributor

dmitshur commented Aug 7, 2018

I've deployed the new version and confirmed that the bug is fixed in production.

Before

image

After

image

@golang golang locked and limited conversation to collaborators Aug 7, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Builders x/build issues (builders, bots, dashboards) FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done.
Projects
None yet
Development

No branches or pull requests

4 participants