Repository navigation
fix: support pnpr keeping its registries in the database - #84
Conversation
pnpr 0.1.0-alpha.20 reads its registries only from its database and refuses a config file that declares them, drops `auth.users.file`, and no longer lets its resolver reach the public URL's host at another origin. - Store the registries with `pnpr registries import` before each start. - Drop the users file: accounts live in the database, inside storage, so a seeded storage arrives with the account and `mintToken` signs in to it. - Set a fixed `secret`, which pnpr requires to reuse a cache directory. - Run pnpr on 127.0.0.2 so the resolver can reach its un-proxied address while clients and the latency proxies stay on 127.0.0.1, and allow loopback through `routes.allowedPrivateNetworks`. - Pass `listen` and `publicUrl` in the config so the import checks routes against the same addresses the server uses. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
PR Summary by QodoFix pnpr benchmarks for database-backed registries
AI Description
Diagram
High-Level Assessment
Files changed (4)
|
The scheduled benchmark fails with the latest pnpr (0.1.0-alpha.20) and pnpm (12.21.0): run 43509974464 stopped in
populate-registry-cachewithalpha.20 changed several things the benchmark relied on:
registries,defaultRegistryandroutes.publicinpnpr.yamlare now config errors. They are written to a separateregistries.yamland stored withpnpr registries importbefore every start; the import replaces whatever the seeded storage carried.auth.users.fileis gone. Accounts live in the database, which pnpr keeps inside storage and binds the storage to. A storage seeded bypopulatePnprCache.jstherefore arrives with the benchmark account, andmintToken's PUT signs in to it instead of registering.secretis required to reuse a cache directory. A fixed one is set, so every sample job can reuse the populated storage.127.0.0.1. Spelling itlocalhostdoesn't help, because the resolver looks it up and refuses it anyway. pnpr now listens on127.0.0.2, the latency proxies forward to it, and clients keep using127.0.0.1. Loopback is allowed throughroutes.allowedPrivateNetworks. This relies on all of127.0.0.0/8being loopback, which is true on Linux, where the benchmark runs.listenandpublicUrlare now set in the config file rather than as flags, so the offlineregistries importchecks routes against the same addresses the server uses.Testing
pnpm run lintandpnpm testpass.startPnpr,mintToken, the latency proxies andverifyResolverIsUsedon a small project that includes a@teambitpackage:🤖 Generated with Claude Code
Summary by CodeRabbit