codecov: fix ~/.gitconfig lock race on self-hosted runners (disable_safe_directory)#92
Merged
ChrisRackauckas merged 1 commit intoJun 14, 2026
Conversation
… lock race on shared-home self-hosted runners) Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com> Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem (root cause, verified)
codecov/codecov-action@v7's internal Set safe directory step runsgit config --global --add safe.directory ..., which takes a lock on~/.gitconfig. The SciML self-hosteddemeterrunners share a single home directory (/home/chrisrackauckas) across many concurrent jobs, so thosegit config --globalcalls race for the same lockfile:The action then exits 255 and fails the job after the tests already passed.
fail_ci_if_error: falsedoes not help here because the failure happens in a pre-upload setup step, not in the upload itself. 100% of observed codecov job failures were ondemeter; 0% on GitHub-hosted/ephemeral runners.Fix
On every
codecov/codecov-action@v7step in the repo:disable_safe_directory: true— skips the racinggit config --globalcall entirely. This is a real input of codecov-action (added in v5+; present in v7). Harmless on hosted runners since the checkout dir is already trusted there.continue-on-error: trueon the step — so any future codecov setup-step non-zero exit can never fail an otherwise-green job.fail_ci_if_error: falseset explicitly inwith:for clarity/defense-in-depth.Files touched
.github/workflows/tests.yml(codecov step).github/workflows/documentation.yml(codecov step).github/workflows/downstream.yml(codecov step)actionlint clean.
NOTE: v1 must be retagged after merge for @v1 callers. Ignore until reviewed by @ChrisRackauckas.