Repository navigation
feat(git): make upstream clone/fetch failures diagnosable from logs - #83
rolandjitsu merged 6 commits into
Conversation
60b0860 to
35d9861
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #83 +/- ##
==========================================
+ Coverage 98.72% 98.79% +0.07%
==========================================
Files 10 11 +1
Lines 6427 6817 +390
==========================================
+ Hits 6345 6735 +390
Misses 82 82 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
c7f6b91 to
2cc06d2
Compare
9018da2 to
629db79
Compare
Definitely warn. When
Let's add it and describe in a short/concise message that only upstream failures will be counted after this change. |
8acc742 to
599a51e
Compare
|
Thanks for the review.
Rebased on main (#79). The failure log now has a The |
Fixed that with #89 . |
822a454 to
b747c3e
Compare
rolandjitsu
left a comment
There was a problem hiding this comment.
LGTM. Just needs a rebase.
A failed clone or fetch was only counted under repo="-"; callers logged the outer error without git's diagnostic, and a client disconnect was not logged at all. Log the final failure where the operation, repo and credential are known, with a bounded, redacted stderr summary, and drop the duplicate. Refs rolandjitsu#82 Assisted-by: Claude:claude-opus-5-5
A client going away or shutdown is not an upstream failure.
BREAKING CHANGE: upstream_ops_total{result="error"} now counts only
upstream failures, not cancelled operations.
Assisted-by: Claude:claude-opus-5-5
Assisted-by: Claude:claude-opus-5-5
Assisted-by: Claude:claude-opus-5-5
git.rs has grown large; this is a pure move with no behavior change. Assisted-by: Claude:claude-opus-5-5
b747c3e to
1ec620f
Compare
|
Ah, can we fix : as well? |
|
Sorry for the extra round here, and thanks for catching this. I rebased the branch onto the latest main and pushed 499dc78, which keeps the emitted log event unchanged while making the upstream failure log callsite fully covered by Codecov. Local verification passed:
|
499dc78 to
6d66513
Compare
Keep the log message in a local field so coverage instruments the callsite without changing the emitted event. Assisted-by: Claude:claude-opus-4-8
|
Small follow-up: the first push exposed a commit-message line-length check failure. I amended the same fix commit to wrap the body line, force-pushed it as 6d66513, and left the code change unchanged. Sorry for the extra CI round. |
What kind of change does this PR introduce?
Summary
Closes #82. Logs each upstream clone/fetch failure once, with the repo, a
trigger(requestor backgroundrefresh), anerror_kind, and a redacted summary of the git stderr. Cancelled operations (client gone, or shutdown) are no longer counted as upstream errors. Moves the upstream error types tosrc/git/error.rs.Tests
Checklist
cargo fmt --all --check,cargo clippy --all-targets --all-features --locked -- -D warnings,cargo test --all-featuresAssisted-by:trailer (see CONTRIBUTING.md / AGENTS.md)Breaking change?
upstream_ops_total{result="error"}no longer counts cancelled operations.