Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: b6658b694e0d6c2d19ea810aada91758d1d3daeb
https://github.com/WebKit/WebKit/commit/b6658b694e0d6c2d19ea810aada91758d1d3daeb
Author: Ryan Haddad <[email protected]>
Date: 2026-07-30 (Thu, 30 Jul 2026)
Changed paths:
M Tools/Scripts/libraries/webkitbugspy/webkitbugspy/bugzilla.py
M Tools/Scripts/libraries/webkitbugspy/webkitbugspy/mocks/bugzilla.py
M
Tools/Scripts/libraries/webkitbugspy/webkitbugspy/tests/bugzilla_unittest.py
Log Message:
-----------
[git-webkit] revert fails when the original bug's version is no longer
active, blocking reverts of older commits
https://bugs.webkit.org/show_bug.cgi?id=320395
Reviewed by Aakash Jain.
`git-webkit revert` inherits the project, component, and version of the bug
attached to the
commit being reverted. When that bug is old enough that its version has since
been retired
in Bugzilla, bug creation failed with a "<version> is not active." error which
aborts the revert
without creating a bug or PR.
Address this by filtering out inactive versions (as was already done for
products and components)
and falling back to the default version instead of raising an error.
* Tools/Scripts/libraries/webkitbugspy/webkitbugspy/bugzilla.py:
(Tracker): Hoist the hardcoded default version to a DEFAULT_VERSION constant.
(Tracker.projects): Exclude versions Bugzilla reports as inactive, so callers
only ever see
versions a new bug can actually be filed against.
(Tracker.create): Substitute the default version and warn on stderr when the
requested version
is inactive, instead of raising. Still raises if the project has no active
versions at all.
* Tools/Scripts/libraries/webkitbugspy/webkitbugspy/mocks/bugzilla.py:
(Bugzilla._product_details): Report versions listed in a project's new
'inactive_versions'
key as inactive rather than marking every version active.
(Bugzilla._create): Reject inactive versions with the same 400 real Bugzilla
returns, so the
client-side fallback is tested against server enforcement.
* Tools/Scripts/libraries/webkitbugspy/webkitbugspy/tests/bugzilla_unittest.py:
(TestBugzilla.test_create_falls_back_to_default_version): An inactive version
is replaced
by the default and the substitution is reported on stderr.
(TestBugzilla.test_create_falls_back_to_last_version): When the default is
itself inactive,
the last remaining active version is used.
(TestBugzilla.test_create_no_version_is_silent): Omitting a version still picks
the default
without emitting a warning.
(TestBugzilla.test_projects_excludes_inactive_versions): Inactive versions are
absent from
the project's version list.
Canonical link: https://commits.webkit.org/318263@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications