Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: d6777165fca3b2d3a9cddedc71e0d771c3805a78
https://github.com/WebKit/WebKit/commit/d6777165fca3b2d3a9cddedc71e0d771c3805a78
Author: Carlos Alberto Lopez Perez <[email protected]>
Date: 2025-10-10 (Fri, 10 Oct 2025)
Changed paths:
M
Tools/Scripts/libraries/reporelaypy/reporelaypy/tests/checkoutroute_unittest.py
M Tools/Scripts/libraries/webkitscmpy/webkitscmpy/local/git.py
M Tools/Scripts/libraries/webkitscmpy/webkitscmpy/mocks/local/git.py
M Tools/Scripts/libraries/webkitscmpy/webkitscmpy/test/git_unittest.py
Log Message:
-----------
[Tools][git-webkit] Wrong identifiers for commits on some buildbot workers
after the upgrade to 4.3.0
https://bugs.webkit.org/show_bug.cgi?id=299395
Reviewed by Philippe Normand.
Since build.webkit.org buildbot server was upgraded the workers on the nighlty
scheduler
are generating wrong commit identifiers, because git-webkit is not longer
unable to tell
if the checked out commit belongs to the main branch or not.
This is caused because buildbot now does a checkout to the target commit
instead of
resetting the main branch to it, so git ends in a detached state instead of on
the branch.
Then git-webkit tries to see if the commit checked out belongs to main, but it
fails
to do so because the bot does this to update and check the commit:
git fetch -f --progress https://github.com/WebKit/WebKit.git HEAD
git checkout -f FETCH_HEAD
That means that git is not updating origin/remotes/main to FETCH_HEAD, so then
git-webkit
thinks that FETCH_HEAD doesn't belong to main (or origin/remotes/main) because
it is not
an ancestor commit (at least not until the reference for main gets updated to
FETCH_HEAD)
To update the reference on origin/remotes/main one can force running "git
fetch" or
"git fetch origin" (without passing an URL, but telling it to just fetch the
origin).
But buildbot workers are not doing that.
This patch improves the tool git-webkit to look also at the commit in
FETCH_HEAD when
trying to see if the commit belongs to the default branch. To achieve that it
does:
- Check if the merge-candidate commit in FETCH_HEAD is for the default branch
and for
the default repo URL.
- Check if the reference for origin/remotes/${defaultbranch} is an ancestor of
this FETCH_HEAD
merge-candidate (fast-forward update).
- Finally, update the reference for origin/remotes/{defaultbranch} to point to
FETCH_HEAD
This patch also fixes a pre-existent logic problem in the method for mocking
the behavior
of 'git merge-base --is-ancestor' and fixes the affected unittests at
checkoutroute.
*
Tools/Scripts/libraries/reporelaypy/reporelaypy/tests/checkoutroute_unittest.py:
(CheckoutRouteUnittest.test_json_details_origin):
(CheckoutRouteUnittest):
(CheckoutRouteUnittest.test_json_strip_details_non_origin_commits):
(CheckoutRouteUnittest.test_json): Deleted.
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/local/git.py:
(Git):
(Git._maybe_update_default_branch_ref_from_fetch_head):
(Git._is_on_default_branch):
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/mocks/local/git.py:
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/test/git_unittest.py:
(TestGit._prepare_fetch_head_commit):
Canonical link: https://commits.webkit.org/301318@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes