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

Downloading action repository to self-hosted runner takes 2.5 minutes #103

Closed
joloEqui opened this issue Apr 16, 2021 · 13 comments
Closed
Labels
idle Inactive for 14 days performance-issue Performance improvement required

Comments

@joloEqui
Copy link

Every time I run my workflow on my self-hosted runner it has to redownload the whole action repository which takes 2.5 minutes. This is the step in my workflow log: Download action repository 'azure/login@v1'.

I am not sure if this is a more general issue in GitHub Actions, where the action repository is redownloaded every time even if it is the exact same version being used each run. But since the other actions I use are downloaded in a matter of seconds and this action takes 2.5 minutes I opened the issue here.

Also I have looked into using the cache action, but can't figure out how to use it for caching "external" actions, or if that is possible at all, that's also why I have opened this issue.

@joloEqui joloEqui added the need-to-triage Requires investigation label Apr 16, 2021
@johanclasson
Copy link

When checking the downloaded files at _work\_actions\Azure\login\v1 I can see that the node_modules folder is part of the plugin.

Can you consider compiling in the dependencies that is needed so that the node_modules does not need to be downloaded? The GitHub docs (ref.) mention a tool called vercel/ncc.

@joloEqui
Copy link
Author

Btw, my solution was to just use az cli to login instead of the login action.

@BALAGA-GAYATRI BALAGA-GAYATRI added performance-issue Performance improvement required and removed need-to-triage Requires investigation labels May 12, 2021
@github-actions
Copy link

github-actions bot commented Jun 2, 2021

This issue is marked need-to-triage for generating issues report.

@github-actions github-actions bot added the need-to-triage Requires investigation label Jun 2, 2021
@BALAGA-GAYATRI BALAGA-GAYATRI removed the need-to-triage Requires investigation label Jun 3, 2021
@github-actions
Copy link

This issue is idle because it has been open for 14 days with no activity.

@github-actions github-actions bot added the idle Inactive for 14 days label Jun 17, 2021
@andrewwiebe
Copy link

Yeah same issue, its 3 mins just to download the action every single run.

@github-actions github-actions bot removed the idle Inactive for 14 days label Sep 15, 2021
@andrewwiebe
Copy link

Btw, my solution was to just use az cli to login instead of the login action.

Do you have a quick code example of how you handled this?

@joloEqui
Copy link
Author

Yep.

$Credential = ConvertFrom-Json($env:SERVICE_PRINCIPAL)
az login --service-principal -u $Credential.appId -p $Credential.password --tenant $Credential.tenant --allow-no-subscriptions

@andrewwiebe
Copy link

Yep.

$Credential = ConvertFrom-Json($env:SERVICE_PRINCIPAL)
az login --service-principal -u $Credential.appId -p $Credential.password --tenant $Credential.tenant --allow-no-subscriptions

Thank you very much for this. I will have to try this out using a github secret.

@github-actions
Copy link

github-actions bot commented Oct 1, 2021

This issue is idle because it has been open for 14 days with no activity.

@github-actions github-actions bot added the idle Inactive for 14 days label Oct 1, 2021
@AjayKaleMS
Copy link

Yep.
$Credential = ConvertFrom-Json($env:SERVICE_PRINCIPAL)
az login --service-principal -u $Credential.appId -p $Credential.password --tenant $Credential.tenant --allow-no-subscriptions

Thank you very much for this. I will have to try this out using a github secret.

I also faced this same download taking time for almost 2 mins every time.
When I tried above suggested code, I am still facing the issue. Below is my final action code:

jobs:

build-and-deploy:
runs-on: self-hosted
steps:
- uses: actions/checkout@v2
- uses: azure/login@v1
with:
creds: ${{ secrets.AZURE_CREDENTIALS }}
- run: |
az login --service-principal -u $creds.appId -p $creds.password --tenant $creds.tenant --allow-no-subscriptions
az webapp list --query "[?state=='Running']"

@github-actions github-actions bot removed the idle Inactive for 14 days label Oct 6, 2021
@github-actions
Copy link

This issue is idle because it has been open for 14 days with no activity.

@github-actions github-actions bot added the idle Inactive for 14 days label Oct 20, 2021
@BALAGA-GAYATRI
Copy link
Contributor

Screenshot 2022-05-12 at 11 18 48 PM

Recently tested a few samples of the self-hosted runner download time for login action. All of them shows similar times. It is taking around 10-12 seconds including downloading, unwrapping and archiving the action repo. So closing this issue as this seems like an intermittent issue.

@kWozniak-tt
Copy link

Screenshot 2022-05-12 at 11 18 48 PM

Recently tested a few samples of the self-hosted runner download time for login action. All of them shows similar times. It is taking around 10-12 seconds including downloading, unwrapping and archiving the action repo. So closing this issue as this seems like an intermittent issue.

@BALAGA-GAYATRI This problem unfortunately still exists.
image
#366

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
idle Inactive for 14 days performance-issue Performance improvement required
Projects
None yet
Development

No branches or pull requests

6 participants