-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
release-23.1: issues: use prefix match to check for existing issue #107569
Conversation
Thanks for opening a backport. Please check the backport criteria before merging:
If some of the basic criteria cannot be satisfied, ensure that the exceptional criteria are satisfied within.
Add a brief release justification to the body of your PR to justify this backport. Some other things to consider:
|
pkg/cmd/internal/issues/issues.go
Outdated
result *github.IssuesSearchResult, expectedTitle string, | ||
) []github.Issue { | ||
expectedTitleRegex := regexp.MustCompile(`^` + expectedTitle + `(\s+|$)`) |
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.
It just occurred to me: shouldn't we regexp.QuoteMeta(expectedTitle)
? I don't think this is an immediate problem given our test names and title function, but could become a silent bug if those were to change. What's worse, MustCompile
would crash the entire roachtest nightly run.
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.
yeah that's definitely a good idea
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.
Approving, but we should probably address the comment on master. Your call if you want to merge this backport and then open another one, or wait for that fix to merge and have a single PR.
It is conventional to annotate a test failure issue title with some additional information about thef failure cause. The previous logic was too strict in requiring an exact title match. Now it will match as long as the title matches exactly OR if the prefix matches and is followed by whitespace. Release note: None
5b01e8d
to
46f4ddb
Compare
Created #107574 on master |
Backport 1/1 commits from #107444.
/cc @cockroachdb/release
It is conventional to annotate a test failure issue title with some additional information about the failure cause. The previous logic was too strict in requiring an exact title match. Now it will match as long as the title matches exactly OR if the prefix matches and is followed by whitespace.
Example:
I added a suffix to
sql/tests: TestRandomSyntaxFunctions failed [panic in request_job_execution_details]
since the issue was with a function the jobs team added. But the next day #107237 was opened anew. This PR would prevent that from happening.Release justification: non production code change
Epic: None
Release note: None