RESOLVED FIXED 201733
block-spammers should obtain credentials the same way as webkit-patch
https://bugs.webkit.org/show_bug.cgi?id=201733
Summary block-spammers should obtain credentials the same way as webkit-patch
David Kilzer (:ddkilzer)
Reported 2019-09-12 12:54:26 PDT
The block-spammers script should obtain credentials the same way as webkit-patch.
Attachments
Patch v1 (2.17 KB, patch)
2019-09-12 12:57 PDT, David Kilzer (:ddkilzer)
no flags
Patch v2 (2.17 KB, patch)
2019-09-12 13:00 PDT, David Kilzer (:ddkilzer)
no flags
Patch v3 (5.32 KB, patch)
2019-09-12 21:21 PDT, David Kilzer (:ddkilzer)
no flags
Patch v4 (5.37 KB, patch)
2019-09-12 21:24 PDT, David Kilzer (:ddkilzer)
no flags
David Kilzer (:ddkilzer)
Comment 1 2019-09-12 12:57:50 PDT
Created attachment 378669 [details] Patch v1
Alexey Proskuryakov
Comment 2 2019-09-12 13:00:36 PDT
Comment on attachment 378669 [details] Patch v1 View in context: https://bugs.webkit.org/attachment.cgi?id=378669&action=review > Tools/Scripts/block-spammers:34 > +from webkitpy.common.net.credentials import Credentials Does this work when you don't have autoimported modules in place yet?
David Kilzer (:ddkilzer)
Comment 3 2019-09-12 13:00:51 PDT
Created attachment 378670 [details] Patch v2
David Kilzer (:ddkilzer)
Comment 4 2019-09-12 13:01:43 PDT
(In reply to David Kilzer (:ddkilzer) from comment #3) > Created attachment 378670 [details] > Patch v2 Changed double quotes to single quotes in one place.
David Kilzer (:ddkilzer)
Comment 5 2019-09-12 13:05:48 PDT
(In reply to Alexey Proskuryakov from comment #2) > Comment on attachment 378669 [details] > Patch v1 > > View in context: > https://bugs.webkit.org/attachment.cgi?id=378669&action=review > > > Tools/Scripts/block-spammers:34 > > +from webkitpy.common.net.credentials import Credentials > > Does this work when you don't have autoimported modules in place yet? No clue what that is, why I'd want it, or how to test it. If you're set up that way, could you take two minutes to apply the patch and test it? Since this uses the exact same code path as webkit-patch, I presume that tool would also be broken if that configuration isn't supported.
Alexey Proskuryakov
Comment 6 2019-09-12 13:16:31 PDT
What happens if you "rm -rf Tools/Scripts/webkitpy/thirdparty/autoinstalled", and run this script? Webkitpy has installed those modules for you the first time you used it. The code path in webkitpy is not exactly the same, and autoimport setup is subtle.
Alexey Proskuryakov
Comment 7 2019-09-12 13:17:28 PDT
(what should happen is that everything works anyway, and that the keyring module re-appears in autoinstalled)
David Kilzer (:ddkilzer)
Comment 8 2019-09-12 13:29:08 PDT
(In reply to Alexey Proskuryakov from comment #6) > What happens if you "rm -rf > Tools/Scripts/webkitpy/thirdparty/autoinstalled", and run this script? > Webkitpy has installed those modules for you the first time you used it. > > The code path in webkitpy is not exactly the same, and autoimport setup is > subtle. (In reply to Alexey Proskuryakov from comment #7) > (what should happen is that everything works anyway, and that the keyring > module re-appears in autoinstalled) $ mv Tools/Scripts/webkitpy/thirdparty/autoinstalled Tools/Scripts/webkitpy/thirdparty/autoinstalled.BAK $ ./Tools/Scripts/block-spammers millay.moede@gmail.com No handlers could be found for logger "webkitpy.common.net.credentials" Fetching account activity... [...] Seems to work in the case where the credentials are already in the keychain.
Alexey Proskuryakov
Comment 9 2019-09-12 15:04:12 PDT
> No handlers could be found for logger "webkitpy.common.net.credentials" This looks like a regression from this patch that this line is logged.
Alexey Proskuryakov
Comment 10 2019-09-12 17:36:15 PDT
Not trying to be difficult, but I think that the new console spew needs to be fixed before landing.
David Kilzer (:ddkilzer)
Comment 11 2019-09-12 21:20:16 PDT
(In reply to Alexey Proskuryakov from comment #10) > Not trying to be difficult, but I think that the new console spew needs to > be fixed before landing. No worries. I had to leave work early, then I had figure out how to fix the logging warning, then I decided to refactor a bit of credentials.py.
David Kilzer (:ddkilzer)
Comment 12 2019-09-12 21:21:15 PDT
Created attachment 378710 [details] Patch v3
David Kilzer (:ddkilzer)
Comment 13 2019-09-12 21:24:03 PDT
Created attachment 378712 [details] Patch v4
David Kilzer (:ddkilzer)
Comment 14 2019-09-12 21:25:25 PDT
(In reply to David Kilzer (:ddkilzer) from comment #12) > Created attachment 378710 [details] > Patch v3 This fixed the new warning and refactored credentials.py. (In reply to David Kilzer (:ddkilzer) from comment #13) > Created attachment 378712 [details] > Patch v4 This changed the logging level to info, which matches webkit-patch, so now they behave the same way (including the same console output) when reading credentials from the keychain.
WebKit Commit Bot
Comment 15 2019-09-15 07:15:05 PDT
Comment on attachment 378712 [details] Patch v4 Clearing flags on attachment: 378712 Committed r249884: <https://trac.webkit.org/changeset/249884>
WebKit Commit Bot
Comment 16 2019-09-15 07:15:06 PDT
All reviewed patches have been landed. Closing bug.
Radar WebKit Bug Importer
Comment 17 2019-09-15 07:16:17 PDT
Note You need to log in before you can comment on or make changes to this bug.