Improve checkout performance on Windows runners by upgrading @actions/github dependency - #1246
Conversation
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
dscho
left a comment
There was a problem hiding this comment.
I confirm that this fixes the abysmal slowness on Windows that was reported in #1186 and that I was able to reproduce.
Well done, @BrettDong!
|
Eagerly awaiting a fix for this; for those of us paying for runners it's not just a convenience, we end up paying significantly more because the checkout step takes the majority of the runner's time, and with a workflow that has a lot of parallel runs, this adds up really quickly. |
|
I've been using this and it was faster, but I just had a run with it that took 1m41s 😖 |
|
Hi @thboop , could you please re-approve the CI checks? Thanks! |
|
Hi @BrettDong, thanks for this PR! Updating to actions/github@v5 is both something we want to do and it sidesteps the whole issue by eliminating our dependency on A few notes / questions:
|
|
The delay from Apart from the |
…/github dependency Re: #1186 @dscho discovered that the checkout action could stall for a considerable amount of time on Windows runners waiting for PowerShell invocations made from 'windows-release' npm package to complete. Then I studied the dependency chain to figure out where 'windows-release' was imported: '@actions/checkout'@main <- '@actions/github'@2.2.0 <- '@octokit/endpoint'@6.0.1 <- '@octokit/graphql'@4.3.1 <- '@octokit/request'@5.4.2 <- '@octokit/rest'@16.43.1 <- 'universal-user-agent'@4.0.1 <- 'os-name'@3.1.0 <- 'windows-release'@3.1.0 'universal-user-agent' package dropped its dependency on 'os-name' in https://github.com/gr2m/universal-user-agent/releases/tag/v6.0.0 . '@actions/github' v3 removed dependency on '@octokit/rest'@16.43.1 and allows users to move away from the old 'universal-user-agent' v4. (actions/toolkit#453) This pull request attempts to update the version of '@actions/github' used in the checkout action to avoid importing 'windows-release'. Based on testing in my own repositories, I can see an improvement in reduced wait time between entering the checkout action and git actually starts to do useful work.
I never used large runners and I don't understand what issue you are referring to. |
|
Hey @BrettDong , thanks for putting this together, I'd love to get this merged and released. It looks like the breaking change in the new major version of |
|
I did not run |
|
Thanks for your contribution @BrettDong Small side-note, did you need to manually recognise the MIT license of |
I manually updated the yaml, following licensed documentation. |
The PR actions#1246 replaced the `getOctokit` method from the `octokit-provider.ts` file with the `getOctokit` method from the `@actions/github` package. The octokit-provider was previously responsible for creating an Octokit instance and setting the `baseUrl` via the `getServerApiUrl` helper function. This function calls `getServerUrl` which reads the server url from the `GITHUB_SERVER_URL` environment variable, which on GHES is set to the enterprise instance. This commit restores the previous behaviour by calling `getServerApiUrl` in all places where an octokit instance is created. Co-authored-by: Markus Wolf <mail@markus-wolf.de>
|
This PR breaks GHES compatibility in case |
Re: #1186
@dscho discovered that the checkout action could stall for a considerable amount of time on Windows runners waiting for PowerShell invocations made from 'windows-release' npm package to complete.
Then I studied the dependency chain to figure out where 'windows-release' was imported:
'universal-user-agent' package dropped its dependency on 'os-name' in v6 (https://github.com/gr2m/universal-user-agent/releases/tag/v6.0.0).
'@actions/github' v3 removed dependency on '@octokit/rest'@16.43.1 and allows users to move away from the old 'universal-user-agent' v4. (actions/toolkit#453)
This pull request attempts to update the version of '@actions/github' used in the checkout action to avoid importing 'windows-release'.
Based on testing in my own repositories, I can see an improvement in reduced wait time between entering the checkout action and git actually starts to do useful work.