Bug 119382 - Fix problem with find-resolved-bugs command
Summary: Fix problem with find-resolved-bugs command
Status: UNCONFIRMED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-08-01 01:29 PDT by Seokju Kwon
Modified: 2016-05-24 22:02 PDT (History)
9 users (show)

See Also:


Attachments
Patch (3.12 KB, patch)
2013-08-01 01:34 PDT, Seokju Kwon
no flags Details | Formatted Diff | Diff
Patch (3.11 KB, patch)
2013-08-08 23:50 PDT, Seokju Kwon
no flags Details | Formatted Diff | Diff
Patch (3.11 KB, patch)
2013-08-09 00:42 PDT, Seokju Kwon
no flags Details | Formatted Diff | Diff
Patch (3.92 KB, patch)
2013-08-11 19:18 PDT, Seokju Kwon
beidson: review-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Seokju Kwon 2013-08-01 01:29:20 PDT
Error occurs if bugs have restricted accesses.
So this patch allow it to avoid authentication during fetching bugs for find-resolved-bugs command.

[Before]
bugs.webkit.org login: test@webit.org
bugs.webkit.org password for test@webit.org: 
Store password in system keyring? [y/N]: 
Logging in as test@webit.org...
Traceback (most recent call last):
  File "./Tools/Scripts/webkit-patch", line 84, in <module>
    main()
  File "./Tools/Scripts/webkit-patch", line 79, in main
    WebKitPatch(os.path.abspath(__file__)).main()
  File "/home/neocrash/git/WebKit-Qt/Tools/Scripts/webkitpy/tool/multicommandtool.py", line 305, in main
    result = command.check_arguments_and_execute(options, args, self)
  File "/home/neocrash/git/WebKit-Qt/Tools/Scripts/webkitpy/tool/multicommandtool.py", line 123, in check_arguments_and_execute
    return self.execute(options, args, tool) or 0
  File "/home/neocrash/git/WebKit-Qt/Tools/Scripts/webkitpy/tool/commands/queries.py", line 604, in execute
    bug = bugzilla.fetch_bug(bugid)
  File "/home/neocrash/git/WebKit-Qt/Tools/Scripts/webkitpy/common/net/bugzilla/bugzilla.py", line 455, in fetch_bug
    return Bug(self.fetch_bug_dictionary(bug_id), self)
  File "/home/neocrash/git/WebKit-Qt/Tools/Scripts/webkitpy/common/net/bugzilla/bugzilla.py", line 449, in fetch_bug_dictionary
    self.authenticate()
  File "/home/neocrash/git/WebKit-Qt/Tools/Scripts/webkitpy/common/net/bugzilla/bugzilla.py", line 526, in authenticate
    raise Exception(errorMessage)
Exception: Bugzilla login failed: Invalid Username Or Password


[After]
$./Tools/Scripts/webkit-patch find-resolved-bugs LayoutTests/platform/gtk-wk2/TestExpectations
Resolved bugs in LayoutTests/platform/gtk-wk2/TestExpectations :
https://bugs.webkit.org/show_bug.cgi?id=63706
https://bugs.webkit.org/show_bug.cgi?id=85463
https://bugs.webkit.org/show_bug.cgi?id=81042
https://bugs.webkit.org/show_bug.cgi?id=97192
https://bugs.webkit.org/show_bug.cgi?id=94549
https://bugs.webkit.org/show_bug.cgi?id=42457
Not permitted bugs in LayoutTests/platform/gtk-wk2/TestExpectations :
https://bugs.webkit.org/show_bug.cgi?id=89287
Comment 1 Seokju Kwon 2013-08-01 01:34:42 PDT
Created attachment 207905 [details]
Patch
Comment 2 Seokju Kwon 2013-08-01 15:48:14 PDT
@Ossy
Could you please take a look at this?
Comment 3 Seokju Kwon 2013-08-08 23:50:47 PDT
Created attachment 208397 [details]
Patch
Comment 4 Seokju Kwon 2013-08-08 23:52:09 PDT
Sync with the latest code.
CC'ing rniwa.
Comment 5 EFL EWS Bot 2013-08-09 00:03:16 PDT
Comment on attachment 208397 [details]
Patch

