Skip to content

fix(linux-mongodb): seed-list login, field-safe writes and exports, UUID columns, drops that ask, stops on Atlas free tier - #4202

Merged
datlechin merged 4 commits into
mainfrom
fix/linux-mongodb-3646
Nov 11, 2026
Merged

datlechin merged 4 commits into
mainfrom
fix/linux-mongodb-3646

Conversation

@datlechin

Copy link
Copy Markdown
Member

Summary

  • DNS seed list: the URI carries the user name (never the password), so the login uses the TXT record's authSource instead of admin.
  • Writes: a NULL cell in a new, duplicated or imported document is a field left out, and an edit to NULL is $unset. Copy As and statement exports leave them out too.
  • Table export reads every field (ExportFields::Every, no $project). The server tallies fields and types over the matching documents first; an empty export keeps the collection's columns. MCP browse_table and export_data keep the listed columns.
  • Census: UUIDs (binary subtype 4) found by BSON sort order are a UUID column. A field of more than one numeric type is a JSON column (maintainer decision), and JSON columns on a document engine filter with comparisons.
  • A connection that never read a collection's fields takes the census on its first page or export, so JSON columns survive a reconnect.
  • Safe Mode Off asks before every drop (dropIndex(es), dropUser, dropRole, dropAll..., renameCollection over a target), $out, a replacing mapReduce, convertToCapped, applyOps and a bulkWrite that reaches every document. Read-only refuses validate with repair or fixMultikey.
  • Stop: when killSessions is refused (Atlas M0 and Flex), killOp for the operations currentOp lists under the call's session. A read then ends before its next batch, since killOp reaches no idle cursor.
  • Editor: a find whose projection names the columns streams under the sink's backpressure, with ColumnsResolved at the end. adding-drivers.md records the document exception for discovered columns.
  • Tests: the document suite again through the driver's relay, with a stopped workspace read and a save that fails at its second step; OpenSSH session test pages and saves; Docker tests for the seed list (MongoDB's public spec records, host port 27017), replica-set discovery, refused killSessions, UUID columns, mixed numbers, reconnect, projected streaming and a table export past the census.
  • Docs: mongodb.md, adding-drivers.md (network options, backpressure exception, checklist), testing.md.
  • Tests changed on purpose: field_types::a_field_takes_the_type_its_values_share, catalog::fields_come_in_the_order_documents_place_them_with_id_first (int and long is JSON), catalog::an_empty_collection_still_has_its_id (moved to collection_columns), shell_access::an_aggregate_that_writes_its_results_is_a_write ($out is destructive), document::tests::a_change_names_its_document_by_id_and_sets_only_the_fields_changed (NULL moved to its own $unset test), session_mongodb::collections_list_and_statements_run_through_openssh (now collections_list_page_and_save_through_openssh).

Test plan

  • cargo test -p tablepro-driver-mongodb --test integration -- --ignored --test-threads=1 on MongoDB 8.0 (macOS, Docker Desktop): 75 of 77 pass. The seed list, refused killSessions, export past the census, mixed numbers and reconnect cases fail on main. The two tls::forwarded::* failures happen on main too on macOS (Security.framework reports an untrusted root as Other).
  • Unit tests of core, mcp, test-support, test-fixtures and the driver; clippy with and without default features; rustfmt.
  • session_mongodb needs Linux (the SSH control path is past macOS's socket path limit): CI's session job.

Fixes #3646

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.

MongoDB driver for the Linux app

1 participant