fix(ci): restore identity reads under the codecov step's redirected git config - #21
Merged
Merged
Conversation
…it config `GIT_CONFIG_GLOBAL` REPLACES the global config rather than layering on it. So #20, which redirected the codecov step's git writes away from the contended shared `~/.gitconfig`, also hid `user.name` / `user.email` from git for that step — silently, because nothing there reads them today. Seed the throwaway file with an `include.path` back to the real config before the step runs. Identity resolves through the include; `--add safe.directory` still lands in the throwaway file, so the lock contention #20 fixed stays fixed. I did not consider identity when writing #20 — I reasoned only about the lock. scitex-hpc caught the identical shape in their launcher-level fix an hour before this, where it WOULD have made every CI commit identity-less, and they caught it by asserting the mechanism instead of trusting it. This is the same bug scoped to one step: harmless for what that step does today, silently wrong the moment anything under that env needs identity. Landing it now rather than waiting for the launcher fix to supersede it. That deployment is gated on an operator decision with no date, and a known-latent config sitting in a workflow every scitex repo calls should not have an open-ended window. If the deployment lands tomorrow this is one redundant line for a day, which is the better side of that trade. The seeding step carries the same `if:` guard as the codecov step, so it does not run on the legs that have no codecov upload.
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.
The bug I shipped in #20
GIT_CONFIG_GLOBALreplaces the global config — it does not layer on top of it. So #20, which redirected the codecov step's git writes away from the contended shared~/.gitconfig, also hiduser.name/user.emailfrom git for that step.Silently, because nothing in that step reads them today.
The fix
Seed the throwaway file with an
include.pathback to the real config, in a step carrying the sameif:guard:Identity resolves through the include;
--add safe.directorystill lands in the throwaway file, so the lock contention #20 fixed stays fixed.Provenance — I did not find this
I reasoned only about the lock when writing #20 and never considered identity. scitex-hpc caught the identical shape in their launcher-level fix, where it would have made every CI commit identity-less, and they caught it by asserting the mechanism rather than trusting it:
Mine is the same bug scoped to one step: harmless for what that step does today, silently wrong the moment anything under that env needs identity. "Appears not to need identity" was an assumption nobody had asserted.
Why now rather than waiting
This is superseded by the launcher-level fix, which sets
GIT_CONFIG_GLOBALonce for every runner and every one of the ~58 per-repo callers this workflow never sees. That is the right place and I'll revert both this and #20 when it's deployed and live — not when it merges.But that deployment is gated on an operator decision with no date, because redeploying the supervisor interrupts live CI. A known-latent config sitting in a workflow every scitex repo calls should not have an open-ended window. If the deployment lands tomorrow, this is one redundant line for a day — the better side of that trade.
scitex-hpc's words, which I agree with: "The cost of the include is one line; the cost of being wrong is a silently identity-less git operation in every repo that calls that workflow."
Verified
Parsed the YAML and asserted step order (seed precedes codecov), guard parity (identical
if:), and that the env target is unchanged.Context
The underlying contention is now understood:
~/.gitconfighad reached 35,396 lines / 4.3 MB of duplicatedsafe.directoryentries — a positive feedback loop where every job read-modify-writes the whole file under lock, so more CI runs meant longer holds meant more collisions. scitex-hpc has cleaned it to 45 lines / 1 KB, which flattens the curve ahead of the launcher fix.