Bug 239741

Summary: [git-webkit] Cannot create pull request branch using bug URL, fails to fetch comments from Bugzilla, fails to modify bug
Product: WebKit Reporter: Michael Catanzaro <mcatanzaro>
Component: Tools / TestsAssignee: Michael Catanzaro <mcatanzaro>
Status: RESOLVED FIXED    
Severity: Normal CC: jbedard, mcatanzaro, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=239850
https://bugs.webkit.org/show_bug.cgi?id=239420

Michael Catanzaro
Reported 2022-04-25 14:42:50 PDT
git-webkit cannot create pull request branch using bug URL. Pretty sure this worked a week or two ago: $ git-webkit pr 'main' 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 'https://bugs.webkit.org/show_bug.cgi?id=239724' 'https://bugs.webkit.org/show_bug.cgi?id=239724' is an invalid branch name, cannot create it Abandoning pushing pull-request because 'https://bugs.webkit.org/show_bug.cgi?id=239724' could not be created I should debug it to see why it fails for me.
Attachments
Michael Catanzaro
Comment 1 2022-04-25 14:45:41 PDT
More errors running 'webkit-patch pr' after creating a branch manually: Created 'PR 383 | Several internationalization tests broken with ICU 69.1'! Failed to fetch 'https://bugs.webkit.org/show_bug.cgi?id=239724' Failed to fetch 'https://bugs.webkit.org/show_bug.cgi?id=239724' Failed to modify 'https://bugs.webkit.org/show_bug.cgi?id=239724 None' Failed to fetch 'https://bugs.webkit.org/show_bug.cgi?id=239724' Assigning associated issue to Michael Catanzaro <mcatanzaro@gnome.org> Failed to fetch comments for 'https://bugs.webkit.org/show_bug.cgi?id=239724' Failed to fetch 'https://bugs.webkit.org/show_bug.cgi?id=239724' Failed to fetch 'https://bugs.webkit.org/show_bug.cgi?id=239724' Failed to fetch 'https://bugs.webkit.org/show_bug.cgi?id=239724' Failed to modify 'https://bugs.webkit.org/show_bug.cgi?id=239724 None' Posted pull request link to https://bugs.webkit.org/show_bug.cgi?id=239724 Failed to fetch 'https://bugs.webkit.org/show_bug.cgi?id=239724' Failed to fetch 'https://bugs.webkit.org/show_bug.cgi?id=239724' https://github.com/WebKit/WebKit/pull/383
Michael Catanzaro
Comment 2 2022-04-26 11:28:48 PDT
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 ('title', 'timestamp', 'creator', 'opened', 'assignee', 'watchers', 'project', 'component', 'version'): response = requests.get('{}/rest/bug/{}{}'.format(self.url, issue.id, self._login_arguments(required=False))) + if response.status_code != 200: + print(response) response = response.json().get('bugs', []) if response.status_code == 200 else None if response: response = response[0] It prints: Updated 'PR 394 | Test PR, ignore'! <Response [401]> Failed to fetch 'https://bugs.webkit.org/show_bug.cgi?id=239741' <Response [401]> Failed to fetch 'https://bugs.webkit.org/show_bug.cgi?id=239741' Failed to modify 'https://bugs.webkit.org/show_bug.cgi?id=239741 None' <Response [400]> Failed to fetch 'https://bugs.webkit.org/show_bug.cgi?id=239741' Assigning associated issue to Michael Catanzaro <mcatanzaro@gnome.org> Failed to fetch comments for 'https://bugs.webkit.org/show_bug.cgi?id=239741' <Response [400]> Failed to fetch 'https://bugs.webkit.org/show_bug.cgi?id=239741' <Response [400]> Failed to fetch 'https://bugs.webkit.org/show_bug.cgi?id=239741' <Response [400]> Failed to fetch 'https://bugs.webkit.org/show_bug.cgi?id=239741' Failed to modify 'https://bugs.webkit.org/show_bug.cgi?id=239741 None' Posted pull request link to https://bugs.webkit.org/show_bug.cgi?id=239741 <Response [400]> Failed to fetch 'https://bugs.webkit.org/show_bug.cgi?id=239741' <Response [400]> Failed to fetch 'https://bugs.webkit.org/show_bug.cgi?id=239741' https://github.com/WebKit/WebKit/pull/394 So it'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'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.
Michael Catanzaro
Comment 4 2022-04-26 11:48:47 PDT
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'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's failing due to one or more special characters in the password. Probably the username and password should both be encoded somehow.
Michael Catanzaro
Comment 5 2022-04-26 12:40:15 PDT
Jonathan Bedard
Comment 6 2022-04-26 12:55:24 PDT
Thanks for getting to the bottom of this!
EWS
Comment 7 2022-04-26 19:49:29 PDT
Committed r293495 (250028@main): <https://commits.webkit.org/250028@main> Reviewed commits have been landed. Closing PR #395 and removing active labels.
Radar WebKit Bug Importer
Comment 8 2022-04-26 19:50:14 PDT
Note You need to log in before you can comment on or make changes to this bug.