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

Runner package is downloaded every single time #615

Open
DavidGOrtega opened this issue Jun 28, 2021 · 11 comments
Open

Runner package is downloaded every single time #615

DavidGOrtega opened this issue Jun 28, 2021 · 11 comments
Labels
cml-runner Subcommand enhancement New feature or request good-first-issue Good for newcomers (good-first-issue) p2-nice-to-have Low priority

Comments

@DavidGOrtega
Copy link
Contributor

DavidGOrtega commented Jun 28, 2021

Would be faster if we can reuse the already downloaded one, this is specially good for not cloud runners.
We should download the wrapped runner once (GH or GL), install it in the system and make cml-runner to use it always.
If we are changing the SCM we should download the other wrapped runner.

@0x2b3bfa0
Copy link
Member

See the discussion at #580 for context.

Definitely, downloading the self-hosted runner package every single time is suboptimal, but requiring users to download two or more different runner packages along with CML when they just need one or none is equally inconvenient. It would be nice to cache them locally, though.

@0x2b3bfa0
Copy link
Member

Just to justify the good first issue label, runner packages are being downloaded from here:

const url = `https://github.com/actions/runner/releases/download/v${ver}/actions-runner-${arch}-${ver}.tar.gz`;

cml/src/drivers/gitlab.js

Lines 153 to 154 in 6c451d9

const url =
'https://gitlab-runner-downloads.s3.amazonaws.com/latest/binaries/gitlab-runner-linux-amd64';

@DavidGOrtega
Copy link
Contributor Author

Definitely, downloading the self-hosted runner package every single time is suboptimal, but requiring users to download two or more different runner packages along with CML when they just need one or none is equally inconvenient.

I do not follow you here. So Im going to edit the main description.

@0x2b3bfa0
Copy link
Member

I'm going to edit the main description.

Thanks! Now it's much more clear.

@SuTran
Copy link

SuTran commented Sep 24, 2021

Hi @0x2b3bfa0,

I plan to take this, how do you think about the below approach:

I will created a cached folder ${homedir()}/.cml/cached to store the action-runner.tar.gz and add an utils method called checkFileExists to utils.js. I wonder if we need to invalidate the cache sometime?

@dacbd
Copy link
Contributor

dacbd commented Jun 10, 2022

is this still a concern/issue? Im not following what the optimization is supposed to be?

@0x2b3bfa0
Copy link
Member

This is only an “issue” when using cml runner locally; i.e. no --cloud

@0x2b3bfa0 0x2b3bfa0 removed the p1-important High priority label Jun 11, 2022
@0x2b3bfa0
Copy link
Member

Definitely not p1-important

@dacbd
Copy link
Contributor

dacbd commented Jun 13, 2022

I see because each call downloads the gha runner since they aren't aware of previous invocations

@casperdcl casperdcl added the p2-nice-to-have Low priority label Jun 16, 2022
@jancrichter
Copy link

Are there any news on this?

Downloading the gitlab runner binary (50MB) every single time a runner is created considerably slows our pipelines because it has to go through our proxy, where it is scanned, every single time. This means an extra few minutes between triggering runner creation and start of the actual workload.

@dacbd
Copy link
Contributor

dacbd commented Nov 7, 2023

@jancrichter no news on this; unfortunately, it's not yet on the team's priority list. However, If you are willing to do a PR and implement this feature, we would gladly welcome the contribution and will work to get it merged and released asap for you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cml-runner Subcommand enhancement New feature or request good-first-issue Good for newcomers (good-first-issue) p2-nice-to-have Low priority
Projects
None yet
Development

No branches or pull requests

6 participants