refactor(dns): remove the unused instance-DNS view and its SQL hostname function#2749
Conversation
…me function `nico_inet_to_dns_hostname` and the `dns_records_instance` view derived forward A/AAAA names directly from instance IP addresses (`10.1.2.3` -> `10-1-2-3`). That view was dropped from the served `dns_records` view back in early 2025 and has not been served since; today the only thing that touched either object was a unit test. IP-derived hostnames are produced by the host-naming strategy -- the Rust `address_to_hostname` helper -- and stored in `machine_interfaces.hostname`, which the shortname/adm views serve, so the SQL function was a stale duplicate of that logic. This drops the view and the function -- verified to have no remaining dependents: nothing in the codebase queries them, there are no external grants, and a RESTRICT drop of both succeeds -- and removes the two tests that exercised them. IP-derived DNS is unchanged; it flows through the naming strategy and the stored hostname, not this view. This supports NVIDIA#2709. Signed-off-by: Chet Nichols III <chetn@nvidia.com>
|
Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually. Contributors can view more details about this message here. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (2)
💤 Files with no reviewable changes (1)
Summary by CodeRabbit
WalkthroughA database migration drops the ChangesDNS SQL Object Removal and Test Cleanup
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Possibly related issues
Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
@coderabbitai review |
✅ Action performedReview finished.
|
🔍 Container Scan Summary
Per-CVE detail lives in the per-service |
Summary
nico_inet_to_dns_hostname(a PL/pgSQL function) and thedns_records_instanceview derived forward A/AAAA names directly from instance IP addresses (10.1.2.3→10-1-2-3). The view was dropped from the serveddns_recordsview in early 2025 and hasn't been served since — repo-wide, the only thing touching either object was a unit test. IP-derived hostnames are produced by the host-naming strategy (the Rustaddress_to_hostnamehelper) and stored inmachine_interfaces.hostname, which the shortname/adm views serve, so the SQL function was a stale duplicate of that logic.dns_records_instance, thennico_inet_to_dns_hostname(inet).Verified no remaining consumers: nothing in code or config queries them (PowerDNS uses the remote backend → the combined
dns_recordsview, which excludes instance), no external grants on the view, and a RESTRICTDROPof both succeeds cleanly against the schema. IP-derived DNS is unchanged — it flows through the naming strategy + the stored hostname, not this view.Implements #2709. Follow-up to the #2630 reverse-DNS epic.
Draft pending review.