Skip to content

Migrate mongodb crate to 3.9 and fix SRV DNS on macOS - #37

Merged
pavi2410 merged 5 commits into
mainfrom
chore/mongodb-3
Oct 12, 2026
Merged

pavi2410 merged 5 commits into
mainfrom
chore/mongodb-3

Conversation

@pavi2410

Copy link
Copy Markdown
Owner

Summary

  • Upgrade mongodb from 2.8.2 to 3.9.1 (and bson to 3.x). Moves to the 3.x fluent API: no trailing None options args, find(...).limit(n) instead of FindOptions, and the removed tokio-runtime feature is dropped.
  • Fix mongodb+srv:// connections failing on macOS with "failed to parse nameserver address: invalid IP address syntax". The system resolver config can contain scoped IPv6 nameservers (fe80::...%en0) that hickory can't parse. parse_client_options now retries SRV lookups via Cloudflare when the system resolver fails.

Notes

  • Fallback sends SRV/TXT lookups for the cluster hostname to Cloudflare, only when system DNS has already failed.
  • cargo check, cargo test --workspace pass; SRV resolution verified against a real Atlas host with a throwaway test (not committed).
  • Not tested against a live MongoDB: connect, browse, edit documents, aggregation and change streams still need a manual pass.

🤖 Generated with Claude Code

pavi2410 and others added 5 commits October 13, 2026 03:46
Claude Code now falls back to AGENTS.md when no CLAUDE.md exists, so drop CLAUDE.md and make the AGENTS.md header agent-neutral.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Remove references to the nonexistent CLI crate, add the crates/ table,
fix the tab label path, and correct stale module names.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Switch to the 3.x fluent API: drop the trailing `None` options argument
from CRUD, aggregate, run_command, list and watch calls, and chain
`.limit()` on find instead of building FindOptions. The tokio-runtime
feature no longer exists.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
macOS can list scoped IPv6 nameservers such as `fe80::1%en0`, which the
driver's resolver rejects with "invalid IP address syntax". Parse URIs
through a helper that retries SRV lookups via Cloudflare on failure.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@pavi2410
pavi2410 merged commit dcf00d6 into main Oct 12, 2026
2 checks passed
@pavi2410
pavi2410 deleted the chore/mongodb-3 branch October 12, 2026 23:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant