Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 8b0a10aee5f2b98728d409043ed353715618d51b
      
https://github.com/WebKit/WebKit/commit/8b0a10aee5f2b98728d409043ed353715618d51b
  Author: Karl Rackler <[email protected]>
  Date:   2026-10-14 (Wed, 14 Oct 2026)

  Changed paths:
    M Tools/Scripts/libraries/webkitbugspy/setup.py
    M Tools/Scripts/libraries/webkitbugspy/webkitbugspy/__init__.py
    M Tools/Scripts/libraries/webkitbugspy/webkitbugspy/bugzilla.py
    M 
Tools/Scripts/libraries/webkitbugspy/webkitbugspy/tests/bugzilla_unittest.py

  Log Message:
  -----------
  [webkitbugspy] Only count refused logins as failed bugzilla login attempts
https://bugs.webkit.org/show_bug.cgi?id=327285
rdar://189856993

Reviewed by Jonathan Bedard.

A 4xx response that was not a refused login, such as a 404 for a bug that
does not exist or a 401 for a bug the account cannot see, used up one of the
tracker's login attempts, so a long-running client stopped logging in. Only
count a refused login or a disabled account (Bugzilla errors 300 and 301), and
only cache a complete project list so a failed read is retried.

* Tools/Scripts/libraries/webkitbugspy/setup.py: Bump version.
* Tools/Scripts/libraries/webkitbugspy/webkitbugspy/__init__.py: Ditto.
* Tools/Scripts/libraries/webkitbugspy/webkitbugspy/bugzilla.py:
(Tracker): Add FAILED_LOGIN_CODES.
(Tracker.__init__): Start without a cached project list.
(Tracker._error_code): Read the Bugzilla error code of a response.
(Tracker._count_failed_login): Use up a login attempt only for a refused login
or a disabled account.
(Tracker.user): Use _count_failed_login.
(Tracker.populate): Ditto, and report a bug that does not exist whether or not
login attempts are left.
(Tracker._attachment_contents): Use _count_failed_login.
(Tracker.set): Ditto, and read the project list once.
(Tracker.add_comment): Use _count_failed_login.
(Tracker._modify_relations): Ditto.
(Tracker.projects): Ditto, and only cache a complete project list.
(Tracker.valid_keywords): Use _count_failed_login.
(Tracker.create): Ditto, and read the project list once.
(Tracker.cc_radar): Use _count_failed_login.
(Tracker.group_members): Ditto.
* Tools/Scripts/libraries/webkitbugspy/webkitbugspy/tests/bugzilla_unittest.py:
(error_response): Added.
(TestBugzilla.test_create_surfaces_server_error): Check that a failed create
keeps the login attempts.
(TestBugzilla.test_projects_failed_product_query): Read a partial project
list again.
(TestBugzilla.test_projects_complete_list_cached): Added.
(TestBugzilla.test_create_reads_partial_projects_once): Added.
(TestBugzilla.test_projects_failed_list_query): Added.
(TestBugzilla.test_missing_bug_keeps_login_attempts): Added.
(TestBugzilla.test_inaccessible_bug_keeps_login_attempts): Added.
(TestBugzilla.test_refused_login_uses_login_attempt): Added.
(TestBugzilla.test_refused_logins_exhaust_login_attempts): Added.
(TestBugzilla.test_count_failed_login): Added.
(TestBugzilla.test_missing_bug_with_exhausted_logins): Added.

Canonical link: https://commits.webkit.org/323762@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to