Skip to content

Commit

Permalink
chore(ci): use aws-region as input to stop ec2 instances
Browse files Browse the repository at this point in the history
This is done to handle case where a PR is merged before AWS EC2
instance teardown. If we use profile input in this case, Slab will
try to fetch ci/slab.toml on a git reference that doesn't exists
anymore thus sending back an error without being able to terminate
the instance. By using aws-region Slab won't fetch slab.toml file.
  • Loading branch information
soonum committed Feb 20, 2024
1 parent 42b7c2f commit 8397637
Show file tree
Hide file tree
Showing 7 changed files with 28 additions and 21 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/aws_tfhe_fast_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,11 @@ jobs:
outputs:
runner-name: ${{ steps.start-instance.outputs.label }}
instance-id: ${{ steps.start-instance.outputs.ec2-instance-id }}
aws-region: ${{ steps.start-instance.outputs.aws-region }}
steps:
- name: Start instance
id: start-instance
uses: zama-ai/slab-github-runner@ab65ad70bb9f9e9251e4915ea5612bcad23cd9b1
uses: zama-ai/slab-github-runner@8562abbdc96b3619bd5debe1fb934db298f9a044
with:
mode: start
github-token: ${{ secrets.SLAB_ACTION_TOKEN }}
Expand Down Expand Up @@ -118,13 +119,13 @@ jobs:
steps:
- name: Stop instance
id: stop-instance
uses: zama-ai/slab-github-runner@ab65ad70bb9f9e9251e4915ea5612bcad23cd9b1
uses: zama-ai/slab-github-runner@8562abbdc96b3619bd5debe1fb934db298f9a044
with:
mode: stop
github-token: ${{ secrets.SLAB_ACTION_TOKEN }}
slab-url: ${{ secrets.SLAB_BASE_URL }}
job-secret: ${{ secrets.JOB_SECRET }}
profile: cpu-big
region: ${{ needs.setup-ec2.outputs.aws-region }}
label: ${{ needs.setup-ec2.outputs.runner-name }}

- name: Slack Notification
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/aws_tfhe_gpu_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,11 @@ jobs:
outputs:
runner-name: ${{ steps.start-instance.outputs.label }}
instance-id: ${{ steps.start-instance.outputs.ec2-instance-id }}
aws-region: ${{ steps.start-instance.outputs.aws-region }}
steps:
- name: Start instance
id: start-instance
uses: zama-ai/slab-github-runner@ab65ad70bb9f9e9251e4915ea5612bcad23cd9b1
uses: zama-ai/slab-github-runner@8562abbdc96b3619bd5debe1fb934db298f9a044
with:
mode: start
github-token: ${{ secrets.SLAB_ACTION_TOKEN }}
Expand Down Expand Up @@ -119,13 +120,13 @@ jobs:
steps:
- name: Stop instance
id: stop-instance
uses: zama-ai/slab-github-runner@ab65ad70bb9f9e9251e4915ea5612bcad23cd9b1
uses: zama-ai/slab-github-runner@8562abbdc96b3619bd5debe1fb934db298f9a044
with:
mode: stop
github-token: ${{ secrets.SLAB_ACTION_TOKEN }}
slab-url: ${{ secrets.SLAB_BASE_URL }}
job-secret: ${{ secrets.JOB_SECRET }}
profile: gpu-test
region: ${{ needs.setup-ec2.outputs.aws-region }}
label: ${{ needs.setup-ec2.outputs.runner-name }}

- name: Slack Notification
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/aws_tfhe_integer_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,11 @@ jobs:
outputs:
runner-name: ${{ steps.start-instance.outputs.label }}
instance-id: ${{ steps.start-instance.outputs.ec2-instance-id }}
aws-region: ${{ steps.start-instance.outputs.aws-region }}
steps:
- name: Start instance
id: start-instance
uses: zama-ai/slab-github-runner@ab65ad70bb9f9e9251e4915ea5612bcad23cd9b1
uses: zama-ai/slab-github-runner@8562abbdc96b3619bd5debe1fb934db298f9a044
with:
mode: start
github-token: ${{ secrets.SLAB_ACTION_TOKEN }}
Expand Down Expand Up @@ -87,13 +88,13 @@ jobs:
steps:
- name: Stop instance
id: stop-instance
uses: zama-ai/slab-github-runner@ab65ad70bb9f9e9251e4915ea5612bcad23cd9b1
uses: zama-ai/slab-github-runner@8562abbdc96b3619bd5debe1fb934db298f9a044
with:
mode: stop
github-token: ${{ secrets.SLAB_ACTION_TOKEN }}
slab-url: ${{ secrets.SLAB_BASE_URL }}
job-secret: ${{ secrets.JOB_SECRET }}
profile: cpu-big
region: ${{ needs.setup-ec2.outputs.aws-region }}
label: ${{ needs.setup-ec2.outputs.runner-name }}

