Skip to content

Commit

Permalink
GitHub CI: Make retrying on runner failure the default (#2621)
Browse files Browse the repository at this point in the history
We used to specify retrying for by far most of the jobs, but it was
crucially missing on `nix-build`. So when a runner is shut down during
this job, it will not be retried.

To simplify matters, I just made retrying on runner failure the default.

The only jobs that were not retried before this commit were:
  - nix-build
  - set_pending
  - set_success
  - set_failure

I don't think it hurts to turn it on for those status jobs as well.

Additionally, the `.hackage` inclusion snippet redundantly specified
`{retry: {max: 2}}`, which I removed. Note that GitHub's merge algorithm
for inclusion would fill in the `{retry: {when: ...}}` key from
`.common`, it truly was a no-op in `.hackage`.
  • Loading branch information
DigitalBrains1 authored Dec 19, 2023
1 parent ef194fe commit f592d8d
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 13 deletions.
5 changes: 0 additions & 5 deletions .ci/gitlab/benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,6 @@
RUN_CLASHDEV: "no"
RUN_TESTSUITE: "no"
RUN_BUILD_ALL: "no"
retry:
max: 2
when:
- runner_system_failure
- stuck_or_timeout_failure
cache:
key: cabal-store-$CI_JOB_NAME-$CI_JOB_IMAGE
when: always
Expand Down
5 changes: 0 additions & 5 deletions .ci/gitlab/common.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,6 @@
CACHE_FALLBACK_KEY: $CI_JOB_NAME-master-ghcr.io/clash-lang/clash-ci-$GHC_VERSION:2023-08-22-2-3-non_protected
GIT_SUBMODULE_STRATEGY: recursive
TERM: xterm-color
retry:
max: 2
when:
- runner_system_failure
- stuck_or_timeout_failure
cache:
key: $CI_JOB_NAME-$CI_COMMIT_REF_SLUG-$CI_JOB_IMAGE-2
when: always
Expand Down
2 changes: 0 additions & 2 deletions .ci/gitlab/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,3 @@ hackage-sdist:
- .ci/publish_sdist.sh clash-lib
- .ci/publish_sdist.sh clash-lib-hedgehog
- .ci/publish_sdist.sh clash-ghc
retry:
max: 2
7 changes: 6 additions & 1 deletion .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
# Make all tasks interruptible by default
default:
# Make all tasks interruptible by default
interruptible: true
retry:
max: 2
when:
- runner_system_failure
- stuck_or_timeout_failure

include:
- '/.ci/gitlab/common.yml'
Expand Down

0 comments on commit f592d8d

Please sign in to comment.