<?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>239741</bug_id>
          
          <creation_ts>2022-04-25 14:42:50 -0700</creation_ts>
          <short_desc>[git-webkit] Cannot create pull request branch using bug URL, fails to fetch comments from Bugzilla, fails to modify bug</short_desc>
          <delta_ts>2022-04-28 10:38:34 -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>
          
          <see_also>https://bugs.webkit.org/show_bug.cgi?id=239850</see_also>
    
    <see_also>https://bugs.webkit.org/show_bug.cgi?id=239420</see_also>
          <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>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Michael Catanzaro">mcatanzaro</reporter>
          <assigned_to name="Michael Catanzaro">mcatanzaro</assigned_to>
          <cc>jbedard</cc>
    
    <cc>mcatanzaro</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1864233</commentid>
    <comment_count>0</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2022-04-25 14:42:50 -0700</bug_when>
    <thetext>git-webkit cannot create pull request branch using bug URL. Pretty sure this worked a week or two ago:

$ git-webkit pr
&apos;main&apos; is not a pull request branch, enter name of new branch (or bug URL): https://bugs.webkit.org/show_bug.cgi?id=239724
Failed to fetch &apos;https://bugs.webkit.org/show_bug.cgi?id=239724&apos;
&apos;https://bugs.webkit.org/show_bug.cgi?id=239724&apos; is an invalid branch name, cannot create it
Abandoning pushing pull-request because &apos;https://bugs.webkit.org/show_bug.cgi?id=239724&apos; could not be created

I should debug it to see why it fails for me.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1864234</commentid>
    <comment_count>1</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2022-04-25 14:45:41 -0700</bug_when>
    <thetext>More errors running &apos;webkit-patch pr&apos; after creating a branch manually:

Created &apos;PR 383 | Several internationalization tests broken with ICU 69.1&apos;!
Failed to fetch &apos;https://bugs.webkit.org/show_bug.cgi?id=239724&apos;
Failed to fetch &apos;https://bugs.webkit.org/show_bug.cgi?id=239724&apos;
Failed to modify &apos;https://bugs.webkit.org/show_bug.cgi?id=239724 None&apos;
Failed to fetch &apos;https://bugs.webkit.org/show_bug.cgi?id=239724&apos;
Assigning associated issue to Michael Catanzaro &lt;mcatanzaro@gnome.org&gt;
Failed to fetch comments for &apos;https://bugs.webkit.org/show_bug.cgi?id=239724&apos;
Failed to fetch &apos;https://bugs.webkit.org/show_bug.cgi?id=239724&apos;
Failed to fetch &apos;https://bugs.webkit.org/show_bug.cgi?id=239724&apos;
Failed to fetch &apos;https://bugs.webkit.org/show_bug.cgi?id=239724&apos;
Failed to modify &apos;https://bugs.webkit.org/show_bug.cgi?id=239724 None&apos;
Posted pull request link to https://bugs.webkit.org/show_bug.cgi?id=239724
Failed to fetch &apos;https://bugs.webkit.org/show_bug.cgi?id=239724&apos;
Failed to fetch &apos;https://bugs.webkit.org/show_bug.cgi?id=239724&apos;
https://github.com/WebKit/WebKit/pull/383</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1864537</commentid>
    <comment_count>2</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2022-04-26 11:28:48 -0700</bug_when>
    <thetext>Added some debugging:

diff --git a/Tools/Scripts/libraries/webkitbugspy/webkitbugspy/bugzilla.py b/Tools/Scripts/libraries/webkitbugspy/webkitbugspy/bugzilla.py
index 20243761c94d..870eb6a30923 100644
--- a/Tools/Scripts/libraries/webkitbugspy/webkitbugspy/bugzilla.py
+++ b/Tools/Scripts/libraries/webkitbugspy/webkitbugspy/bugzilla.py
@@ -149,6 +149,8 @@ class Tracker(GenericTracker):
 
         if member in (&apos;title&apos;, &apos;timestamp&apos;, &apos;creator&apos;, &apos;opened&apos;, &apos;assignee&apos;, &apos;watchers&apos;, &apos;project&apos;, &apos;component&apos;, &apos;version&apos;):
             response = requests.get(&apos;{}/rest/bug/{}{}&apos;.format(self.url, issue.id, self._login_arguments(required=False)))
