lhotari opened a new pull request #8394:
URL: https://github.com/apache/pulsar/pull/8394


   ### Motivation
   
   There's a significant different in performance when using a shallow
   clone. 125 seconds vs. 10 seconds to clone Pulsar on a 100Mbps internet
   connection. 568MB vs. 16MB was transferred.
   
   example benchmark of cloning full vs. shallow (--depth=25):
   ```
   $ time git clone https://github.com/apache/pulsar.git pp
   Cloning into 'pp'...
   remote: Enumerating objects: 601, done.
   remote: Counting objects: 100% (601/601), done.
   remote: Compressing objects: 100% (340/340), done.
   remote: Total 1207163 (delta 473), reused 296 (delta 226), pack-reused 
1206562
   Receiving objects: 100% (1207163/1207163), 568.24 MiB | 5.66 MiB/s, done.
   Resolving deltas: 100% (862029/862029), done.
   git clone https://github.com/apache/pulsar.git pp  122,95s user 9,60s system 
105% cpu 2:05,23 total
   $ time git clone --depth=25 https://github.com/apache/pulsar.git pp2
   Cloning into 'pp2'...
   remote: Enumerating objects: 7699, done.
   remote: Counting objects: 100% (7699/7699), done.
   remote: Compressing objects: 100% (5239/5239), done.
   remote: Total 7699 (delta 3120), reused 3707 (delta 1177), pack-reused 0
   Receiving objects: 100% (7699/7699), 16.16 MiB | 2.85 MiB/s, done.
   Resolving deltas: 100% (3120/3120), done.
   git clone --depth=25 https://github.com/apache/pulsar.git pp2  2,24s user 
0,64s system 31% cpu 9,152 total
   ```
   
   Currently for the Pulsar Github workflows, it's only the [diff-only 
action](https://github.com/apache/pulsar-test-infra/blob/master/diff-only/entrypoint.sh)
 that depends on having all PR commits in the checked out local git repository. 
Therefore setting the value to 25 is reasonable. The 25th oldest commit would 
contain all changes so beyond
   that point, the diff-only action produce the correct result. That's
   a non critical critical issue since diff-only is used to detect if
   the PR contains only documentation changes. It simply wouldn't be able
   to do the detection if the PR has more than 25 commits. (the fetch-depth
   limit could be increase if 25 isn't enough)
   
   ### Modifications
   
   Change the fetch-depth of check action to 25 instead of 0 which does a full 
clone.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to