Skip to content

chore: absorb dns into packages/dns - #13927

Merged
ChiragAgg5k merged 232 commits into
mainfrom
chore/absorb-dns
Sep 28, 2026
Merged

ChiragAgg5k merged 232 commits into
mainfrom
chore/absorb-dns

Conversation

@ChiragAgg5k

Copy link
Copy Markdown
Member

Summary

Moves utopia-php/dns into packages/dns so Appwrite loads it directly. Wave 3 of #13828, following the playbook in rfc/monorepo.md. The mirror head (c4ea29c) is the 3.0.7 release Appwrite already locks, so there is no version gap.

Stacked on #13922 (dns requires domains). Base is chore/absorb-domains; GitHub retargets this to main once #13922 merges. Merge after #13922, with a merge commit.

Commits

Commit What
Add 'packages/dns/' from commit 'c4ea29c…' Subtree import from the mirror with full history
chore(dns): mirror plumbing mirror.yml points here, README banner refreshed, .gitpod.yml removed
refactor: load dns from packages/ Root wiring, step A shape, QA config, RFC baseline line

What changed

Area Change
Root composer.json Autoload, autoload-dev and replace entries added; utopia-php/dns: ^3.0.7 removed from require
Hoisting Nothing to hoist: the package requires ext-sockets (already in root) plus domains, telemetry and validators, all in packages/
composer.lock Only utopia-php/dns removed (+1/−58, content hash)
src/ src/DNS/* moved up to src/. Pint only (empty {} bodies, fn ( spacing); no other edits
tests/ tests/unit/DNS/* → tests/. From tests/e2e/DNS/, the tests that open sockets or query the network (ClientTest, HttpTest, ProxyProtocolTest against the compose server; Resolver/CloudflareTest, Resolver/GoogleTest, Validator/DNSTest against public resolvers) → tests/E2E/. The pure ones (Resolver/MemoryTest, Validator/CAATest, Validator/NameTest) join the unit tier. Namespaces Tests\Unit\Utopia\DNS / Tests\E2E\Utopia\DNS → Utopia\DNS\Tests\…. FileTest's fixture path loses the two removed levels
Dockerfile, docker-compose.yml The e2e DNS server is built from Dockerfile via build.context: ., which absorb does not recognise, so it deleted it. Restored, and dockerfile: Dockerfile made explicit so validate keeps it
phpunit.xml unit = tests minus tests/E2E and tests/bench; e2e = tests/E2E
phpstan.neon Standalone, level max over src and tests (previously included the monorepo root at level 5), with phpstan-baseline.neon holding 8 findings, all in src: mixed offsets on Swoole request fields in the DoH adapter, and chr() arguments in Record and Zone\File. Added to the RFC phase 8 list
rector.php Standalone; skips ClassPropertyAssignToConstructorPromotionRector, ReadOnlyPropertyRector and IfToNullCoalescingAssignRector (the last would rewrite Message::query()) so src stays as released

Validation

Check Result
bin/monorepo validate all packages valid
bin/monorepo check dns Rector, Pint, PHPStan level max (with baseline) pass
bin/monorepo test dns unit 190 tests / 722 assertions OK; e2e 25 tests / 178 assertions OK (compose DNS server plus public resolvers)
vendor/bin/phpunit --testsuite packages --filter 'Utopia\\DNS' in appwrite/appwrite:2.3.0 190 tests / 722 assertions OK
Host PHPStan on Proxy/Action.php, Network/Validator/DNS.php, tests/unit/Network/Validators/DNSTest.php No errors
Autoload Utopia\DNS\Client resolves to packages/dns/src/Client.php
composer validate --no-check-publish valid (existing utopia-php/platform exact-version warning)
bin/monorepo split dns --dry-run adc7d33, fast-forward of the mirror head c4ea29c (+2 commits)
git diff --check clean on this PR's own commits; the imported zone-file fixtures keep their upstream trailing whitespace on purpose (parser input)

Mirror state

Ruleset Canonical main ruleset (11469492), split app (4016286) as always-bypass, so absorbed with --skip-ruleset
Classic branch protection on main None

After merge

Step
Merge with a merge commit, after #13922 A squash drops the subtree annotation and orphans the package from its mirror
Confirm Split The Split run for dns is green and the mirror fast-forwards from c4ea29c
Retire from utopia-php/monorepo Remove packages/dns there
Monorepo PR utopia-php/monorepo#180 (Client::fromSystem() reading /etc/resolv.conf, plus an IPv6 UDP socket-family fix): re-open here against packages/dns
Mirror PRs utopia-php/dns#44 (PROXY protocol for Native/Swoole adapters, likely superseded: ProxyProtocol already ships in 3.0.7) and utopia-php/dns#36 (DNS over HTTPS client and resolvers): re-open here or close
Mirror issues utopia-php/dns#30 (apex SOA query returns NXDOMAIN): looks fixed, Zone\ResolverTest covers apex SOA answers; close after confirming

🤖 Generated with Claude Code

ChiragAgg5k and others added 7 commits September 2, 2026 08:57
chore: stop committing package lock files
…-port

test(dns): pin zero through the wire format and the zone file
chore(domains,dns,http,queue): require Validators ^1.0
…b9c0'

git-subtree-dir: packages/dns
git-subtree-mainline: b0027a7
git-subtree-split: c4ea29c
@ChiragAgg5k ChiragAgg5k added the absorb History-preserving package absorption; merge commit required label Sep 26, 2026
@greptile-apps

greptile-apps Bot commented Sep 26, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 5/5

[High risk] Moves DNS package from external dependency to monorepo.

No new issue from the change since the previous review prevents merging.

Summary

The PR absorbs Utopia DNS into packages/dns, wires it into root Composer autoloading, and adds package-local tests and tooling. Since the previous review, the only change corrects the README’s resolver link.

Reviews (11) · Last reviewed commit: "docs(dns): point the Resolver link at it..."

Comment thread packages/dns/tests/Zone/FileTest.php Resolved
Comment thread packages/dns/README.md Resolved
@github-actions

github-actions Bot commented Sep 26, 2026 •

Copy link
Copy Markdown

✨ Benchmark results

Comparing main (before) → chore/absorb-dns (after).

Metric Before After Change
🚀 Requests/sec 166.35 157.37 🔴 -5.4%
⏱️ Latency P50 104.95 ms 110.12 ms ⚪ +4.9%
⏱️ Latency P95 247.27 ms 257.04 ms ⚪ +4%
Per-scenario breakdown & investigation details

Metrics below reflect the current branch (after). Δ P95 compares against the base.

Scenario P50 (ms) P95 (ms) Requests RPS Δ P95 (ms)
API total 110.12 257.04 10,260 157.37 +9.77
Account 215.55 389.34 540 8.95 +6.22
TablesDB 105.79 204.28 5,580 87.44 +17.68
Storage 103.41 221.17 2,700 43.89 +14.16
Functions 152.59 299.45 1,440 23.98 -6.73

Top API waits (after)

API request Max wait (ms)
account.name.update 636.97
account.prefs.update 495.47
functions.delete 462.18
functions.variables.update 448.35
functions.variables.delete 416.16

Comment thread packages/dns/src/Zone/File.php Resolved
Comment thread packages/dns/src/Message/Record.php Resolved
…/absorb-dns

# Conflicts:
#	composer.json
#	composer.lock
@ChiragAgg5k
ChiragAgg5k changed the base branch from chore/absorb-domains to main September 28, 2026 10:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

absorb History-preserving package absorption; merge commit required

Projects

None yet

Development

Successfully merging this pull request may close these issues.