Skip to content

Commit dd129d3

Browse files
committed
chore: fix wording
1 parent 820be0b commit dd129d3

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

_posts/2024-08-06-macos-large-runners.markdown

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,14 @@ categories: eclipse
77
comments_id: 29
88
---
99

10-
In 2023, GitHub introduced new powerful macOS runners for GitHub Actions.
10+
In 2023, GitHub introduced new powerful `macOS runners` for GitHub Actions.
1111
These [runners](https://docs.github.com/en/actions/using-github-hosted-runners/about-larger-runners/running-jobs-on-larger-runners?platform=mac#available-macos-larger-runners)
1212
have a considerable higher amount of processors / memory and disk space allocated to them to speed up the execution of workflows.
1313
This advantage comes at a cost though, as billing per minute of executed workflow time is considerably higher as compared to normal runners (see [billing for runners](https://docs.github.com/en/billing/managing-billing-for-github-actions/about-billing-for-github-actions)),
1414
on top of the usual minute multiplier for macOS runners (each minute of executed workflow time on a macOS runner counts as 10 minutes for billing purposes).
1515

1616
<br/>
17-
In order to use such a macOS large runner, you can simply add a `runs-on: <runner-type>` to your job definition, e.g. using `macos-latest-large` as runner type:
17+
In order to use such a `macOS large runner`, you can simply add a `runs-on: <runner-type>` to your job definition, e.g. using `macos-latest-large` as runner type:
1818

1919
{% highlight yaml %}
2020
name: learn-github-actions-testing
@@ -31,38 +31,38 @@ jobs:
3131
{% endhighlight %}
3232

3333
<br/>
34-
Additionally, your organization needs to have a `GitHub Team` or `GitHub Enterprise Cloud` plan to be able to use such a macOS large runner (which is now the case for all Eclipse projects hosted on GitHub as of 2024), otherwise workflows using such a runner will fail to run. Once your organization is eligible to use large runners, you probably want to control the access to such runners for the repositories in your organization
34+
Additionally, your organization needs to have a `GitHub Team` or `GitHub Enterprise Cloud` plan to be able to use such a `macOS large runner` (which is now the case for all Eclipse projects hosted on GitHub as of 2024), otherwise workflows using such a runner will fail to run. Once your organization is eligible to use large runners, you probably want to control the access to such runners for the repositories in your organization
3535
to avoid surprises when you receive your next invoice. GitHub offers a convenient way to define [runner groups](https://docs.github.com/en/actions/using-github-hosted-runners/about-larger-runners/controlling-access-to-larger-runners) to control which repositories can access such large runners.
3636

3737
<br/>
38-
Unfortunately, such runner groups can only be defined for `linux` and `windows` runners, there is simply no way to prevent that `macOS` large runners are being used by any of your repositories once their use is configured in a workflow as described above.
38+
Unfortunately, such runner groups can only be defined for `linux` and `windows` runners, there is simply no way to prevent that `macOS large runners` are being used by any of your repositories once their use is configured in a workflow as described above.
3939
This poses a problem for non-profit organizations (like the [Eclipse Foundation](https://www.eclipse.org)) that host a lot of projects and their associated repositories on GitHub as it might result in higher than expected billing expenses as some projects try using such large runners
4040
to speed up their workflows without realizing the consequences.
4141

4242
<br/>
4343
While it is possible to monitor the incurred costs of using GitHub Action minutes, this is a tedious and manual task and requires communication with projects to change their workflows if occurrences have been identified.
4444

4545
<br/>
46-
The idea was born to add some automation to prevent the execution of workflows on such `macOS` large runners unless the project / repository is entitled to use such a runner.
46+
The idea was born to add some automation to prevent the execution of workflows on such `macOS large runners` unless the project / repository is entitled to use such a runner.
4747

4848
<br/>
49-
After studying the available [GitHub Rest API](https://docs.github.com/en/rest?apiVersion=2022-11-28) and preliminary testing, we figured out the following logic reliably prevents the execution of workflows on large runners:
49+
After studying the available [GitHub Rest API](https://docs.github.com/en/rest?apiVersion=2022-11-28) and preliminary testing, we figured out the following logic reliably prevents the execution of workflows on `macOS large runners`:
5050

5151
- listen to [workflow_job events](https://docs.github.com/en/webhooks/webhook-events-and-payloads?actionType=queued#workflow_job) with action `queued`
52-
- check whether the included `workflow_job` object has `labels` that indicate that the job is supposed to run on a macOS large runner
52+
- check whether the included `workflow_job` object has `labels` that indicate that the job is supposed to run on a `macOS large runner`
5353
- if the above evaluates to true and the repository is not eligible to use such a runner, [cancel the workflow_run](https://docs.github.com/en/rest/actions/workflow-runs?apiVersion=2022-11-28#cancel-a-workflow-run)
5454

5555
<br/>
56-
To receive the necessary webhook events from GitHub in case a workflow is being scheduled to run you have to set up an organization or repository webhook, listen for the events and apply the logic.
56+
To receive the necessary webhook events from GitHub in case a workflow is being queued to run, you have to set up an organization or repository webhook, listen for the event and apply the logic.
5757

5858
<br/>
5959
At the [Eclipse Foundation](https://www.eclipse.org) we are operating an open-source project called [Otterdog](https://github.com/eclipse-csi/otterdog) in order to configure our numerous organizations and repositories hosted on GitHub at scale.
6060
This tool is effectively a GitHub App and is installed for all our projects / organizations on GitHub and already can listen to various events sent from GitHub. So naturally we added the above logic to this tool and allowed to define
6161
which organizations are allowed to use such large runners via a configuration file (see [this](https://github.com/eclipse-tractusx/.eclipsefdn/blob/main/otterdog/policies/macos_large_runners.yml) example).
6262

6363
<br/>
64-
This allows us to control the use of macOS large runners which unfortunately is not yet possible through any of the administration consoles at GitHub.
64+
This allows us to control the use of `macOS large runners` which unfortunately is not yet possible through any of the administration consoles at GitHub.
6565
On the other hand, our implemented workaround showcases the power of GitHub Apps on how you can utilize them to adjust your GitHub experience to your organizational needs.
6666

6767
<br/>
68-
Feel free to leave comments on other useful things that you would like to see in the near future.
68+
If you are member of an Eclipse project and would like to utilize macOS large runners for your workflows, reach out to us via the [HelpDesk](https://gitlab.eclipse.org/eclipsefdn/helpdesk/).

0 commit comments

Comments
 (0)