Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(ci): spot capacity and reaping #6561

Merged
merged 2 commits into from
May 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/ensure-builder/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ runs:
echo "spot_strategy=BestEffort" >> $GITHUB_OUTPUT
echo "runner_label=$USERNAME-$runner_type" >> $GITHUB_OUTPUT
if [[ $TYPE == builder-x86 ]]; then
# 128-core x86 instance types with least evictions
# 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 "ami_id=ami-04d8422a9ba4de80f" >> $GITHUB_OUTPUT
echo "ebs_cache_size=256" >> $GITHUB_OUTPUT
Expand Down
2 changes: 1 addition & 1 deletion .github/ensure-tester/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ runs:
ec2_subnet_id: subnet-4cfabd25
ec2_security_group_id: sg-0ccd4e5df0dcca0c9
ec2_key_name: "build-instance"
ec2_instance_tags: '[{"Key": "Keep-Alive", "Value": "true"}]'
ec2_instance_tags: '[]'

# Set up a context for this run
- name: Copy Repo to Tester
Expand Down
2 changes: 1 addition & 1 deletion .github/spot-runner-action/dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ class Ec2Instance {
LaunchTemplateConfigs: [fleetLaunchConfig],
ClientToken: clientToken,
SpotOptions: {
AllocationStrategy: "capacity-optimized",
AllocationStrategy: "price-capacity-optimized",
},
TargetCapacitySpecification: {
TotalTargetCapacity: 1,
Expand Down
2 changes: 1 addition & 1 deletion .github/spot-runner-action/src/ec2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ export class Ec2Instance {
LaunchTemplateConfigs: [fleetLaunchConfig],
ClientToken: clientToken,
SpotOptions: {
AllocationStrategy: "capacity-optimized",
AllocationStrategy: "price-capacity-optimized",
},
TargetCapacitySpecification: {
TotalTargetCapacity: 1,
Expand Down
2 changes: 1 addition & 1 deletion scripts/run_on_builder
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ set -eu
# Enter the repo root
cd "$(dirname "$0")/.."

ssh -o ControlMaster=auto -o ControlPath=~/.ssh_mux_%h_%p_%r -o ControlPersist=10m -o TCPKeepAlive=no -o ServerAliveCountMax=20 -o ServerAliveInterval=30 -o StrictHostKeyChecking=no -i "$BUILDER_SPOT_KEY" ubuntu@"$BUILDER_SPOT_IP" "$@"
ssh -o ControlMaster=auto -o ControlPath=~/.ssh_mux_%h_%p_%r -o ControlPersist=30s -o TCPKeepAlive=no -o ServerAliveCountMax=5 -o ServerAliveInterval=30 -o StrictHostKeyChecking=no -i "$BUILDER_SPOT_KEY" ubuntu@"$BUILDER_SPOT_IP" "$@"
2 changes: 1 addition & 1 deletion scripts/run_on_tester
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ set -eu
# Enter the repo root
cd "$(dirname "$0")/.."

ssh -o ControlMaster=auto -o ControlPath=~/.ssh_mux_%h_%p_%r -o ControlPersist=10m -o TCPKeepAlive=no -o ServerAliveCountMax=20 -o ServerAliveInterval=30 -o StrictHostKeyChecking=no -i "$SPOT_KEY" ubuntu@"$SPOT_IP" "$@"
ssh -o ControlMaster=auto -o ControlPath=~/.ssh_mux_%h_%p_%r -o ControlPersist=30s -o TCPKeepAlive=no -o ServerAliveCountMax=5 -o ServerAliveInterval=30 -o StrictHostKeyChecking=no -i "$SPOT_KEY" ubuntu@"$SPOT_IP" "$@"
Loading