mirror of
https://github.com/semantica-agi/semantica.git
synced 2026-08-29 04:26:20 +00:00
ci: retry CodeQL init on transient bundle-download ECONNRESET
The CodeQL Analyze Python job failed on the #757 merge commit with ECONNRESET while streaming the CodeQL bundle download in codeql-action/init's "Setup CodeQL tools" step. This is unrelated to the merged code — it's a known, currently-unaddressed gap in codeql-action: the download error is retryable but the action doesn't retry it internally (confirmed via codeql-action's issue tracker and changelog). Since a `uses:` step can't be wrapped by a shell-level retry action, Initialize CodeQL now runs up to 3 times, cascading to the next attempt only if the previous one failed, so the common case (success on attempt 1) costs nothing extra.
This commit is contained in:
@@ -22,7 +22,36 @@ jobs:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v7
|
||||
|
||||
- name: Initialize CodeQL
|
||||
# The CodeQL bundle download (github/codeql-action/init's "Setup CodeQL
|
||||
# tools" step) streams a ~1GB tarball from GitHub's release CDN and
|
||||
# does not retry on a transient connection reset (ECONNRESET) itself
|
||||
# (github/codeql-action, unresolved as of v4 / CLI 2.26.1: the HTTP
|
||||
# error is retryable but isn't retried internally). Since a `uses:`
|
||||
# step can't be wrapped by a shell-level retry action, attempt init
|
||||
# up to 3 times; each retry is a fresh download attempt with no
|
||||
# meaningful state carried over from a failed attempt.
|
||||
- name: Initialize CodeQL (attempt 1)
|
||||
id: codeql-init-1
|
||||
uses: github/codeql-action/init@v4
|
||||
continue-on-error: true
|
||||
with:
|
||||
languages: python
|
||||
queries: security-and-quality
|
||||
config-file: .github/codeql/codeql-config.yml
|
||||
|
||||
- name: Initialize CodeQL (attempt 2)
|
||||
id: codeql-init-2
|
||||
if: steps.codeql-init-1.outcome == 'failure'
|
||||
uses: github/codeql-action/init@v4
|
||||
continue-on-error: true
|
||||
with:
|
||||
languages: python
|
||||
queries: security-and-quality
|
||||
config-file: .github/codeql/codeql-config.yml
|
||||
|
||||
- name: Initialize CodeQL (attempt 3)
|
||||
id: codeql-init-3
|
||||
if: steps.codeql-init-2.outcome == 'failure'
|
||||
uses: github/codeql-action/init@v4
|
||||
with:
|
||||
languages: python
|
||||
|
||||
Reference in New Issue
Block a user