Add git object unpack cache
Metadata
Current evaluation
Git upload-pack now unpacks objects once into the session CacheDir and annotates git-checkout-path for other inspectors. Merged as 2ca0dfe (PR #290).
Resolution: closed resolved
Reason: Closed by PR #290, merged as commit 2ca0dfe "refactor: only unpack git repos once", which added unpackAndCheckout(f, ref, a.CacheDir(), sl) in inspectors/git/git_upload_pack.go and recorded the shared checkout via the git-checkout-path annotation for downstream git-based inspectors.
Evaluated by: mr-cal-bot
No scores available.
Issue body
### What needs to get done
Unpack the git repository once in a temporary area (e.g. in `<session-dir>/cache/<sha256>/`) and pass it to inspectors that work on unpacked git data.
### Why it needs to get done
We don't need to make each inspector unpack it again, it's slower and a waste of resources.
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed resolved | Git upload-pack now unpacks objects once into the session CacheDir and annotates git-checkout-path for other inspectors. Merged as 2ca0dfe (PR #290). | |
| stealth/space-bunny-alpha | — | closed resolved | Git repositories are now unpacked once into the session cache and shared with inspectors; PR #290 merged as commit 2ca0dfe. | |
| stealth/space-bunny-alpha | — | closed resolved | Git inspection now unpacks repositories once and shares the checkout through CacheDir; PR #290 merged as commit 2ca0dfe. | |
| stealth/space-bunny-alpha | — | closed resolved | Added shared caching for unpacked Git repositories in canonical/craft-parts#290 (commit 2ca0dfe), allowing inspectors to reuse one checkout instead of repeatedly unpacking. | |
| stealth/space-bunny-alpha | — | closed resolved | Fixed by merged PR #290 (commit 2ca0dfe), which unpacks Git repositories once and shares the unpacked data with inspectors. | |
| qwen/qwen3.6-35b-a3b | — | — | Closed without implementation. An internal Jira ticket was created, but no code changes were made. The git unpack cache feature request was abandoned. |
Update history
| Date | Change |
|---|---|
| created |
Related work
-
Likely Fixed By:
canonical/fetch-service#290
(confidence 95%)
Merged commit 2ca0dfe 'refactor: only unpack git repos once' adds CacheDir-backed unpack/checkout shared via git-checkout-path annotation.
-
Related To:
canonical/fetch-service#242
(confidence 40%)
Earlier PR c051353 made the git inspector configurable, the basis for the shared unpack location.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #221 create a cache for the unpacked git repositories | fetch-service | open | Request to cache/reuse unpacked git pack repositories so inspectors share one copy instead of unpacking per-inspector; addressed by PR #290 (commit 2ca0dfe) which unpacks once into CacheDir and shares via git-checkout-path annotation | |
| #66 inspectors: add git service query and upload-pack inspectors | fetch-service | merged | Merged PR #66 added Git service-query and upload-pack inspectors, landing as commit 413bf68. |