-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
issues: filter by exact title match when looking for existing issue #96389
Conversation
a5d0424
to
eb35304
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 20 of 20 files at r1, all commit messages.
Reviewable status: complete! 0 of 0 LGTMs obtained (waiting on @renatolabs, @smg260, and @srosenberg)
pkg/cmd/internal/issues/issues_test.go
line 180 at r1 (raw file):
factories := make([]issueFactory, 0, len(suffixes)) for k, suffix := range suffixes { suffix := suffix // capture range variable
shouldn't k
be captured as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice fix, I'm sure this will prevent unwarranted confusion in the future.
Reviewable status: complete! 0 of 0 LGTMs obtained (waiting on @renatolabs, @smg260, and @srosenberg)
This changes the logic used to find existing and related issues when posting test failures on GitHub. Previously, we would rely on the GitHub API to find issues with the a certain title; however, the GitHub API does not provide a way to filter by exact title match. Instead, issues that have a "similar" name are returned. As a consequence, when a test fails, we might comment on an existing issue for a different test, which is confusing and may mask failures. As a means of example, check issue cockroachdb#91594: failures for `schemachange/mixed-versions` and `schemachange/mixed-versions-compat` are both posted there for this reason. This commit does some further filtering on our end to ensure that an issue is only considered existing or related if the titles match exactly. Epic: none Release note: None
eb35304
to
4a517ff
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: complete! 0 of 0 LGTMs obtained (waiting on @herkolategan, @smg260, and @srosenberg)
pkg/cmd/internal/issues/issues_test.go
line 180 at r1 (raw file):
Previously, herkolategan (Herko Lategan) wrote…
shouldn't
k
be captured as well?
Hah, nice catch, it's funny how often I still make this mistake even after thinking about it for so long while writing that linter. Fixed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: complete! 0 of 0 LGTMs obtained (waiting on @smg260 and @srosenberg)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: complete! 0 of 0 LGTMs obtained (waiting on @renatolabs, @smg260, and @srosenberg)
pkg/cmd/internal/issues/issues_test.go
line 180 at r1 (raw file):
Previously, renatolabs (Renato Costa) wrote…
Hah, nice catch, it's funny how often I still make this mistake even after thinking about it for so long while writing that linter. Fixed.
Easy to miss those! And still something I'm getting used to, having worked in Java
for a long time, I'm very use to the compiler complaining that a variable needs to be final
if you're capturing it in a lambda.
bors r=herkolategan TFTR! |
Build succeeded: |
This changes the logic used to find existing and related issues when posting test failures on GitHub. Previously, we would rely on the GitHub API to find issues with the a certain title; however, the GitHub API does not provide a way to filter by exact title match. Instead, issues that have a "similar" name are returned. As a consequence, when a test fails, we might comment on an existing issue for a different test, which is confusing and may mask failures.
As a means of example, check issue #91594: failures for
schemachange/mixed-versions
andschemachange/mixed-versions-compat
are both posted there for this reason.This commit does some further filtering on our end to ensure that an issue is only considered existing or related if the titles match exactly.
Epic: none
Release note: None