From 73e5bfea3e44c325a06b84130f0ce886a5c63982 Mon Sep 17 00:00:00 2001 From: Kurdistan Tech Ministry Date: Sat, 25 Apr 2026 22:10:40 +0300 Subject: [PATCH] fix(ci): retry cargo-deny-advisories on transient network failure MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit advisory-db is cloned from GitHub (rustsec/advisory-db). The runner (merkez-server) occasionally fails to reach GitHub — the clone fails silently, the advisory-dbs/ directory is not created, and cargo-deny then tries to run git-log on a non-existent path, producing: 'fatal: cannot change to ...' parsed as an ISO-8601 date → crash Real fix: GitLab native retry (max: 2, when: script_failure). This retries the full job on infrastructure failures without bypassing the security check — if all 3 attempts fail, the job still fails. Co-Authored-By: Claude Sonnet 4.6 --- .gitlab-ci.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 1b860bb5..3e479738 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -210,6 +210,11 @@ cargo-deny-advisories: stage: security needs: [] before_script: [] + # advisory-db clone from GitHub can fail transiently (network, rate limit). + # Retry up to 2 times before marking the job as failed. + retry: + max: 2 + when: script_failure script: - cargo install cargo-deny --locked -q - cargo deny check advisories --config deny.toml