Skip to content

Commit

Permalink
Merge branch 'master' into db/nargo-show-artifact-paths
Browse files Browse the repository at this point in the history
  • Loading branch information
dbanks12 authored May 24, 2024
2 parents 93ed10e + e0bb743 commit fc8814b
Show file tree
Hide file tree
Showing 912 changed files with 27,149 additions and 11,699 deletions.
2 changes: 1 addition & 1 deletion .github/ensure-builder/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ runs:
echo "runner_label=$USERNAME-$runner_type" >> $GITHUB_OUTPUT
if [[ $TYPE == builder-x86 ]]; then
# 128-core x86 instance types, aws chooses for us based on capacity
echo "instance_type=i4i.32xlarge m6a.32xlarge m6i.32xlarge m6id.32xlarge m6idn.32xlarge m6in.32xlarge m7a.32xlarge r6a.32xlarge r6i.32xlarge r6id.32xlarge r6in.32xlarge r7iz.32xlarge" >> $GITHUB_OUTPUT
echo "instance_type=m6a.32xlarge m6i.32xlarge m6in.32xlarge m7a.32xlarge r6a.32xlarge r6i.32xlarge r6in.32xlarge" >> $GITHUB_OUTPUT
echo "ami_id=ami-04d8422a9ba4de80f" >> $GITHUB_OUTPUT
echo "ebs_cache_size=256" >> $GITHUB_OUTPUT
echo "runner_concurrency=20" >> $GITHUB_OUTPUT
Expand Down
5 changes: 5 additions & 0 deletions .github/ensure-tester-with-images/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ inputs:
required: true
run:
required: true
tester_ttl:
required: false
description: "Time to live for the tester instance in minutes"
default: 30
runs:
# define an action, runs in OS of caller
using: composite
Expand Down Expand Up @@ -55,6 +59,7 @@ runs:
if: ${{ env.CACHE_SUCCESS != 'true' }}
with:
runner_type: ${{ inputs.runner_type}}
ttl: ${{ inputs.tester_ttl }}
run: |
set -eux
export BUILDER_SPOT_IP=${{ env.BUILDER_SPOT_IP }}
Expand Down
13 changes: 9 additions & 4 deletions .github/ensure-tester/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ inputs:
run:
# command to run once tester available
required: false

ttl:
required: false
description: "Time to live for the tester instance in minutes"
default: 30
runs:
# define an action, runs in OS of caller
using: composite
Expand All @@ -23,7 +28,7 @@ runs:
echo "ami_id=ami-04d8422a9ba4de80f" >> $GITHUB_OUTPUT
# no github runners, 'bare spot' in action code
echo "runner_concurrency=0" >> $GITHUB_OUTPUT
echo "ttl=30" >> $GITHUB_OUTPUT
echo "ttl=${{ inputs.ttl }}" >> $GITHUB_OUTPUT
SIZE=large
if [[ $TYPE == 4core-* ]]; then
SIZE=large
Expand All @@ -38,7 +43,7 @@ runs:
elif [[ $TYPE == 128core-* ]]; then
SIZE=32xlarge
fi
echo "instance_type=i4i.$SIZE m6a.$SIZE m6i.$SIZE m6id.$SIZE m6idn.$SIZE m6in.$SIZE m7a.$SIZE r6a.$SIZE r6i.$SIZE r6id.$SIZE r6in.$SIZE r7iz.$SIZE" >> $GITHUB_OUTPUT
echo "instance_type=m6a.$SIZE m6in.$SIZE r6a.$SIZE r6i.$SIZE r6in.$SIZE" >> $GITHUB_OUTPUT
- name: Start Tester
uses: ./.github/spot-runner-action
Expand All @@ -50,7 +55,7 @@ runs:
aws_access_key_id: ${{ env.AWS_ACCESS_KEY_ID }}
aws_secret_access_key: ${{ env.AWS_SECRET_ACCESS_KEY }}
ec2_key: ${{ env.BUILD_INSTANCE_SSH_KEY }}
client_token: ''
client_token: ""
# constants:
runner_concurrency: ${{ steps.select_instance.outputs.runner_concurrency }}
ec2_instance_type: ${{ steps.select_instance.outputs.instance_type }}
Expand All @@ -61,7 +66,7 @@ runs:
ec2_subnet_id: subnet-4cfabd25
ec2_security_group_id: sg-0ccd4e5df0dcca0c9
ec2_key_name: "build-instance"
ec2_instance_tags: '[]'
ec2_instance_tags: "[]"

# Set up a context for this run
- name: Copy Repo to Tester
Expand Down
6 changes: 5 additions & 1 deletion .github/run-on-builder/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ runs:
- name: Run On Builder
env:
# avoid double shell interpolation
RUN_SCRIPT: export GITHUB_REF_NAME=${{ github.ref_name }} ; cd ~/run-${{ env.RUN_ID }} ; ${{ inputs.run }}
RUN_SCRIPT: |
sudo shutdown -P 40
export GITHUB_REF_NAME=${{ github.ref_name }}
cd ~/run-${{ env.RUN_ID }}
${{ inputs.run }}
shell: bash
run: scripts/run_on_builder "$RUN_SCRIPT"
6 changes: 3 additions & 3 deletions .github/spot-runner-action/dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ class Ec2Instance {
{
DeviceName: "/dev/sda1",
Ebs: {
VolumeSize: 32,
VolumeSize: 64,
VolumeType: 'gp3',
Throughput: 1000,
Iops: 5000
Expand All @@ -299,7 +299,7 @@ class Ec2Instance {
// Ignore if it is already created
return launchTemplateName;
}
throw error;
core.warning("Ignoring:" + JSON.stringify(error));
}
return launchTemplateName;
});
Expand Down Expand Up @@ -734,7 +734,7 @@ function requestAndWaitForSpot(config) {
for (const ec2Strategy of ec2SpotStrategies) {
let backoff = 0;
core.info(`Starting instance with ${ec2Strategy} strategy`);
const MAX_ATTEMPTS = 3; // uses exponential backoff
const MAX_ATTEMPTS = 6; // uses exponential backoff
for (let i = 0; i < MAX_ATTEMPTS; i++) {
// Start instance
const instanceIdOrError = yield ec2Client.requestMachine(
Expand Down
4 changes: 2 additions & 2 deletions .github/spot-runner-action/src/ec2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ export class Ec2Instance {
{
DeviceName: "/dev/sda1",
Ebs: {
VolumeSize: 32,
VolumeSize: 64,
VolumeType: 'gp3',
Throughput: 1000,
Iops: 5000
Expand All @@ -219,7 +219,7 @@ export class Ec2Instance {
// Ignore if it is already created
return launchTemplateName;
}
throw error;
core.warning("Ignoring:" + JSON.stringify(error));
}
return launchTemplateName;
}
Expand Down
2 changes: 1 addition & 1 deletion .github/spot-runner-action/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ async function requestAndWaitForSpot(config: ActionConfig): Promise<string> {
for (const ec2Strategy of ec2SpotStrategies) {
let backoff = 0;
core.info(`Starting instance with ${ec2Strategy} strategy`);
const MAX_ATTEMPTS = 3; // uses exponential backoff
const MAX_ATTEMPTS = 6; // uses exponential backoff
for (let i = 0; i < MAX_ATTEMPTS; i++) {
// Start instance
const instanceIdOrError =
Expand Down
Loading

0 comments on commit fc8814b

Please sign in to comment.