Repository navigation
fix(network): respect macOS scoped DNS - #12934
Conversation
Qodo reviews are paused for this user.Troubleshooting steps vary by plan Learn more → On a Teams plan? Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center? |
|
💖 Thanks for opening this pull request! 💖 |
|
Warning Review limit reached
Next review available in: 5 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
📝 WalkthroughWalkthroughThe network client now uses macOS native DNS resolution with bounded concurrency, retains Hickory DNS on other platforms, and adds tests verifying the concurrency limit. A patch changeset documents the release. ChangesDNS resolution behavior
Estimated code review effort: 3 (Moderate) | ~25 minutes Sequence Diagram(s)sequenceDiagram
participant ClientBuilder
participant CappedDnsResolver
participant NativeDnsResolver
participant lookup_host
ClientBuilder->>CappedDnsResolver: Configure DNS on macOS/tests
CappedDnsResolver->>NativeDnsResolver: Acquire permit and resolve
NativeDnsResolver->>lookup_host: Perform native hostname lookup
lookup_host-->>NativeDnsResolver: Return addresses
NativeDnsResolver-->>CappedDnsResolver: Return resolved addresses
CappedDnsResolver-->>ClientBuilder: Provide capped resolver
Suggested labels: Suggested reviewers: ✨ Finishing Touches🧪 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 |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #12934 +/- ##
==========================================
+ Coverage 85.26% 85.42% +0.16%
==========================================
Files 486 489 +3
Lines 77280 77836 +556
==========================================
+ Hits 65890 66491 +601
+ Misses 11390 11345 -45 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Integrated-Benchmark Report (Linux)Commit: Each scenario reports direct installs and pnpr installs. Bencher consumes pacquet@HEAD and pnpr@HEAD. Scenario: Isolated linker: fresh restore, cold cache + cold store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 4.81752192654,
"stddev": 0.6307583652336342,
"median": 4.77103499014,
"user": 3.6553750000000003,
"system": 2.03395028,
"min": 4.1037405831400005,
"max": 5.99453059814,
"times": [
4.98906349614,
5.99453059814,
5.01775843114,
5.02313947914,
5.61708843314,
4.20084785014,
4.44908431014,
4.1037405831400005,
4.22695960014,
4.55300648414
]
},
{
"command": "pacquet@main",
"mean": 4.10706969164,
"stddev": 0.1946450392398457,
"median": 4.00578098714,
"user": 3.7140690999999997,
"system": 2.05099438,
"min": 3.9288414621400003,
"max": 4.4661354621400005,
"times": [
4.4661354621400005,
4.38401583714,
4.15572907314,
3.9288414621400003,
4.23736662514,
3.9673321341400003,
4.01875458914,
3.97594180914,
3.99280738514,
3.9437725391400003
]
},
{
"command": "pnpr@HEAD",
"mean": 2.75822748024,
"stddev": 0.45500028654686336,
"median": 2.65740310964,
"user": 2.5152995999999996,
"system": 1.68849678,
"min": 2.15711419414,
"max": 3.73112672314,
"times": [
2.50917493714,
2.15711419414,
3.19361005214,
2.34095608814,
2.60144971914,
2.72222887114,
2.71335650014,
2.58630784114,
3.73112672314,
3.02694987614
]
},
{
"command": "pnpr@main",
"mean": 2.5162612216400007,
"stddev": 0.363401371936826,
"median": 2.48576181664,
"user": 2.5329874,
"system": 1.7063699799999998,
"min": 2.12638282014,
"max": 3.22168694814,
"times": [
3.22168694814,
2.49899829814,
2.24526288414,
2.72039657614,
2.98262356514,
2.49447044814,
2.17285315814,
2.12638282014,
2.47705318514,
2.22288433314
]
}
]
}Scenario: Isolated linker: fresh restore, hot cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.6518072285000001,
"stddev": 0.08784701529690328,
"median": 0.6366453076,
"user": 0.36744432000000005,
"system": 0.7371167,
"min": 0.5646767921,
"max": 0.7594053391000001,
"times": [
0.5751816461,
0.6981089691000001,
0.7519251451000001,
0.5646767921,
0.5723767731,
0.7370201001000001,
0.7217682791000001,
0.5677939121000001,
0.5698153291,
0.7594053391000001
]
},
{
"command": "pacquet@main",
"mean": 0.622267483,
"stddev": 0.0729171805356289,
"median": 0.5899349401,
"user": 0.35587161999999994,
"system": 0.7228085000000001,
"min": 0.5563413551,
"max": 0.7464592741,
"times": [
0.7079139871000001,
0.5598816391,
0.6883482551000001,
0.6032056321,
0.5563413551,
0.5594646941,
0.5766642481,
0.7464592741,
0.6665044211000001,
0.5578913241000001
]
},
{
"command": "pnpr@HEAD",
"mean": 0.7983850321,
"stddev": 0.24568259951004878,
"median": 0.7214690796000001,
"user": 0.37603131999999995,
"system": 0.7256818,
"min": 0.5681387491000001,
"max": 1.3998527671,
"times": [
0.6243930141,
0.7257531821000001,
0.5681387491000001,
0.5954738001000001,
0.6679143591000001,
0.7171849771000001,
1.3998527671,
0.8978168911000001,
0.9001120001,
0.8872105811000001
]
},
{
"command": "pnpr@main",
"mean": 0.7371390110999999,
"stddev": 0.10366832199847693,
"median": 0.7243422181000001,
"user": 0.37601312,
"system": 0.7437674000000001,
"min": 0.6068574621,
"max": 0.9565863631000001,
"times": [
0.6139569671,
0.9565863631000001,
0.8592032561,
0.7277899951000001,
0.6068574621,
0.7208944411,
0.7118500641000001,
0.7278943401000001,
0.7179776391,
0.7283795831000001
]
}
]
}Scenario: Isolated linker: fresh install, cold cache + cold store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 4.65093166328,
"stddev": 0.3323630813320614,
"median": 4.543575822879999,
"user": 3.66727944,
"system": 1.95408068,
"min": 4.22687270188,
"max": 5.32135594788,
"times": [
4.51907577388,
5.32135594788,
4.22687270188,
5.13528434688,
4.37718771688,
4.63517310988,
4.55129491488,
4.5326294558799995,
4.6745859338799995,
4.53585673088
]
},
{
"command": "pacquet@main",
"mean": 4.638903260579999,
"stddev": 0.19745618779815774,
"median": 4.72245822788,
"user": 3.6598538399999994,
"system": 1.9590062799999994,
"min": 4.30609015588,
"max": 4.81872279788,
"times": [
4.8111925828799995,
4.59697302488,
4.33760739888,
4.78785459788,
4.70677273988,
4.73814371588,
4.48646078588,
4.81872279788,
4.79921480588,
4.30609015588
]
},
{
"command": "pnpr@HEAD",
"mean": 2.52953598488,
"stddev": 0.33413038583161714,
"median": 2.49393160038,
"user": 2.3026057399999997,
"system": 1.6306178799999997,
"min": 2.17292300588,
"max": 3.37459108788,
"times": [
2.22034324788,
2.3647079028799998,
2.51233800688,
2.61290671188,
2.57049356288,
2.61110554788,
2.38042558088,
2.47552519388,
3.37459108788,
2.17292300588
]
},
{
"command": "pnpr@main",
"mean": 2.61247724748,
"stddev": 0.3711395191471553,
"median": 2.53758706088,
"user": 2.28317954,
"system": 1.6065210799999996,
"min": 2.07111103488,
"max": 3.46937071888,
"times": [
2.41484494988,
2.72092304788,
2.71785261688,
2.45646775588,
2.47083588888,
2.3696983878799998,
2.07111103488,
2.60433823288,
3.46937071888,
2.82932984088
]
}
]
}Scenario: Isolated linker: fresh install, hot cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 1.2507981939600001,
"stddev": 0.0486373315073732,
"median": 1.2397833385600001,
"user": 1.2679281599999999,
"system": 0.92642358,
"min": 1.20402943156,
"max": 1.35427736356,
"times": [
1.23638540756,
1.24318126956,
1.22100571756,
1.20756792156,
1.35427736356,
1.25916947556,
1.2130657385599999,
1.31282054056,
1.25647907356,
1.20402943156
]
},
{
"command": "pacquet@main",
"mean": 1.36854553056,
"stddev": 0.21789377272568866,
"median": 1.2691895290600002,
"user": 1.28163886,
"system": 0.93976118,
"min": 1.21228019456,
"max": 1.87059173056,
"times": [
1.29186968756,
1.23902769856,
1.25262679156,
1.65261949556,
1.87059173056,
1.37686081156,
1.21228019456,
1.2843290895600001,
1.25404996856,
1.25119983756
]
},
{
"command": "pnpr@HEAD",
"mean": 0.6477814876600001,
"stddev": 0.12028953667256478,
"median": 0.60204511356,
"user": 0.31910466,
"system": 0.6866764799999998,
"min": 0.58061582156,
"max": 0.9793770645600001,
"times": [
0.59286702256,
0.59286675556,
0.58061582156,
0.5957059395600001,
0.6083842875600001,
0.5884506645600001,
0.68170150456,
0.62251721356,
0.63532860256,
0.9793770645600001
]
},
{
"command": "pnpr@main",
"mean": 0.6533891159600002,
"stddev": 0.047185626214910396,
"median": 0.64686923656,
"user": 0.31600755999999997,
"system": 0.69001178,
"min": 0.59013679456,
"max": 0.74489191956,
"times": [
0.60372699956,
0.59013679456,
0.65284705156,
0.68563721556,
0.74489191956,
0.6335447375600001,
0.65251788956,
0.64122058356,
0.62369379356,
0.70567417456
]
}
]
}Scenario: Isolated linker: fresh install, cold cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 2.97090305532,
"stddev": 0.16313980652951734,
"median": 2.91297482572,
"user": 1.7879826,
"system": 1.1353429,
"min": 2.83632165872,
"max": 3.36023829272,
"times": [
2.83632165872,
2.98597829872,
2.90959518572,
2.8872983757200004,
2.91635446572,
3.14873358072,
2.93704332272,
2.85520856572,
3.36023829272,
2.87225880672
]
},
{
"command": "pacquet@main",
"mean": 2.9645315971199997,
"stddev": 0.13906706356147408,
"median": 2.92935213972,
"user": 1.7750622,
"system": 1.1554638000000002,
"min": 2.8721238697200002,
"max": 3.34978859772,
"times": [
2.93112821272,
2.95309851272,
2.89580765472,
2.8721238697200002,
2.9275760667200004,
2.95278541472,
2.89763181172,
2.8932043637200002,
3.34978859772,
2.97217146672
]
},
{
"command": "pnpr@HEAD",
"mean": 0.60959606262,
"stddev": 0.02003346425451122,
"median": 0.60463679072,
"user": 0.32280889999999995,
"system": 0.6915538999999999,
"min": 0.58540668172,
"max": 0.64930001672,
"times": [
0.58540668172,
0.63726073972,
0.6047260087199999,
0.59700342872,
0.60454757272,
0.64930001672,
0.61474632872,
0.59981912572,
0.5909302547199999,
0.61222046872
]
},
{
"command": "pnpr@main",
"mean": 0.6122519775199999,
"stddev": 0.0389665096551999,
"median": 0.59762850122,
"user": 0.32231319999999997,
"system": 0.6918151,
"min": 0.5810460857199999,
"max": 0.71157200372,
"times": [
0.59592512672,
0.62205551072,
0.5810460857199999,
0.71157200372,
0.63750413572,
0.60592222272,
0.5970126367199999,
0.59824436572,
0.58191532472,
0.5913223627199999
]
}
]
}Scenario: Isolated linker: fresh resolve, hot cache, offline
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.61437375358,
"stddev": 0.009474607840713129,
"median": 0.6116446842800001,
"user": 0.59519906,
"system": 0.10152846,
"min": 0.6049663657800001,
"max": 0.6295873107800001,
"times": [
0.6059938677800001,
0.6295873107800001,
0.6049663657800001,
0.60593774978,
0.60904158178,
0.61424778678,
0.61689921778,
0.62245553678,
0.6280105837800001,
0.60659753478
]
},
{
"command": "pacquet@main",
"mean": 0.60941928148,
"stddev": 0.007229372973632884,
"median": 0.6095027337800001,
"user": 0.59494116,
"system": 0.09782055999999999,
"min": 0.59751163178,
"max": 0.6225212357800001,
"times": [
0.60107855678,
0.6225212357800001,
0.61254872378,
0.6092340767800001,
0.61702695878,
0.59751163178,
0.6064342247800001,
0.60676187778,
0.60977139078,
0.61130413778
]
},
{
"command": "pnpr@HEAD",
"mean": 0.09988945360142856,
"stddev": 0.0011668153493998585,
"median": 0.09994850528,
"user": 0.024393945714285718,
"system": 0.012840974285714285,
"min": 0.09688699678,
"max": 0.10181971878,
"times": [
0.09969253378,
0.10116588378000001,
0.09856408378,
0.10011747078,
0.10061265778,
0.10044318778,
0.09947471278,
0.10095068278,
0.09919958778,
0.09951183378,
0.10126394178,
0.10132166878,
0.09839821878,
0.10020512078,
0.09964484678,
0.10042167278,
0.10049689978,
0.09992651278,
0.09961094778,
0.09943903078,
0.09688699678,
0.09997049778,
0.10181971878,
0.09754154578,
0.10145660778,
0.09941247678,
0.10073727378,
0.09861808778
]
},
{
"command": "pnpr@main",
"mean": 0.09989132628,
"stddev": 0.0008747212216001135,
"median": 0.10004018328,
"user": 0.02429215999999999,
"system": 0.012954117142857142,
"min": 0.09647503978,
"max": 0.10091718078,
"times": [
0.09939129578,
0.10070241378,
0.09990878578,
0.09995251478,
0.09951012878,
0.10030596878,
0.10062902278,
0.09929396978,
0.10079252178,
0.09971441978,
0.10044302078,
0.10091718078,
0.10035867078,
0.09906956578,
0.09966464278,
0.10041464078,
0.09920544978,
0.10052298278,
0.09901473478,
0.09647503978,
0.10084550378,
0.10014333878,
0.09981868478,
0.10012785178,
0.10032975878,
0.09960779178,
0.10039490578,
0.09940232978
]
}
]
}Scenario: Isolated linker: fresh restore, cold cache + cold store + cold pnpr
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 15.007503014,
"stddev": 3.36094276818738,
"median": 14.2019070714,
"user": 3.66449656,
"system": 2.14048814,
"min": 11.4647346284,
"max": 23.2027202624,
"times": [
16.8260410104,
13.7350330574,
16.3315714384,
14.0745270984,
14.329287044400001,
12.746615611400001,
11.4647346284,
12.0518218804,
15.3126781084,
23.2027202624
]
},
{
"command": "pacquet@main",
"mean": 11.1666478114,
"stddev": 3.1785079739011257,
"median": 10.473221436900001,
"user": 3.65106846,
"system": 2.1226609400000003,
"min": 8.0771949804,
"max": 18.887723956400002,
"times": [
18.887723956400002,
12.6180251434,
13.3045231954,
10.7859576774,
8.9059209214,
8.0771949804,
10.2701253344,
9.0543365234,
10.676317539400001,
9.0863528424
]
},
{
"command": "pnpr@HEAD",
"mean": 7.483928744900001,
"stddev": 1.2037660362317046,
"median": 8.0483938044,
"user": 2.51921736,
"system": 1.7865895399999996,
"min": 5.667415918400001,
"max": 8.616413918400001,
"times": [
8.4187358614,
5.9631755034000005,
8.406336123400001,
7.7562763684,
8.616413918400001,
8.3405112404,
5.667415918400001,
8.4938674064,
5.8848653834,
7.2916897254
]
},
{
"command": "pnpr@main",
"mean": 7.474522939300002,
"stddev": 1.826760548867035,
"median": 6.6400808929,
"user": 2.50308246,
"system": 1.76688164,
"min": 5.564451286400001,
"max": 10.2500092324,
"times": [
5.7136595984000005,
7.860556534400001,
6.133465264400001,
6.9279587494,
6.352203036400001,
5.564451286400001,
6.346090822400001,
9.8210784704,
9.7757563984,
10.2500092324
]
}
]
} |
|
| Branch | pr/12934 |
| 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) |
|---|---|---|
| isolated-linker.fresh-install.cold-cache.cold-store | 📈 view plot | 2,169.24 ms |
| isolated-linker.fresh-install.cold-cache.hot-store | 📈 view plot | 650.79 ms |
| isolated-linker.fresh-install.hot-cache.hot-store | 📈 view plot | 675.85 ms |
| isolated-linker.fresh-resolve.hot-cache.offline | 📈 view plot | 108.06 ms |
| isolated-linker.fresh-restore.cold-cache.cold-store | 📈 view plot | 2,197.11 ms |
| isolated-linker.fresh-restore.cold-cache.cold-store.cold-pnpr | 📈 view plot | 5,005.76 ms |
| isolated-linker.fresh-restore.hot-cache.hot-store | 📈 view plot | 732.76 ms |
fc585eb to
38b4db6
Compare
Confidence Score: 5/5Safe to merge. The change is narrowly scoped to DNS resolver selection, macOS-only in production, and backed by a deterministic concurrency test. The native-resolver path on macOS is straightforward: No files require special attention. Reviews (3): Last reviewed commit: "fix(network): target pacquet in the scop..." | Re-trigger Greptile |
38b4db6 to
6d7a51f
Compare
Code Review by Qodo
Context used✅ Compliance rules (platform):
18 rules 1. pnpm missing changeset entry
|
PR Code Suggestions ✨Latest suggestions up to 6e85b10 Warning
Previous suggestionsSuggestions up to commit 6d7a51f
|
||||||||||||||||||
The scoped-DNS fix lives entirely in pnpm/crates/network (pacquet); in changesets `pnpm` means the TypeScript CLI, which is unaffected. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
| @@ -0,0 +1,5 @@ | |||
| --- | |||
| "pacquet": patch | |||
There was a problem hiding this comment.
1. pnpm missing changeset entry 📘 Rule violation § Compliance
The new changeset declares a bump for pacquet but does not include the required pnpm entry. This violates the changeset policy and can prevent pnpm from being versioned/released correctly for this fix.
Agent Prompt
## Issue description
The changeset front-matter is missing a required `pnpm` entry.
## Issue Context
Compliance requires every changeset to explicitly declare a `pnpm` bump (`patch`/`minor`/`major`) when relevant.
## Fix Focus Areas
- .changeset/calm-cats-resolve.md[1-3]
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
|
Code review by qodo was updated up to the latest commit 6e85b10 |
Problem
pnpm v12 hard-enables Hickory DNS for install requests. On macOS, Hickory reads the global DNS state but does not honor the full scoped/supplemental resolver graph used by VPNs such as Tailscale. In that setup, public registry names can be sent to a supplemental resolver with its search suffix and repeatedly fail.
Fix
getaddrinforesolution throughtokio::net::lookup_hostmDNSResponderoverloadThis also avoids a registry-specific trailing-dot workaround, so tarball, custom-registry, and other HTTP hosts use the same correct macOS resolver routing. Hickory per-domain macOS resolver support is tracked in hickory-dns/hickory-dns#2251.
Verification
cargo fmt --all -- --checkcargo test -p pacquet-network(102 passed)cargo clippy -p pacquet-network --tests --no-depshttps://registry.npmjs.org/on the affected Tailscale Mac (2 packages downloaded, 271 ms)Summary by CodeRabbit