Repository navigation
fix(install): skip explicitly denied git preparation - #15149
Conversation
Install git-hosted dependencies unprepared when their builds are explicitly denied. Preserve errors for undecided builds and separate prepared and unprepared caches in both CLI versions. Closes #10522.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository: pnpm/pnpm/.coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (30)
Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review. 📝 WalkthroughWalkthroughGit-hosted package preparation now treats ChangesGit-hosted preparation contract
Policy propagation and cache reuse
Priority: ➖ Normal Estimated code review effort: 4 (Complex) | ~60 minutes Change: Bug fix · Severity of issue fixed: Medium Sequence Diagram(s)sequenceDiagram
participant Install
participant PackageRequester
participant GitFetcher
participant StoreIndex
Install->>PackageRequester: resolve git-hosted dependency
PackageRequester->>GitFetcher: fetch with allowBuild policy
GitFetcher->>StoreIndex: select built or not-built key
StoreIndex-->>PackageRequester: return reusable package source
PackageRequester-->>Install: materialize dependency
Assessment against linked issues
Possibly related PRs
Suggested labels: Merge Risk: ⚪ Minimal · up to The release metadata is compatible with the repository’s pending changeset history, and no actionable merge risk remains. ✨ Finishing Touches 💡 1📝 Generate docstrings
🧪 Generate unit tests (beta)
🛠️ Fix failing CI checks 💡
Warning Some tools did not complete. Review the errors below. 🔧 ESLint
pnpm11/exec/prepare-package/src/index.tsESLint skipped: missing config or dependency (missing-dependency). The ESLint configuration references a package that is not available in the sandbox. pnpm11/exec/prepare-package/test/index.tsESLint skipped: the matched ESLint configuration already failed (missing-dependency). pnpm11/fetching/fetcher-base/src/index.tsESLint skipped: the matched ESLint configuration already failed (missing-dependency).
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 |
Micro-Benchmark ResultsLinux |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #15149 +/- ##
=======================================
Coverage 91.31% 91.31%
=======================================
Files 1352 1352
Lines 181589 181648 +59
=======================================
+ Hits 165812 165877 +65
+ Misses 15777 15771 -6 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Integrated-Benchmark Report (Linux)Commit: Regular scenarios report direct and pnpr installs. The peer-heavy resolver scenario compares current Rust, main Rust, and TypeScript pnpm; the linked-workspace scenario compares current Rust against main Rust. Bencher consumes pacquet@HEAD and pnpr@HEAD. The tables below show mean ± σ; Bencher thresholds on the minimum latency, which is far less perturbed by shared-runner contention (noise only adds time). Scenario: Isolated linker: fresh restore, cold cache + cold store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 2.4534946275200005,
"stddev": 0.15251114154143203,
"median": 2.44048982202,
"user": 1.2935811,
"system": 1.4788670400000001,
"min": 2.24925851902,
"max": 2.72086542702
},
{
"command": "pacquet@main",
"mean": 2.3981021172199997,
"stddev": 0.1449865839021529,
"median": 2.39249696052,
"user": 1.221187,
"system": 1.49716174,
"min": 2.23270857402,
"max": 2.6339134000200004
},
{
"command": "pnpr@HEAD",
"mean": 1.42186405162,
"stddev": 0.13064256791224513,
"median": 1.36438064152,
"user": 1.1586335,
"system": 1.3213464400000001,
"min": 1.30078552702,
"max": 1.66259787402
},
{
"command": "pnpr@main",
"mean": 1.4990377934199999,
"stddev": 0.10138485487620023,
"median": 1.51930113252,
"user": 1.1562338999999997,
"system": 1.3644715399999998,
"min": 1.33703447302,
"max": 1.63552322502
}
]
}Scenario: Isolated linker: fresh restore, hot cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.21167950388000004,
"stddev": 0.0038152804212823054,
"median": 0.21272794678,
"user": 0.22668110000000002,
"system": 0.54074212,
"min": 0.20312444978000002,
"max": 0.21543883178
},
{
"command": "pacquet@main",
"mean": 0.21334749108,
"stddev": 0.005725692262002859,
"median": 0.21367630128,
"user": 0.22794829999999994,
"system": 0.55697952,
"min": 0.20491519278,
"max": 0.22217531878000002
},
{
"command": "pnpr@HEAD",
"mean": 0.22675382198,
"stddev": 0.006401284998605785,
"median": 0.22696537728000002,
"user": 0.22748819999999995,
"system": 0.54862332,
"min": 0.21729986478000002,
"max": 0.24048264178
},
{
"command": "pnpr@main",
"mean": 0.22410251367999998,
"stddev": 0.01078627086170544,
"median": 0.22261828778000003,
"user": 0.23053199999999996,
"system": 0.5268876199999999,
"min": 0.21175426078,
"max": 0.24911833378
}
]
}Scenario: Isolated linker: repeat install, hot cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.006406841775078533,
"stddev": 0.00026896227317542724,
"median": 0.00640771594,
"user": 0.0038721769633507856,
"system": 0.002890762460732986,
"min": 0.00585389144,
"max": 0.00751037244
},
{
"command": "pacquet@main",
"mean": 0.00649272918365482,
"stddev": 0.00029516422110407,
"median": 0.00646808494,
"user": 0.004071566497461925,
"system": 0.0028197626395939086,
"min": 0.00588187344,
"max": 0.008348125440000001
},
{
"command": "pnpr@HEAD",
"mean": 0.006476687632399054,
"stddev": 0.0002855537033839337,
"median": 0.00646835444,
"user": 0.003996906888361044,
"system": 0.002838466650831355,
"min": 0.00587436944,
"max": 0.008179088440000001
},
{
"command": "pnpr@main",
"mean": 0.0065785259975000045,
"stddev": 0.00025350536511013083,
"median": 0.00657467994,
"user": 0.004290257499999999,
"system": 0.0027198275500000015,
"min": 0.00581473744,
"max": 0.00761377644
}
]
}Scenario: Isolated linker: repeat install, cold cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.0065473810309289535,
"stddev": 0.0003076497392508594,
"median": 0.00654690502,
"user": 0.0038457753005464485,
"system": 0.0031083504918032797,
"min": 0.00569721052,
"max": 0.00783628552
},
{
"command": "pacquet@main",
"mean": 0.006764843749813664,
"stddev": 0.00032251394850986464,
"median": 0.0067411350200000004,
"user": 0.004131822732919254,
"system": 0.003055501987577641,
"min": 0.00583342552,
"max": 0.00795305652
},
{
"command": "pnpr@HEAD",
"mean": 0.006649853463620182,
"stddev": 0.0003506409416358387,
"median": 0.00666406552,
"user": 0.004030931216617209,
"system": 0.0030430608902077133,
"min": 0.00584332452,
"max": 0.00906687752
},
{
"command": "pnpr@main",
"mean": 0.006582305857175792,
"stddev": 0.00025792032605293646,
"median": 0.006599344520000001,
"user": 0.0041202576945244965,
"system": 0.002894625129682997,
"min": 0.00577763152,
"max": 0.00740719152
}
]
}Scenario: Isolated linker: fresh install, cold cache + cold store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 2.42649671576,
"stddev": 0.013313920388351093,
"median": 2.42832338266,
"user": 1.7033896199999998,
"system": 1.40830672,
"min": 2.39954122566,
"max": 2.44288316566
},
{
"command": "pacquet@main",
"mean": 2.42432600936,
"stddev": 0.010480575412355869,
"median": 2.42233864466,
"user": 1.63741532,
"system": 1.4278174199999998,
"min": 2.40711460466,
"max": 2.44118585566
},
{
"command": "pnpr@HEAD",
"mean": 1.4961758271599996,
"stddev": 0.13842464071986207,
"median": 1.45650449516,
"user": 1.0738063199999999,
"system": 1.1803334200000004,
"min": 1.35125537066,
"max": 1.68924881566
},
{
"command": "pnpr@main",
"mean": 1.45361926536,
"stddev": 0.09414043480808007,
"median": 1.3959671946599999,
"user": 1.1238438199999998,
"system": 1.13413772,
"min": 1.37146798666,
"max": 1.62759569466
}
]
}Scenario: Isolated linker: fresh install, hot cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.34272292928,
"stddev": 0.02002892037677826,
"median": 0.34658580898,
"user": 0.53729494,
"system": 0.78088936,
"min": 0.30302954098,
"max": 0.36955708898
},
{
"command": "pacquet@main",
"mean": 0.35117187167999997,
"stddev": 0.01538527520856,
"median": 0.34955661848,
"user": 0.5485925400000001,
"system": 0.77670806,
"min": 0.33102980298,
"max": 0.36971271198
},
{
"command": "pnpr@HEAD",
"mean": 0.27865219158,
"stddev": 0.011881260837519454,
"median": 0.28451617598,
"user": 0.22768753999999997,
"system": 0.49739526000000006,
"min": 0.25309850497999997,
"max": 0.28966506197999997
},
{
"command": "pnpr@main",
"mean": 0.26624188528000003,
"stddev": 0.0061824990637474545,
"median": 0.26420400048000003,
"user": 0.21963603999999998,
"system": 0.52246106,
"min": 0.25965949698,
"max": 0.27875713298
}
]
}Scenario: Isolated linker: fresh install, cold cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 1.54156708582,
"stddev": 0.028525900791995077,
"median": 1.54337475732,
"user": 0.8277882,
"system": 0.9027678199999999,
"min": 1.49863051132,
"max": 1.59503809632
},
{
"command": "pacquet@main",
"mean": 1.5494670575199998,
"stddev": 0.07643064104038429,
"median": 1.51935175382,
"user": 0.8206994999999999,
"system": 0.9772285199999999,
"min": 1.49842933832,
"max": 1.7311825523200002
},
{
"command": "pnpr@HEAD",
"mean": 0.28193981772,
"stddev": 0.009178997997052792,
"median": 0.28168578382000004,
"user": 0.20764280000000004,
"system": 0.47198132,
"min": 0.26970583732000003,
"max": 0.29584028432000004
},
{
"command": "pnpr@main",
"mean": 0.25494080302,
"stddev": 0.006938770444618718,
"median": 0.25399503432000003,
"user": 0.2083063,
"system": 0.4537409199999999,
"min": 0.24576274232,
"max": 0.26649000932
}
]
}Scenario: Isolated linker: fresh resolve, hot cache, offline
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.19849516764000003,
"stddev": 0.013712251743672098,
"median": 0.19486748664,
"user": 0.19582264,
"system": 0.08605553333333334,
"min": 0.18104855864000002,
"max": 0.22803250364000002
},
{
"command": "pacquet@main",
"mean": 0.2097711584971429,
"stddev": 0.012500208658354354,
"median": 0.21104238164,
"user": 0.19623285428571427,
"system": 0.08871282857142856,
"min": 0.19096806664000002,
"max": 0.22600708164000002
},
{
"command": "pnpr@HEAD",
"mean": 0.09198680641419354,
"stddev": 0.0031504448764700286,
"median": 0.09181933864000001,
"user": 0.030982994838709678,
"system": 0.016228483870967744,
"min": 0.08690628064000001,
"max": 0.09844035764000002
},
{
"command": "pnpr@main",
"mean": 0.09281539147870968,
"stddev": 0.002058382556397523,
"median": 0.09298772264,
"user": 0.031183930322580634,
"system": 0.016489432258064516,
"min": 0.08925899864000002,
"max": 0.09856898264000001
}
]
}Scenario: Isolated linker: peer-heavy resolve, hot cache, offline
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.5916819647733333,
"stddev": 0.06535847934691931,
"median": 0.56748840844,
"user": 0.6178681311111112,
"system": 0.11534863999999999,
"min": 0.48232294044,
"max": 0.69580801144
},
{
"command": "pacquet@main",
"mean": 0.5801000092177778,
"stddev": 0.07344939721519868,
"median": 0.59565830844,
"user": 0.6047266866666666,
"system": 0.14411508444444443,
"min": 0.42326062144000004,
"max": 0.67705693144
},
{
"command": "pnpm@HEAD",
"mean": 2.837259888995556,
"stddev": 0.10994364929433388,
"median": 2.7920336694400003,
"user": 4.477795353333334,
"system": 0.21638308444444443,
"min": 2.72940108444,
"max": 3.0264407064400003
}
]
}Scenario: Isolated linker: linked-workspace resolve, hot cache, offline
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.15482933123894738,
"stddev": 0.003261694241023849,
"median": 0.15320660666000002,
"user": 0.1077934294736842,
"system": 0.07998349684210525,
"min": 0.15221930466000003,
"max": 0.16372460466000002
},
{
"command": "pacquet@main",
"mean": 0.16090767716000004,
"stddev": 0.005857010267436626,
"median": 0.16116193066,
"user": 0.11871652888888888,
"system": 0.07862370444444444,
"min": 0.15363986966,
"max": 0.17613232666000003
}
]
}Scenario: Isolated linker: fresh restore, cold cache + cold store + cold pnpr
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 4.38755645482,
"stddev": 0.08794968422723703,
"median": 4.38517186302,
"user": 1.4285691999999999,
"system": 1.6231096600000001,
"min": 4.28675858502,
"max": 4.5742977080200005
},
{
"command": "pacquet@main",
"mean": 4.421129093319999,
"stddev": 0.14217477814614246,
"median": 4.38574344952,
"user": 1.4093124,
"system": 1.49892246,
"min": 4.30051143602,
"max": 4.7352810210200005
},
{
"command": "pnpr@HEAD",
"mean": 3.5155205234199998,
"stddev": 0.1401565796030178,
"median": 3.46581337252,
"user": 1.3285560000000003,
"system": 1.43820986,
"min": 3.3712568000200003,
"max": 3.73815347802
},
{
"command": "pnpr@main",
"mean": 3.4259038839200002,
"stddev": 0.07773734883448805,
"median": 3.3879910330200005,
"user": 1.3081242,
"system": 1.42658716,
"min": 3.36086586502,
"max": 3.57598549302
}
]
}Scenario: GVS linker: fresh restore, hot cache + hot storeSame install as the isolated fresh-restore hot/hot scenario, into the shared virtual store, the layout pnpm 12 installs into by default. Scenarios run on separate machines, so compare main and branch within each table.
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.10152276025629633,
"stddev": 0.0046809967652231745,
"median": 0.10065556796000001,
"user": 0.12603367259259257,
"system": 0.1269825637037037,
"min": 0.09138238196000001,
"max": 0.11128255196
},
{
"command": "pacquet@main",
"mean": 0.10415873268000002,
"stddev": 0.010561874717578853,
"median": 0.09945982796000001,
"user": 0.12964467999999998,
"system": 0.12465794,
"min": 0.09395207096000001,
"max": 0.12785068596
},
{
"command": "pnpr@HEAD",
"mean": 0.11176044096000001,
"stddev": 0.005481741137276186,
"median": 0.11121111946000001,
"user": 0.1304894436363636,
"system": 0.12215831454545456,
"min": 0.10310878596,
"max": 0.12222839496000001
},
{
"command": "pnpr@main",
"mean": 0.1805555240054545,
"stddev": 0.02546960067656977,
"median": 0.18408468146,
"user": 0.19719103454545453,
"system": 0.21500995090909084,
"min": 0.11605373296,
"max": 0.22436520896
}
]
} |
|
| Project | pnpm's project |
| Branch | pr/15149 |
| Testbed | pnpr |
⚠️ WARNING: No Threshold found!Without a Threshold, no Alerts will ever be generated.
Click here to create a new Threshold
For more information, see the Threshold documentation.
To only post results if a Threshold exists, set the--ci-only-thresholdsflag.
Click to view all benchmark results
| Benchmark | Latency | milliseconds (ms) |
|---|---|---|
| gvs-linker.fresh-restore.hot-cache.hot-store | 📈 view plot | 103.11 ms |
| isolated-linker.fresh-install.cold-cache.cold-store | 📈 view plot | 1,351.26 ms |
| isolated-linker.fresh-install.cold-cache.hot-store | 📈 view plot | 269.71 ms |
| isolated-linker.fresh-install.hot-cache.hot-store | 📈 view plot | 253.10 ms |
| isolated-linker.fresh-resolve.hot-cache.offline | 📈 view plot | 86.91 ms |
| isolated-linker.fresh-restore.cold-cache.cold-store | 📈 view plot | 1,300.79 ms |
| isolated-linker.fresh-restore.cold-cache.cold-store.cold-pnpr | 📈 view plot | 3,371.26 ms |
| isolated-linker.fresh-restore.hot-cache.hot-store | 📈 view plot | 217.30 ms |
| isolated-linker.repeat-install.cold-cache.hot-store | 📈 view plot | 5.84 ms |
| isolated-linker.repeat-install.hot-cache.hot-store | 📈 view plot | 5.87 ms |
PR Summary by QodoSkip preparation for explicitly denied Git dependency builds
AI Description
Diagram
High-Level Assessment
Files changed (29)
|
|
Code Review by Qodo
1.
|
PR Code Suggestions ✨Warning
No code suggestions found for the PR. |
|
Addressed the first review round in 9141dc9:
Validation: 104 selected TypeScript tests and 665 selected Rust tests passed. The Rust lint checks also passed. Written by an agent (Codex, GPT-6). |
|
Code review by qodo was updated up to the latest commit 9141dc9 |
PR Code Suggestions ✨Warning
No code suggestions found for the PR. |
Dismissed because a newer commit was pushed; Greptile will re-review the current head.
|
Addressed the additional cache findings in c27fc28. Ignored-script installs cannot probe the prepared variant, and warm cache reads try the alternate variant only if the preferred entry is unusable. The requester test covers a prepared-only store followed by an ignored-script install. All 30 requester tests, compilation, lint, and the push hooks pass. The helper-ordering suggestion does not apply: Written by an agent (Codex, GPT-6). |
|
Code review by qodo was updated up to the latest commit c27fc28 |
PR Code Suggestions ✨Warning
No code suggestions found for the PR. |
|
Investigated the Bencher alert for The same-run comparison does not show a regression from this change. I have rerun the affected scenario and its dependent report to check runner variability. Written by an agent (Codex, GPT-6). |
|
The targeted benchmark rerun passed. The PR measured a 303.0 ms minimum versus 331.0 ms for Written by an agent (Codex, GPT-6). |
Distinguish an explicit denial from an undecided Git dependency build. Install source files when preparation is denied, while retaining the approval error for dependencies without a recorded decision. Carry skipped-preparation state through the fetchers and in-memory cache. Select the existing unprepared store key for denied builds so subsequent approvals prepare the dependency and denials do not reuse prepared output. Apply the behavior to both CLI versions and to cloned Git repositories and Git-hosted tarballs. Cover explicit denials, policy transitions, shared-store approval enforcement, and initially unknown package names. Closes pnpm#10522.
Summary
pnpm installnow installs git-hosted dependencies without preparation whenallowBuildsexplicitly denies their builds. An undecided build still fails withERR_PNPM_GIT_DEP_PREPARE_NOT_ALLOWED.The fix applies to both CLI versions and both cloned repositories and host tarballs. Prepared and unprepared store entries stay separate, including when permissions change or the package name is initially unknown.
Closes #10522.
Validation: 104 selected TypeScript tests and 665 selected Rust tests passed, covering preparation, Git fetching, dependency restoration, Git installs, fresh-requester cache reuse, and patch extraction. Workspace-wide Rust check and lint, TypeScript compilation/lint, and all repository push hooks passed.
Squash Commit Body
Checklist
Written by an agent (Codex, GPT-6).
Summary by CodeRabbit
New Features
Bug Fixes
Tests