Bug 223820

Summary: [webkit-patch] Use commit.webkit.org instead of remote SVN to compute identifier
Product: WebKit Reporter: Jonathan Bedard <jbedard>
Component: Tools / TestsAssignee: Jonathan Bedard <jbedard>
Status: RESOLVED FIXED    
Severity: Normal CC: dewei_zhu, ews-watchlist, glenn, slewis, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch none

Description Jonathan Bedard 2021-03-26 14:36:22 PDT
Folks have objected to the time it takes to cache remote subversion data required to compute identifiers. Consulting commits.webkit.org will be faster.
Comment 1 Radar WebKit Bug Importer 2021-03-26 14:36:34 PDT
<rdar://problem/75902125>
Comment 2 Jonathan Bedard 2021-03-26 14:39:03 PDT
Created attachment 424406 [details]
Patch
Comment 3 dewei_zhu 2021-03-26 14:44:22 PDT
Comment on attachment 424406 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=424406&action=review

> Tools/Scripts/webkitpy/tool/comments.py:42
> +    repr = 'r{}'.format(svn_revision)
> +    response = requests.get('https://commits.webkit.org/{}/json'.format(repr))
> +    if response.status_code == 200:
> +        repr = response.json().get('identifier', repr)
> +    return 'Committed r{} ({}): <{}>'.format(svn_revision, repr if '@' in repr else '?', urls.view_identifier_url(repr))

Should we consider using svn.webkit.org as a fallback just in case the former is down?
Comment 4 dewei_zhu 2021-03-26 14:44:51 PDT
r=me with comment.
Comment 5 Jonathan Bedard 2021-03-26 14:51:30 PDT
(In reply to dewei_zhu from comment #3)
> Comment on attachment 424406 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=424406&action=review
> 
> > Tools/Scripts/webkitpy/tool/comments.py:42
> > +    repr = 'r{}'.format(svn_revision)
> > +    response = requests.get('https://commits.webkit.org/{}/json'.format(repr))
> > +    if response.status_code == 200:
> > +        repr = response.json().get('identifier', repr)
> > +    return 'Committed r{} ({}): <{}>'.format(svn_revision, repr if '@' in repr else '?', urls.view_identifier_url(repr))
> 
> Should we consider using svn.webkit.org as a fallback just in case the
> former is down?

It's possible to use svn.webkit.org as a fallback, but the failure condition is pretty mild: you end up with this:
Committed r1234 (?) <https://commits.webkit.org/r1234> , I feel like defending the failure isn't worth maintaining the defense
Comment 6 EWS 2021-03-26 16:10:18 PDT
Committed r275119: <https://commits.webkit.org/r275119>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 424406 [details].