Skip to content

Commit f9f4e55

Browse files
Add launch-ec2-runner-with-fallback action
This action is used to launch an EC2 instance (either as a spot instance or a dedicated instance) in a desired availability zone. If no availability, then backup availability zones will be tried until one is successful. Signed-off-by: Courtney Pacheco <[email protected]>
1 parent 68bc43a commit f9f4e55

File tree

18 files changed

+2217
-17
lines changed

18 files changed

+2217
-17
lines changed

.github/workflows/lint.yml

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -52,17 +52,15 @@ jobs:
5252
- name: "ruff"
5353
commands: |
5454
tox -e ruff
55-
## TODO: Uncomment `pylint` once the first in-house, Python-based action is merged
56-
# - name: "pylint"
57-
# commands: |
58-
# echo "::add-matcher::.github/workflows/matchers/pylint.json"
59-
# tox -e fastlint
60-
# tox -e lint
61-
## TODO: Uncomment `mypy` once the first in-house, Python-based action is merged
62-
# - name: "mypy"
63-
# commands: |
64-
# echo "::add-matcher::.github/workflows/matchers/mypy.json"
65-
# tox -e mypy
55+
- name: "pylint"
56+
commands: |
57+
echo "::add-matcher::.github/workflows/matchers/pylint.json"
58+
tox -e fastlint
59+
tox -e lint
60+
- name: "mypy"
61+
commands: |
62+
echo "::add-matcher::.github/workflows/matchers/mypy.json"
63+
tox -e mypy
6664
- name: "yamllint"
6765
commands: |
6866
tox -e yamllint

.isort.cfg

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,9 @@ import_heading_thirdparty=Third Party
77
import_heading_firstparty=First Party
88
import_heading_localfolder=Local
99
known_firstparty=
10-
known_localfolder=tuning
10+
known_localfolder=tuning
11+
12+
# isort falsely flags some GitHub action Python files as problematic, and tries to add
13+
# comments to existing import statements for the wrong reasons. Therefore, we skip these
14+
# files
15+
skip_glob=actions/launch-ec2-runner-with-fallback/launch_ec2_runner/*.py

.yamllint.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,7 @@ rules:
88
line-length:
99
max: 120
1010
allow-non-breakable-words: true
11-
allow-non-breakable-inline-mappings: false
11+
allow-non-breakable-inline-mappings: false
12+
ignore:
13+
# REASON: This file needs lines that are longer than 120 in order to load variables to the env
14+
- /actions/launch-ec2-runner-with-fallback/action.yml

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ Below is a list of the in-house GitHub actions stored in this repository:
1616
| Name | Description | Example Use Cases |
1717
| --- | --- | --- |
1818
| [free-disk-space](./actions/free-disk-space/free-disk-space.md) | Used to reclaim disk space on either a GitHub or EC2 runner. | <ul><li>If a CI job tends to fail due to "insufficient disk space"</li><li>If you want to reduce cloud costs by reclaiming disk space instead of increasing your writeable cloud storage to compensate for a bloated EC2 image</li></ul> |
19+
| [launch-ec2-runner-with-fallback](./actions/launch-ec2-runner-with-fallback/launch-ec2-runner-with-fallback.md) | Used launch an EC2 instance in AWS, either as a spot instance or a dedicated instance. If your preferred availability zone lacks availability for your instance type, "backup" availability zones will be tried. | <ul><li>Insufficient capacity in AWS (i.e., AWS lacks availablility for your desired EC2 instance type in your preferred availability zone)</li><li>Cost savings (i.e., You want to try launching your EC2 runner as a spot instance first)</li></ul> |
1920

2021
## How to Use One or More In-House GitHub Actions
2122

actions/free-disk-space/action.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
1+
# SPDX-License-Identifier: Apache-2.0
2+
13
name: 'Free Disk Space'
24
description: 'Frees disk space on the runner'
5+
author: 'InstructLab'
36
runs:
47
using: "composite"
58
steps:

0 commit comments

Comments
 (0)