Attachment 208397 [details] did not pass efl-wk2-ews (efl-wk2):
Output: http://webkit-queues.appspot.com/results/1359358
Comment 6 Seokju Kwon 2013-08-09 00:19:20 PDT
It is not related to this patch.(In reply to comment #5)
> (From update of attachment 208397 [details])
> Attachment 208397 [details] did not pass efl-wk2-ews (efl-wk2):
> Output: http://webkit-queues.appspot.com/results/1359358

Not related to this patch.
Comment 7 Chris Dumez 2013-08-09 00:38:04 PDT
Comment on attachment 208397 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=208397&action=review

> Tools/Scripts/webkitpy/tool/commands/queries.py:601
> +        notPermitted_ids = set()

not_permitted_ids
Comment 8 Seokju Kwon 2013-08-09 00:42:51 PDT
Created attachment 208402 [details]
Patch
Comment 9 Seokju Kwon 2013-08-09 00:43:33 PDT
(In reply to comment #7)
> (From update of attachment 208397 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=208397&action=review
> 
> > Tools/Scripts/webkitpy/tool/commands/queries.py:601
> > +        notPermitted_ids = set()
> 
> not_permitted_ids

@Christophe Dumez 
Fixed. Thanks :-)
Comment 10 Chris Dumez 2013-08-09 00:50:19 PDT
Comment on attachment 208402 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=208402&action=review

> Tools/Scripts/webkitpy/common/net/bugzilla/bugzilla.py:457
> +        # Avoid authentication

What if the caller of this script has access to these bugs? Doesn't it prevent him from authenticating?

> Tools/Scripts/webkitpy/tool/commands/queries.py:601
> +        not_Permitted_ids = set()

without capital letters : not_permitted_ids.
Comment 11 Chris Dumez 2013-08-09 00:52:13 PDT
(In reply to comment #10)
> (From update of attachment 208402 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=208402&action=review
> 
> > Tools/Scripts/webkitpy/common/net/bugzilla/bugzilla.py:457
> > +        # Avoid authentication
> 
> What if the caller of this script has access to these bugs? Doesn't it prevent him from authenticating?

It might be better to just not abort when authentication fails, and ignore that bug instead.
Comment 12 Seokju Kwon 2013-08-11 19:03:38 PDT
(In reply to comment #10)
> (From update of attachment 208402 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=208402&action=review
> 
> > Tools/Scripts/webkitpy/common/net/bugzilla/bugzilla.py:457
> > +        # Avoid authentication
> 
> What if the caller of this script has access to these bugs? Doesn't it prevent him from authenticating?
> 

This patch avoided requiring authentication if bugs have restricted accesses.
But It could be checked manually with 'not_permitted_ids' links.

> > Tools/Scripts/webkitpy/tool/commands/queries.py:601
> > +        not_Permitted_ids = set()
> 
> without capital letters : not_permitted_ids.

Oh my bad.
Comment 13 Seokju Kwon 2013-08-11 19:04:14 PDT
(In reply to comment #11)
> (In reply to comment #10)
> > (From update of attachment 208402 [details] [details])
> > View in context: https://bugs.webkit.org/attachment.cgi?id=208402&action=review
> > 
> > > Tools/Scripts/webkitpy/common/net/bugzilla/bugzilla.py:457
> > > +        # Avoid authentication
> > 
> > What if the caller of this script has access to these bugs? Doesn't it prevent him from authenticating?
> 
> It might be better to just not abort when authentication fails, and ignore that bug instead.

I will upload a new patch. Thanks.
Comment 14 Seokju Kwon 2013-08-11 19:18:43 PDT
Created attachment 208508 [details]
Patch
Comment 15 Brady Eidson 2016-05-24 22:02:19 PDT
Comment on attachment 208508 [details]
Patch

Assuming that patches for review since 2013 are stale, r-