+            if response.status_code != 200:
+                print(response)
             response = response.json().get(&apos;bugs&apos;, []) if response.status_code == 200 else None
             if response:
                 response = response[0]

It prints:

Updated &apos;PR 394 | Test PR, ignore&apos;!
&lt;Response [401]&gt;
Failed to fetch &apos;https://bugs.webkit.org/show_bug.cgi?id=239741&apos;
&lt;Response [401]&gt;
Failed to fetch &apos;https://bugs.webkit.org/show_bug.cgi?id=239741&apos;
Failed to modify &apos;https://bugs.webkit.org/show_bug.cgi?id=239741 None&apos;
&lt;Response [400]&gt;
Failed to fetch &apos;https://bugs.webkit.org/show_bug.cgi?id=239741&apos;
Assigning associated issue to Michael Catanzaro &lt;mcatanzaro@gnome.org&gt;
Failed to fetch comments for &apos;https://bugs.webkit.org/show_bug.cgi?id=239741&apos;
&lt;Response [400]&gt;
Failed to fetch &apos;https://bugs.webkit.org/show_bug.cgi?id=239741&apos;
&lt;Response [400]&gt;
Failed to fetch &apos;https://bugs.webkit.org/show_bug.cgi?id=239741&apos;
&lt;Response [400]&gt;
Failed to fetch &apos;https://bugs.webkit.org/show_bug.cgi?id=239741&apos;
Failed to modify &apos;https://bugs.webkit.org/show_bug.cgi?id=239741 None&apos;
Posted pull request link to https://bugs.webkit.org/show_bug.cgi?id=239741
&lt;Response [400]&gt;
Failed to fetch &apos;https://bugs.webkit.org/show_bug.cgi?id=239741&apos;
&lt;Response [400]&gt;
Failed to fetch &apos;https://bugs.webkit.org/show_bug.cgi?id=239741&apos;
https://github.com/WebKit/WebKit/pull/394

So it&apos;s 401 Unauthorized and 400 Bad Request.

My password stored by python-keyring *seems* to be correct, I think. To be completely sure, I wanted to test it in an incognito browser window to make sure I can use it to sign in, but I&apos;ve been IP banned from WebKit Bugzilla for the next couple hours for exceeding the maximum number of login attempts. Maybe the script should give up after the first failure, instead of failing so many times in a row.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1864550</commentid>
    <comment_count>4</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2022-04-26 11:48:47 -0700</bug_when>
    <thetext>Some more debugging reveals that git-webkit is using the expected username and password. And using a VPN to bypass my IP ban, I checked to ensure these credentials actually work (they do).

I&apos;ve hacked our bugzilla.py to fail after the first failed request, to hopefully avoid getting an IP ban on my VPN.

After debugging a little more, I notice bugzilla.py is just pasting my password into the URL unencoded. I think it&apos;s failing due to one or more special characters in the password. Probably the username and password should both be encoded somehow.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1864570</commentid>
    <comment_count>5</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2022-04-26 12:40:15 -0700</bug_when>
    <thetext>Pull request: https://github.com/WebKit/WebKit/pull/395</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1864577</commentid>
    <comment_count>6</comment_count>
    <who name="Jonathan Bedard">jbedard</who>
    <bug_when>2022-04-26 12:55:24 -0700</bug_when>
    <thetext>Thanks for getting to the bottom of this!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1864701</commentid>
    <comment_count>7</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2022-04-26 19:49:29 -0700</bug_when>
    <thetext>Committed r293495 (250028@main): &lt;https://commits.webkit.org/250028@main&gt;

Reviewed commits have been landed. Closing PR #395 and removing active labels.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1864702</commentid>
    <comment_count>8</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2022-04-26 19:50:14 -0700</bug_when>
    <thetext>&lt;rdar://problem/92373578&gt;</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>