Dude Scale My Runners

Dude Scale My Runners

Table of Contents

In our github Enterprise Instance, we use the super-linter to keep all our users honest and lint everything.

While some find it tedious, linting is a valuable tool for improving the quality and reliability of your code and can save time and effort in the long run.

Actions Lint to the rescue

With our use of the super-linter, we were notified when performing a regular pull request of the following issue.

https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/

This is picked up by actionlint under the depreciated command rule as follows:-

on: push

jobs:
  test:
    runs-on: ubuntu-latest
    steps:
      # ERROR: 'set-output' workflow command was deprecated
      - run: echo '::set-output name=foo::bar'
      # OK: Use this instead
      - run: echo "foo=bar" >> "$GITHUB_OUTPUT"
      # OK: 'debug' command is not deprecated
      - run: echo "::debug::Set the Octocat variable"
test.yaml:8:14: workflow command "set-output" was deprecated. use `echo "{name}={value}" >> $GITHUB_OUTPUT` instead: https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions [deprecated-commands]
  |
8 |       - run: echo '::set-output name=foo::bar'
  |              ^~~~

This depreciation was released in November, but we picked it up thanks to our linting over the Christmas break.

Rolling the fix

Now what I wanted to share with the background above - Scaling Self-Hosted runners when we pushed out a fix for this across all our Terraform module repositories 100+.

As described here, we run our Self-Hosted runners in AWS using the fabulous Philips labs solution built with Terraform.

We have a CloudWatch dashboard to give us an overview of what jobs are ticking over and the number of SPOT instances created.

Here it is on a typical week of usage. We hit about 1200 SPOT instances.

The following shows the usage in the afternoon when we kicked off the mass pull request update to fix the workflow jobs.

The gap in the graph is due to a scheduled maintenance event that evening.

And the best part is no issues with the piggy bank!

Summary

The combination of github-actions and AWS SPOT instances enables us to deliver workflow jobs quickly to our users and scale with the demand.

I hope this helps someone else.

Cheers

Share :

Related Posts

Process github Workflow Events with AWS Stepfunctions

Process github Workflow Events with AWS Stepfunctions

This is the next part of integrating github Enterprise Managed User events into the AWS Serverless ecosystem.

Read More
Integrating github with AWS EventBridge

Integrating github with AWS EventBridge

Ever since I saw this announcement, I’ve been dying to get a chance to set it up and play with it. That time is now!

Read More
Possibly the Greatest Log Insights CloudTrail Query Ever!

Possibly the Greatest Log Insights CloudTrail Query Ever!

AWS CloudTrail has a wealth of information that often gets forgotten and unchecked.

Read More