<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>243283</bug_id>
          
          <creation_ts>2022-07-27 21:28:48 -0700</creation_ts>
          <short_desc>[git-webkit] Update fork via API instead of local push</short_desc>
          <delta_ts>2023-04-26 11:00:08 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Tools / Tests</component>
          <version>Safari Technology Preview</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          <see_also>https://bugs.webkit.org/show_bug.cgi?id=255999</see_also>
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>239082</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Simon Fraser (smfr)">simon.fraser</reporter>
          <assigned_to name="Jonathan Bedard">jbedard</assigned_to>
          <cc>aakash_jain</cc>
    
    <cc>ap</cc>
    
    <cc>jbedard</cc>
    
    <cc>ryanhaddad</cc>
    
    <cc>simon.fraser</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1887264</commentid>
    <comment_count>0</comment_count>
    <who name="Simon Fraser (smfr)">simon.fraser</who>
    <bug_when>2022-07-27 21:28:48 -0700</bug_when>
    <thetext>LayoutTests % git webkit pr --no-update --issue 237812
Switched to a new branch &apos;eng/iOS-editingspellingediting-word-with-marker-1-html-causes-the-subsequent-test-to-time-out&apos;
Created the local development branch &apos;eng/iOS-editingspellingediting-word-with-marker-1-html-causes-the-subsequent-test-to-time-out&apos;
Branch &apos;main&apos; set up to track remote branch &apos;main&apos; from &apos;origin&apos;.
  Running status to find changed, added, or removed files.
  Reviewing diff to determine which lines changed.
  Extracting affected function names from source files.
  Change author: Simon Fraser &lt;simon.fraser@apple.com&gt;.
[eng/iOS-editingspellingediting-word-with-marker-1-html-causes-the-subsequent-test-to-time-out c1db7877e96e] [iOS] editing/spelling/editing-word-with-marker-1.html causes the subsequent test to time out https://bugs.webkit.org/show_bug.cgi?id=237812 &lt;rdar://90529903&gt;
 Date: Wed Jul 27 21:20:25 2022 -0700
 4 files changed, 26 insertions(+), 15 deletions(-)
 create mode 100644 LayoutTests/platform/ios-wk2/editing/spelling/editing-word-with-marker-1-expected.txt
    Found 1 commit...
Total errors found: 0 in 2 files
Enumerating objects: 3336, done.
Counting objects: 100% (3336/3336), done.
Delta compression using up to 20 threads
Compressing objects: 100% (1577/1577), done.
Writing objects: 100% (2672/2672), 6.47 MiB | 791.00 KiB/s, done.
Total 2672 (delta 1725), reused 1855 (delta 1025), pack-reused 0
[no more output]

Can&apos;t tell if this is a GitHub outage or something else.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1887265</commentid>
    <comment_count>1</comment_count>
    <who name="Simon Fraser (smfr)">simon.fraser</who>
    <bug_when>2022-07-27 21:31:45 -0700</bug_when>
    <thetext>Interrupting gave:
^CTraceback (most recent call last):
  File &quot;/AppleInternal/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/subprocess.py&quot;, line 1764, in _try_wait
    (pid, sts) = os.waitpid(self.pid, wait_flags)
