sapling icon indicating copy to clipboard operation
sapling copied to clipboard

"slow push" support?

Open skevy opened this issue 2 years ago • 3 comments

One of the repos I'm working with is very large, and has "pre-receive" hooks associated with it...one of which checks for the presence of large files. This is a pretty slow hook, and Github Enterprise only gives 5s to pre-receive hooks to run.

When Sapling initiates a push when running sl pr submit, it tries to push multiple refs at the same time in the same command. On my large repo, it will cause the pre-receive hook to fail (because it takes longer than 5s to run when pushing multiple refs).

I'm wondering if there's an option we can enable to instead run multiple git push commands (either sequentially or in parallel), which would likely be slower and less optimal for most people, but would allow sl pr submit to work for folks with repos like ours.

Thoughts?

skevy avatar Apr 14 '23 14:04 skevy

In local testing -- running a bunch of git commands in parallel seems to work well. Doing this + bounding the parallelism (so we don't spawn 100 git processes for a huge stack or something) might be a good tradeoff.

skevy avatar Apr 14 '23 15:04 skevy

I'm wondering if there's an option we can enable to instead run multiple git push commands (either sequentially or in parallel), which would likely be slower and less optimal for most people, but would allow sl pr submit to work for folks with repos like ours.

There is no such option yet. Making it parallel + limit looks good to me.

zzl0 avatar Apr 14 '23 15:04 zzl0

Will find some time to send a PR. Thanks!

skevy avatar Apr 14 '23 18:04 skevy