git-for-windows / git-for-windows-automation

A few GitHub workflows and support code to help with Git for Windows' day-to-day tasks
10 stars 9 forks source link

Self hosted runner: update image and make configurable through env vars #60

Closed dennisameling closed 2 months ago

dennisameling commented 7 months ago

Updates the self hosted runner image and also makes it configurable through env vars.

Note: the rest of this PR description was for an older version of this PR and therefore collapsed.

See prior PR description As discussed [here](https://github.com/git-for-windows/git-for-windows-automation/issues/59#issuecomment-1821185442), let's add some cleanup logic for Azure VMs that we no longer need. > Another idea: we should be able to teach GitForWindowsHelper to detect failed create-self-hosted-runner runs and automatically kick off the delete run, no? In this PR, I added logic that goes through the resource group and deletes leftover VMs. That way, it's not strictly linked to failed runs. I think this is a more robust way to ensure leftover VMs are deleted, but very much open to ideas and feedback. > And _maybe_ also try re-running the failed run, up to five times? By "failed run", do you mean the run that creates the self hosted runner, or the run that does the actual build of GfW ARM64? Assuming you mean the former, we'll probably have to add some logic [here](https://github.com/git-for-windows/gfw-helper-github-app/blob/main/GitForWindowsHelper/index.js) to detect when a run that creates a self hosted runner has failed, then retry, right? Not sure if that's worth the effort tbh, as these jobs have been rock-solid until I tried again yesterday after some time of not doing it. It probably deserves some more investigation to ensure that VMs are created reliably again.
dscho commented 2 months ago

@dennisameling in the interest not to let the perfect be the enemy of the good, how about dropping https://github.com/git-for-windows/git-for-windows-automation/pull/60/commits/f428d14f1fbeb550d1f56c4413fab7b9cb205ee6 and then merging this here PR?

dennisameling commented 2 months ago

@dennisameling in the interest not to let the perfect be the enemy of the good, how about dropping https://github.com/git-for-windows/git-for-windows-automation/commit/f428d14f1fbeb550d1f56c4413fab7b9cb205ee6 and then merging this here PR?

Works for me! I've been really time-constrained lately, sorry for not responding earlier.