WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
275693
KeyError: '8e2703a62c3ac7282b9f96744a53646a89b59c9a' when running 'git-webkit pr'
https://bugs.webkit.org/show_bug.cgi?id=275693
Summary
KeyError: '8e2703a62c3ac7282b9f96744a53646a89b59c9a' when running 'git-webkit...
Michael Catanzaro
Reported
2024-06-20 09:25:54 PDT
I can't use 'git-webkit pr' anymore. Not sure what's going wrong, but it thinks something is very special about 8e2703a62c3ac7282b9f96744a53646a89b59c9a (which is
279551@main
). $ git-webkit -v pr INFO:webkitscmpy:Using committed changes... INFO:webkitscmpy:Rebasing 'eng/WPEGTK-IPC-socket-should-use-SOCK_CLOEXEC-on-Linux' on 'main'... From
https://github.com/WebKit/WebKit
* branch main -> FETCH_HEAD Current branch eng/WPEGTK-IPC-socket-should-use-SOCK_CLOEXEC-on-Linux is up to date. Traceback (most recent call last): File "/home/mcatanzaro/Projects/WebKit/Tools/Scripts/git-webkit", line 63, in <module> sys.exit(program.main( ^^^^^^^^^^^^^ File "/home/mcatanzaro/Projects/WebKit/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/__init__.py", line 185, in main return parsed.main( ^^^^^^^^^^^^ File "/home/mcatanzaro/Projects/WebKit/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/pull_request.py", line 769, in main return cls.create_pull_request(repository, args, branch_point) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/mcatanzaro/Projects/WebKit/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/pull_request.py", line 424, in create_pull_request if repository.pull(rebase=True, branch=branch_point.branch, remote=source_remote): ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/mcatanzaro/Projects/WebKit/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/local/git.py", line 1237, in pull self.cache.clear(self.branch) File "/home/mcatanzaro/Projects/WebKit/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/local/git.py", line 225, in clear self._fill(branch) File "/home/mcatanzaro/Projects/WebKit/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/local/git.py", line 84, in _fill branch_point = int(self._hash_to_identifiers[self._ordered_commits[branch][0]].split('@')[0]) ~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/mcatanzaro/Projects/WebKit/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/nested_fuzzy_dict.py", line 53, in __getitem__ raise KeyError(keyname) KeyError: '8e2703a62c3ac7282b9f96744a53646a89b59c9a'
Attachments
Michael's identifiers.json
(267.10 KB, application/json)
2025-09-04 08:24 PDT
,
Michael Catanzaro
no flags
Details
View All
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2024-06-27 09:26:13 PDT
<
rdar://problem/130680688
>
Sam Sneddon [:gsnedders]
Comment 2
2024-06-27 16:20:32 PDT
We really need to handle errors like this within webkitscmpy, but "rm $( git rev-parse --git-common-dir )/identifiers.json" should fix this (by forcing the cache to be recreated).
Michael Catanzaro
Comment 3
2024-06-27 16:27:43 PDT
I can confirm that works. Nice!
Alexey Proskuryakov
Comment 4
2024-06-27 16:55:49 PDT
Did you happen to keep the cache, to identify what was wrong?
Michael Catanzaro
Comment 5
2024-06-28 05:56:21 PDT
Unfortunately no, but I can guess what caused it: Ctrl+C. I do that often enough and probably shouldn't.
Sam Sneddon [:gsnedders]
Comment 6
2024-06-28 11:35:39 PDT
(In reply to Alexey Proskuryakov from
comment #4
)
> Did you happen to keep the cache, to identify what was wrong?
With similar issues, it's historically not been super helpful having the cache — like, it merely shows us that "yes, this is in fact broken", but doesn't tell us _how_ it got into that state. If it's caused by running Ctrl+C while updating the cache, especially happens while we're blocked on a subprocess, that's something that we should be handling when the subprocess exits with SIGINT. IMO, this is still actionable (both via checking we're handling that reasonably and by falling back to regenerating the cache when we do get a KeyError/IndexError here), thus -> REOPENED.
Alexey Proskuryakov
Comment 7
2024-06-28 17:30:20 PDT
Let's file a new clean bug with a plan though. "KeyError: '8e2703a62c3ac7282b9f96744a53646a89b59c9a' when running 'git-webkit pr'" is no longer accurate.
Michael Catanzaro
Comment 8
2025-09-04 07:12:10 PDT
Hitting this again now. Looks the same as before, only difference is the commit hash is different: Traceback (most recent call last): File "/home/mcatanzaro/Projects/WebKit/Tools/Scripts/git-webkit", line 63, in <module> sys.exit(program.main( ~~~~~~~~~~~~^ identifier_template=is_webkit_filter('Canonical link:
https://commits.webkit.org/
{}'), ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ...<2 lines>... classifier=is_webkit_filter(classifier()), ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ )) ^ File "/home/mcatanzaro/Projects/WebKit/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/__init__.py", line 184, in main return parsed.main( ~~~~~~~~~~~^ args=parsed, ^^^^^^^^^^^^ ...<5 lines>... canonical_svn=canonical_svn, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ) ^ File "/home/mcatanzaro/Projects/WebKit/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/pull_request.py", line 776, in main return cls.create_pull_request(repository, args, branch_point) ~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/mcatanzaro/Projects/WebKit/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/pull_request.py", line 439, in create_pull_request if repository.pull(rebase=True, branch=branch_point.branch, remote=source_remote): ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/mcatanzaro/Projects/WebKit/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/local/git.py", line 1258, in pull self.cache.clear(self.branch) ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^ File "/home/mcatanzaro/Projects/WebKit/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/local/git.py", line 222, in clear self._fill(branch) ~~~~~~~~~~^^^^^^^^ File "/home/mcatanzaro/Projects/WebKit/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/local/git.py", line 84, in _fill branch_point = int(self._hash_to_identifiers[self._ordered_commits[branch][0]].split('@')[0]) ~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/mcatanzaro/Projects/WebKit/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/nested_fuzzy_dict.py", line 53, in __getitem__ raise KeyError(keyname) KeyError: '405782ff2e808caa3d518d03fc5de7b15de8098b' This time I know not to delete the cache. I presume I used Ctrl+C again, and that we need to catch the KeyError and rebuild the cache. Alternatively or additionally, we could try catching and handling KeyboardInterrupt to prevent things from going wrong in the first place.
Michael Catanzaro
Comment 9
2025-09-04 08:24:35 PDT
Created
attachment 476638
[details]
Michael's identifiers.json
Michael Catanzaro
Comment 10
2025-09-04 08:25:14 PDT
Pull request:
https://github.com/WebKit/WebKit/pull/50305
EWS
Comment 11
2025-09-05 13:21:31 PDT
Committed
299639@main
(22f2cf717f6c): <
https://commits.webkit.org/299639@main
> Reviewed commits have been landed. Closing PR #50305 and removing active labels.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug