Bug 278426
| Summary: | [ews-build] Bugzillas enclosed in <> in commit messages do not get closed upon landing | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Ryan Haddad <ryanhaddad> |
| Component: | Tools / Tests | Assignee: | Aakash Jain <aakash_jain> |
| Status: | RESOLVED FIXED | ||
| Severity: | Normal | CC: | aakash_jain, bfan2, ddkilzer, karlcow, webkit-bug-importer |
| Priority: | P2 | Keywords: | InRadar |
| Version: | WebKit Nightly Build | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Bug Depends on: | 244010 | ||
| Bug Blocks: | |||
Ryan Haddad
Bugzillas enclosed in <> in commit messages do not get closed upon landing, as our regex doesn't account for this case.
See https://github.com/WebKit/WebKit/pull/32350 and https://github.com/WebKit/WebKit/pull/32459 as examples.
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Ryan Haddad
This is happening because the CloseBug step depends upon the bug_id property being set.
Since our regex fails to pull out the ID from bugzilla URLs inside of less than / greater than characters, this step is being skipped.
Radar WebKit Bug Importer
<rdar://problem/134376407>
Karl Dubost
```
regex = r"^.*webkit.org\/(b\/|show_bug\.cgi\?id=)(\d+)>?$"
test_str = ("webkit.org/b/123\n"
"https://webkit.org/b/123\n"
"https://bugs.webkit.org/show_bug.cgi?id=123\n"
"<webkit.org/b/123>\n"
"<https://webkit.org/b/123>\n"
"<https://bugs.webkit.org/show_bug.cgi?id=123>")
```
Karl Dubost
This is used in
https://github.com/WebKit/WebKit/blob/6febcde4e258e8dd77930b0a793d16b6836ec163/Tools/Scripts/libraries/webkitbugspy/webkitbugspy/tracker.py#L101-L103
```
if data.get('type') in ('bugzilla', 'github'):
unpacked['url'] = data.get('url')
unpacked['res'] = [re.compile(r) for r in data.get('res', [])]
```
which then goes through a list of regex.
https://github.com/WebKit/WebKit/blob/6febcde4e258e8dd77930b0a793d16b6836ec163/metadata/trackers.json#L5-L10
```
"type" : "bugzilla",
"url" : "https://bugs.webkit.org",
"res" : [
"\\Awebkit.org/b/(?P<id>\\d+)\\Z",
"\\Ahttps?://webkit.org/b/(?P<id>\\d+)\\Z",
"\\A<webkit.org/b/(?P<id>\\d+)>\\Z",
"\\A<https?://webkit.org/b/(?P<id>\\d+)>\\Z"
],
```
The proposal in Comment #3 reduces this to one regex.
Aakash Jain
Pull request: https://github.com/WebKit/WebKit/pull/33125
EWS
Committed 283169@main (23ede0a38256): <https://commits.webkit.org/283169@main>
Reviewed commits have been landed. Closing PR #33125 and removing active labels.