<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>278426</bug_id>
          
          <creation_ts>2024-08-20 16:13:09 -0700</creation_ts>
          <short_desc>[ews-build] Bugzillas enclosed in &lt;&gt; in commit messages do not get closed upon landing</short_desc>
          <delta_ts>2024-09-04 13:12:46 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Tools / Tests</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          <dependson>244010</dependson>
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Ryan Haddad">ryanhaddad</reporter>
          <assigned_to name="Aakash Jain">aakash_jain</assigned_to>
          <cc>aakash_jain</cc>
    
    <cc>bfan2</cc>
    
    <cc>ddkilzer</cc>
    
    <cc>karlcow</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>2054245</commentid>
    <comment_count>0</comment_count>
    <who name="Ryan Haddad">ryanhaddad</who>
    <bug_when>2024-08-20 16:13:09 -0700</bug_when>
    <thetext>Bugzillas enclosed in &lt;&gt; in commit messages do not get closed upon landing, as our regex doesn&apos;t account for this case.

See https://github.com/WebKit/WebKit/pull/32350 and https://github.com/WebKit/WebKit/pull/32459 as examples.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2054252</commentid>
    <comment_count>1</comment_count>
    <who name="Ryan Haddad">ryanhaddad</who>
    <bug_when>2024-08-20 16:17:30 -0700</bug_when>
    <thetext>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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2054255</commentid>
    <comment_count>2</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2024-08-20 16:17:52 -0700</bug_when>
    <thetext>&lt;rdar://problem/134376407&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2054360</commentid>
    <comment_count>3</comment_count>
    <who name="Karl Dubost">karlcow</who>
    <bug_when>2024-08-20 23:48:34 -0700</bug_when>
    <thetext>```
regex = r&quot;^.*webkit.org\/(b\/|show_bug\.cgi\?id=)(\d+)&gt;?$&quot;

test_str = (&quot;webkit.org/b/123\n&quot;
	&quot;https://webkit.org/b/123\n&quot;
	&quot;https://bugs.webkit.org/show_bug.cgi?id=123\n&quot;
	&quot;&lt;webkit.org/b/123&gt;\n&quot;
	&quot;&lt;https://webkit.org/b/123&gt;\n&quot;
	&quot;&lt;https://bugs.webkit.org/show_bug.cgi?id=123&gt;&quot;)
```</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2054653</commentid>
    <comment_count>4</comment_count>
    <who name="Karl Dubost">karlcow</who>
    <bug_when>2024-08-22 00:45:14 -0700</bug_when>
    <thetext>This is used in 

https://github.com/WebKit/WebKit/blob/6febcde4e258e8dd77930b0a793d16b6836ec163/Tools/Scripts/libraries/webkitbugspy/webkitbugspy/tracker.py#L101-L103


```
        if data.get(&apos;type&apos;) in (&apos;bugzilla&apos;, &apos;github&apos;):
            unpacked[&apos;url&apos;] = data.get(&apos;url&apos;)
            unpacked[&apos;res&apos;] = [re.compile(r) for r in data.get(&apos;res&apos;, [])]
```


which then goes through a list of regex.
https://github.com/WebKit/WebKit/blob/6febcde4e258e8dd77930b0a793d16b6836ec163/metadata/trackers.json#L5-L10


```
        &quot;type&quot; : &quot;bugzilla&quot;,
        &quot;url&quot; : &quot;https://bugs.webkit.org&quot;,
        &quot;res&quot; : [
            &quot;\\Awebkit.org/b/(?P&lt;id&gt;\\d+)\\Z&quot;,
            &quot;\\Ahttps?://webkit.org/b/(?P&lt;id&gt;\\d+)\\Z&quot;,
            &quot;\\A&lt;webkit.org/b/(?P&lt;id&gt;\\d+)&gt;\\Z&quot;,
            &quot;\\A&lt;https?://webkit.org/b/(?P&lt;id&gt;\\d+)&gt;\\Z&quot;
        ],
```



The proposal in Comment #3 reduces this to one regex.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2057627</commentid>
    <comment_count>5</comment_count>
    <who name="Aakash Jain">aakash_jain</who>
    <bug_when>2024-09-04 10:24:46 -0700</bug_when>
    <thetext>Pull request: https://github.com/WebKit/WebKit/pull/33125</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2057672</commentid>
    <comment_count>6</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2024-09-04 13:12:44 -0700</bug_when>
    <thetext>Committed 283169@main (23ede0a38256): &lt;https://commits.webkit.org/283169@main&gt;

Reviewed commits have been landed. Closing PR #33125 and removing active labels.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>