KeyboardInterrupt

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File &quot;/Volumes/Data/Development/system/webkit/Internal/Tools/Scripts/git-webkit&quot;, line 89, in &lt;module&gt;
    sys.exit(program.main(
  File &quot;/Volumes/WebKit/OpenSource/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/__init__.py&quot;, line 148, in main
    return parsed.main(
  File &quot;/Volumes/WebKit/OpenSource/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/pull_request.py&quot;, line 507, in main
    return cls.create_pull_request(repository, args, branch_point)
  File &quot;/Volumes/WebKit/OpenSource/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/pull_request.py&quot;, line 382, in create_pull_request
    if run([repository.executable(), &apos;push&apos;, &apos;-f&apos;, target, repository.branch], cwd=repository.root_path).returncode:
  File &quot;/Volumes/WebKit/OpenSource/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/subprocess_utils.py&quot;, line 51, in run
    return subprocess.run(*popenargs, timeout=timeout, **kwargs)
  File &quot;/AppleInternal/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/subprocess.py&quot;, line 495, in run
    stdout, stderr = process.communicate(input, timeout=timeout)
  File &quot;/AppleInternal/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/subprocess.py&quot;, line 1020, in communicate
    self.wait()
  File &quot;/AppleInternal/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/subprocess.py&quot;, line 1083, in wait
    return self._wait(timeout=timeout)
  File &quot;/AppleInternal/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/subprocess.py&quot;, line 1806, in _wait
    (pid, sts) = self._try_wait(0)
  File &quot;/AppleInternal/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/subprocess.py&quot;, line 1764, in _try_wait
    (pid, sts) = os.waitpid(self.pid, wait_flags)
KeyboardInterrupt</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1887266</commentid>
    <comment_count>2</comment_count>
    <who name="Simon Fraser (smfr)">simon.fraser</who>
    <bug_when>2022-07-27 21:32:41 -0700</bug_when>
    <thetext>Reapting the same command gives:

LayoutTests % git webkit pr --no-update --issue 237812
Creating a pull-request for &apos;237812&apos; but we&apos;re on &apos;eng/iOS-editingspellingediting-word-with-marker-1-html-causes-the-subsequent-test-to-time-out&apos;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1887268</commentid>
    <comment_count>3</comment_count>
    <who name="Simon Fraser (smfr)">simon.fraser</who>
    <bug_when>2022-07-27 21:44:52 -0700</bug_when>
    <thetext>With verbose logging:

INFO:webkitscmpy:Pushing &apos;eng/iOS-editingspellingediting-word-with-marker-1-html-causes-the-subsequent-test-to-time-out&apos; to &apos;fork&apos;...
Enumerating objects: 3350, done.
Counting objects: 100% (3350/3350), done.
Delta compression using up to 20 threads
Compressing objects: 100% (1586/1586), done.
Writing objects: 100% (2681/2681), 6.47 MiB | 960.00 KiB/s, done.
Total 2681 (delta 1732), reused 1855 (delta 1025), pack-reused 0</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1887269</commentid>
    <comment_count>4</comment_count>
    <who name="Simon Fraser (smfr)">simon.fraser</who>
    <bug_when>2022-07-27 21:57:27 -0700</bug_when>
    <thetext>LayoutTests % GIT_TRACE=1 GIT_TRANSFER_TRACE=1 GIT_CURL_VERBOSE=1 git push fork -f -v

[lots of logging)
21:55:46.877281 http.c:703              &lt;= Recv header, 0000000023 bytes (0x00000017)
21:55:46.877284 http.c:715              &lt;= Recv header: x-frame-options: DENY
21:55:46.877286 http.c:703              &lt;= Recv header, 0000000055 bytes (0x00000037)
21:55:46.877288 http.c:715              &lt;= Recv header: x-github-request-id: C0FF:9D5A:824128:997753:62E216D2
21:55:46.877291 http.c:703              &lt;= Recv header, 0000000002 bytes (0x00000002)
21:55:46.877293 http.c:715              &lt;= Recv header:
Writing objects: 100% (2672/2672), 6.47 MiB | 972.00 KiB/s, done.
Total 2672 (delta 1725), reused 1855 (delta 1025), pack-reused 0

and nothing more.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1887273</commentid>
    <comment_count>5</comment_count>
    <who name="Simon Fraser (smfr)">simon.fraser</who>
    <bug_when>2022-07-27 22:15:41 -0700</bug_when>
    <thetext>I did a `git fetch fork` and it magically resolved this.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1887434</commentid>
    <comment_count>6</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2022-07-28 13:30:20 -0700</bug_when>
    <thetext>&lt;rdar://problem/97741202&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1904994</commentid>
    <comment_count>7</comment_count>
    <who name="Simon Fraser (smfr)">simon.fraser</who>
    <bug_when>2022-10-11 21:32:00 -0700</bug_when>
    <thetext>Still seeing this; seems worse when my fork is more out of date.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1950091</commentid>
    <comment_count>8</comment_count>
    <who name="Jonathan Bedard">jbedard</who>
    <bug_when>2023-04-20 09:03:59 -0700</bug_when>
    <thetext>I&apos;m going to use this bug to track removing of what I believe to be the offending push in most workflows.

What I believe is going on here is that we&apos;re attempting to update `main` in your personal fork by push hundreds or thousands of commits from your local checkout to your personal fork. According to GitHub&apos;s documentation, this is the correct way to update a local fork with raw `git` tools. Unsurprisingly, though, this is a slow operation. To make things worse, this operation gets slower as we add more protections in our pre-push hook. Pushing commits costs both local compute and network traffic which scales with the number of commits behind a fork is.

However, we don&apos;t actually need to push _any_ pre-existing commits in principle, because GitHub already has all these commits server-side because the pre-existing commits are originating from `WebKit/WebKit`. We should be able to invoke https://docs.github.com/en/rest/branches/branches#sync-a-fork-branch-with-the-upstream-repository before we do any pushes, then the only commits we&apos;re actually pushing are the ones a contributor has created locally.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1950107</commentid>
    <comment_count>9</comment_count>
    <who name="Jonathan Bedard">jbedard</who>
    <bug_when>2023-04-20 10:16:13 -0700</bug_when>
    <thetext>Pull request: https://github.com/WebKit/WebKit/pull/12978</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1950426</commentid>
    <comment_count>10</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2023-04-21 11:07:21 -0700</bug_when>
    <thetext>Committed 263251@main (556bf5c84d3e): &lt;https://commits.webkit.org/263251@main&gt;

Reviewed commits have been landed. Closing PR #12978 and removing active labels.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>