Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Checkout with local mirror for self-hosted workers #212

Open
zyga opened this issue Apr 8, 2020 · 3 comments
Open

Checkout with local mirror for self-hosted workers #212

zyga opened this issue Apr 8, 2020 · 3 comments
Labels
question Further information is requested

Comments

@zyga
Copy link

zyga commented Apr 8, 2020

Hello

I'd like to explore a way to expand the checkout action to be able to save bandwidth by fetching bulk of the data needed for the checkout from a locally managed mirror.

In my configuration a number of workers are much closer to a local mirror than to the rest of github. Ideally each worker would register the local remote and fetch baseline from said mirror and only then attempt to load the small delta between that an the commit that is being tested.

I'm open to suggestions and ideas on how this can be achieved.

@ericsciple
Copy link
Contributor

Do you need the full history? If not, actions/checkout@v2 is optimized to fetch only a single commit.

@ericsciple
Copy link
Contributor

Self hosted runners benefit between runs from .git folder. Only git objects that haven't already been fetched are downloaded.

@ericsciple ericsciple added the question Further information is requested label Apr 20, 2020
@zyga
Copy link
Author

zyga commented Apr 22, 2020

@ericsciple hey, thank you for responding!

I don't need the full history but I can save significant bandwidth by synchronizing the full history onto the worker node (and keeping it up-to-date using a timer unit) and only fetching the delta from master.

A single checkout is still relatively significant in my case.

Meanwhile I was looking at the source code and I believe I could introduce a small change where, if a property is set, we first fetch from a helper remote, and then execute the rest of the code path as it is today. I haven't measured it directly but I believe that would bring me some savings.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants