From 8397637b24bc3e58b7c85d0e8ee7b3a6e05d02d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Test=C3=A9?= Date: Tue, 20 Feb 2024 10:27:19 +0100 Subject: [PATCH] chore(ci): use aws-region as input to stop ec2 instances 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. --- .github/workflows/aws_tfhe_fast_tests.yml | 7 ++++--- .github/workflows/aws_tfhe_gpu_tests.yml | 7 ++++--- .github/workflows/aws_tfhe_integer_tests.yml | 7 ++++--- .github/workflows/aws_tfhe_signed_integer_tests.yml | 7 ++++--- .github/workflows/aws_tfhe_tests.yml | 7 ++++--- .github/workflows/aws_tfhe_wasm_tests.yml | 7 ++++--- .github/workflows/csprng_randomness_tests.yml | 7 ++++--- 7 files changed, 28 insertions(+), 21 deletions(-) diff --git a/.github/workflows/aws_tfhe_fast_tests.yml b/.github/workflows/aws_tfhe_fast_tests.yml index f37ba60bea..9df7f77360 100644 --- a/.github/workflows/aws_tfhe_fast_tests.yml +++ b/.github/workflows/aws_tfhe_fast_tests.yml @@ -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 }} @@ -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 diff --git a/.github/workflows/aws_tfhe_gpu_tests.yml b/.github/workflows/aws_tfhe_gpu_tests.yml index 02bc90644c..baf1f64297 100644 --- a/.github/workflows/aws_tfhe_gpu_tests.yml +++ b/.github/workflows/aws_tfhe_gpu_tests.yml @@ -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 }} @@ -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 diff --git a/.github/workflows/aws_tfhe_integer_tests.yml b/.github/workflows/aws_tfhe_integer_tests.yml index 3170cdd62f..dee132d1c5 100644 --- a/.github/workflows/aws_tfhe_integer_tests.yml +++ b/.github/workflows/aws_tfhe_integer_tests.yml @@ -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 }} @@ -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 diff --git a/.github/workflows/aws_tfhe_signed_integer_tests.yml b/.github/workflows/aws_tfhe_signed_integer_tests.yml index 70d1ddec34..bbd7f011e8 100644 --- a/.github/workflows/aws_tfhe_signed_integer_tests.yml +++ b/.github/workflows/aws_tfhe_signed_integer_tests.yml @@ -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 }} @@ -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 diff --git a/.github/workflows/aws_tfhe_tests.yml b/.github/workflows/aws_tfhe_tests.yml index ebe78f000b..6da76b8c3f 100644 --- a/.github/workflows/aws_tfhe_tests.yml +++ b/.github/workflows/aws_tfhe_tests.yml @@ -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 }} @@ -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 diff --git a/.github/workflows/aws_tfhe_wasm_tests.yml b/.github/workflows/aws_tfhe_wasm_tests.yml index 9c408e01d7..8a5ded3a08 100644 --- a/.github/workflows/aws_tfhe_wasm_tests.yml +++ b/.github/workflows/aws_tfhe_wasm_tests.yml @@ -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 }} @@ -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 diff --git a/.github/workflows/csprng_randomness_tests.yml b/.github/workflows/csprng_randomness_tests.yml index 60492a4faf..531c5bcb0e 100644 --- a/.github/workflows/csprng_randomness_tests.yml +++ b/.github/workflows/csprng_randomness_tests.yml @@ -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 }} @@ -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