Browse Source

feat(ci): Prevent cancelling running jobs of a matrix (#32911)

The default behaviour cancels running jobs if one of the jobs in a matrix fails.
This means that you would have to re-run all of them rather than just the one that failed.

This is a waste of resources and has the increased probability that a flaky test could make the other runs also fail, thus, requirying to re-run all again.

This change in combination to Github's new UI that allows re-running just one job (or the failed ones) makes it easier to get to a green run by just re-running what has failed.
Armen Zambrano G 3 years ago
parent
commit
a6b146ee23

+ 9 - 0
.github/workflows/acceptance.yml

@@ -19,6 +19,9 @@ jobs:
     runs-on: ubuntu-20.04
     timeout-minutes: 20
     strategy:
+      # This helps not having to run multiple jobs because one fails, thus, reducing resource usage
+      # and reducing the risk that one of many runs would turn red again (read: intermittent tests)
+      fail-fast: false
       matrix:
         # XXX: When updating this, make sure you also update CI_NODE_TOTAL.
         instance: [0, 1, 2, 3]
@@ -148,6 +151,9 @@ jobs:
     runs-on: ubuntu-20.04
     timeout-minutes: 20
     strategy:
+      # This helps not having to run multiple jobs because one fails, thus, reducing resource usage
+      # and reducing the risk that one of many runs would turn red again (read: intermittent tests)
+      fail-fast: false
       matrix:
         python-version: [3.8.12]
         # XXX: When updating this, make sure you also update MATRIX_INSTANCE_TOTAL.
@@ -211,6 +217,9 @@ jobs:
     runs-on: ubuntu-20.04
     timeout-minutes: 30
     strategy:
+      # This helps not having to run multiple jobs because one fails, thus, reducing resource usage
+      # and reducing the risk that one of many runs would turn red again (read: intermittent tests)
+      fail-fast: false
       matrix:
         python-version: [3.8.12]
         # XXX: When updating this, make sure you also update MATRIX_INSTANCE_TOTAL.

+ 3 - 0
.github/workflows/backend-test.yml

@@ -12,6 +12,9 @@ jobs:
     runs-on: ubuntu-20.04
     timeout-minutes: 20
     strategy:
+      # This helps not having to run multiple jobs because one fails, thus, reducing resource usage
+      # and reducing the risk that one of many runs would turn red again (read: intermittent tests)
+      fail-fast: false
       matrix:
         python-version: [3.8.12]
         # XXX: When updating this, make sure you also update MATRIX_INSTANCE_TOTAL.

+ 3 - 0
.github/workflows/snuba-integration-test.yml

@@ -12,6 +12,9 @@ jobs:
     runs-on: ubuntu-20.04
     timeout-minutes: 30
     strategy:
+      # This helps not having to run multiple jobs because one fails, thus, reducing resource usage
+      # and reducing the risk that one of many runs would turn red again (read: intermittent tests)
+      fail-fast: false
       matrix:
         python-version: [3.8.12]
         # XXX: When updating this, make sure you also update MATRIX_INSTANCE_TOTAL.