test: synchronize temporary Git maintenance#1946
Conversation
📝 WalkthroughWalkthroughGit test helpers now disable detached automatic maintenance for Git commands, migrate test Git invocations to the shared helper, and add regression coverage for command and environment configuration. ChangesSynchronous Git maintenance
Estimated code review effort: 2 (Simple) | ~15 minutes Suggested labels: Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
🚀 PR Preview Install Guide🧰 CLI updatenpm i -g https://pkg.pr.new/larksuite/cli/@larksuite/cli@c76904c3560a6c1f5a261e0f43f4986d5893e24a🧩 Skill updatenpx skills add larksuite/cli#fix/publiccontent-tempdir-race -y -g |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1946 +/- ##
=======================================
Coverage 75.02% 75.03%
=======================================
Files 894 895 +1
Lines 94294 94318 +24
=======================================
+ Hits 70746 70768 +22
- Misses 18137 18138 +1
- Partials 5411 5412 +1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
a68c431 to
299718f
Compare
299718f to
c76904c
Compare
Summary
Temporary Git repositories in tests could be cleaned up while Git 2.54 automatic maintenance was still writing
.git/objects/maintenance.lock. This change keeps automatic maintenance inside the invoking Git command lifecycle at every confirmed temporary-repository write site, without retries, sleeps, or production behavior changes.Changes
internal/testutil/gitcmdwith fixed command- and environment-scoped maintenance synchronization for root-module testspubliccontent,diff,rules, andappstests through the shared helper while preserving existing hook isolationlintmodule and cover both Git version paths with contract testsTest Plan
go test -race -count=5git maintenance run --auto --no-quiet --no-detachfinishing before the parent Git process exitedRelated Issues
N/A
Summary by CodeRabbit