Repository navigation
ci: reclaim extracted dependencies between tidy checks - #2698
Conversation
|
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
Temporary module data and cache cleanup .github/scripts/check-go-mod-tidy.sh |
The script stores each module’s temporary copies under a shared root. After each module check, it removes extracted module cache directories while preserving downloads and toolchains. Existing tidy comparisons and error reporting remain unchanged. |
Cleanup validation and workflow integration .github/scripts/verify-check-go-mod-tidy-cache.sh, .github/workflows/prc.yml |
The shell test verifies cleanup after successful checks and after a simulated failure. The check-go-mod-tidy job runs the test before checking whether module files are tidy. |
Priority:
Estimated code review effort: 2 (Simple) | ~12 minutes
Change: Other
Possibly related PRs
- trpc-group/trpc-agent-go#2687: Adds a workflow job with an additional
go mod tidycheck, which uses the tidy-check script changed here.
Suggested reviewers: flash-lhr, winechord
Merge Risk: 
Minimal · up to 51030
-
No actionable merge-blocking risk remains from the reviewed changes.
Pre-merge checks: 
5
-
Full details: Docstring Coverage
-
Explanation
No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 0 functions across 2 files. (1 skipped: 1 unsupported.)
Full details: Description check
-
Explanation
The description states the change: it releases extracted dependency sources between modules during the repository-wide go mod tidy check, keeps archives and toolchains, and cleans up the temporary workspace on success and failure. It gives the reason (disk quota exceeded in
#2687), explains the separated temporary root and snapshot lifetimes, lists the tests run, and notes limits. It matches the raw summary and the PR objectives.
-
Finishing Touches
-
🧪 Generate unit tests (beta)
-
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
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 @coderabbitai help to get the list of available commands.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2698 +/- ##
===================================================
+ Coverage 90.25742% 90.25870% +0.00128%
===================================================
Files 1290 1290
Lines 234322 234322
===================================================
+ Hits 211493 211496 +3
+ Misses 14245 14243 -2
+ Partials 8584 8583 -1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
What changed
Reduce disk usage during the repository-wide
go mod tidycheck by releasing extracted dependency sources between modules. Downloaded archives and Go toolchains remain available for reuse. Clean up the complete temporary workspace on both success and failure.Why
The tidy check uses a fresh module cache across all modules. Extracted dependency trees accumulate throughout the job; the check in #2687 failed while extracting dependencies with
disk quota exceeded.The script also reused its temporary-root variable for per-module manifest snapshots, so its exit trap no longer referred to the original cache directory. Separate lifetimes for the temporary root and snapshots make cleanup reliable.
Testing
git diff --check.Notes for reviewers
This affects CI tooling only. Downloaded archives still accumulate during the job, and a single large module can still exceed available disk space.