- name: Slack Notification
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/aws_tfhe_signed_integer_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,11 @@ jobs:
outputs:
runner-name: ${{ steps.start-instance.outputs.label }}
instance-id: ${{ steps.start-instance.outputs.ec2-instance-id }}
aws-region: ${{ steps.start-instance.outputs.aws-region }}
steps:
- name: Start instance
id: start-instance
uses: zama-ai/slab-github-runner@ab65ad70bb9f9e9251e4915ea5612bcad23cd9b1
uses: zama-ai/slab-github-runner@8562abbdc96b3619bd5debe1fb934db298f9a044
with:
mode: start
github-token: ${{ secrets.SLAB_ACTION_TOKEN }}
Expand Down Expand Up @@ -91,13 +92,13 @@ jobs:
steps:
- name: Stop instance
id: stop-instance
uses: zama-ai/slab-github-runner@ab65ad70bb9f9e9251e4915ea5612bcad23cd9b1
uses: zama-ai/slab-github-runner@8562abbdc96b3619bd5debe1fb934db298f9a044
with:
mode: stop
github-token: ${{ secrets.SLAB_ACTION_TOKEN }}
slab-url: ${{ secrets.SLAB_BASE_URL }}
job-secret: ${{ secrets.JOB_SECRET }}
profile: cpu-big
region: ${{ needs.setup-ec2.outputs.aws-region }}
label: ${{ needs.setup-ec2.outputs.runner-name }}

- name: Slack Notification
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/aws_tfhe_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,11 @@ jobs:
outputs:
runner-name: ${{ steps.start-instance.outputs.label }}
instance-id: ${{ steps.start-instance.outputs.ec2-instance-id }}
aws-region: ${{ steps.start-instance.outputs.aws-region }}
steps:
- name: Start instance
id: start-instance
uses: zama-ai/slab-github-runner@ab65ad70bb9f9e9251e4915ea5612bcad23cd9b1
uses: zama-ai/slab-github-runner@8562abbdc96b3619bd5debe1fb934db298f9a044
with:
mode: start
github-token: ${{ secrets.SLAB_ACTION_TOKEN }}
Expand Down Expand Up @@ -113,13 +114,13 @@ jobs:
steps:
- name: Stop instance
id: stop-instance
uses: zama-ai/slab-github-runner@ab65ad70bb9f9e9251e4915ea5612bcad23cd9b1
uses: zama-ai/slab-github-runner@8562abbdc96b3619bd5debe1fb934db298f9a044
with:
mode: stop
github-token: ${{ secrets.SLAB_ACTION_TOKEN }}
slab-url: ${{ secrets.SLAB_BASE_URL }}
job-secret: ${{ secrets.JOB_SECRET }}
profile: cpu-big
region: ${{ needs.setup-ec2.outputs.aws-region }}
label: ${{ needs.setup-ec2.outputs.runner-name }}

- name: Slack Notification
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/aws_tfhe_wasm_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,11 @@ jobs:
outputs:
runner-name: ${{ steps.start-instance.outputs.label }}
instance-id: ${{ steps.start-instance.outputs.ec2-instance-id }}
aws-region: ${{ steps.start-instance.outputs.aws-region }}
steps:
- name: Start instance
id: start-instance
uses: zama-ai/slab-github-runner@ab65ad70bb9f9e9251e4915ea5612bcad23cd9b1
uses: zama-ai/slab-github-runner@8562abbdc96b3619bd5debe1fb934db298f9a044
with:
mode: start
github-token: ${{ secrets.SLAB_ACTION_TOKEN }}
Expand Down Expand Up @@ -80,13 +81,13 @@ jobs:
steps:
- name: Stop instance
id: stop-instance
uses: zama-ai/slab-github-runner@ab65ad70bb9f9e9251e4915ea5612bcad23cd9b1
uses: zama-ai/slab-github-runner@8562abbdc96b3619bd5debe1fb934db298f9a044
with:
mode: stop
github-token: ${{ secrets.SLAB_ACTION_TOKEN }}
slab-url: ${{ secrets.SLAB_BASE_URL }}
job-secret: ${{ secrets.JOB_SECRET }}
profile: cpu-small
region: ${{ needs.setup-ec2.outputs.aws-region }}
label: ${{ needs.setup-ec2.outputs.runner-name }}

- name: Slack Notification
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/csprng_randomness_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,11 @@ jobs:
outputs:
runner-name: ${{ steps.start-instance.outputs.label }}
instance-id: ${{ steps.start-instance.outputs.ec2-instance-id }}
aws-region: ${{ steps.start-instance.outputs.aws-region }}
steps:
- name: Start instance
id: start-instance
uses: zama-ai/slab-github-runner@ab65ad70bb9f9e9251e4915ea5612bcad23cd9b1
uses: zama-ai/slab-github-runner@8562abbdc96b3619bd5debe1fb934db298f9a044
with:
mode: start
github-token: ${{ secrets.SLAB_ACTION_TOKEN }}
Expand Down Expand Up @@ -76,13 +77,13 @@ jobs:
steps:
- name: Stop instance
id: stop-instance
uses: zama-ai/slab-github-runner@ab65ad70bb9f9e9251e4915ea5612bcad23cd9b1
uses: zama-ai/slab-github-runner@8562abbdc96b3619bd5debe1fb934db298f9a044
with:
mode: stop
github-token: ${{ secrets.SLAB_ACTION_TOKEN }}
slab-url: ${{ secrets.SLAB_BASE_URL }}
job-secret: ${{ secrets.JOB_SECRET }}
profile: cpu-small
region: ${{ needs.setup-ec2.outputs.aws-region }}
label: ${{ needs.setup-ec2.outputs.runner-name }}

- name: Slack Notification
Expand Down

0 comments on commit 8397637

Please sign in to comment.