Skip to content

TOOLS-4148 Convert mode_upsert_id_subdoc.js to Go#964

Draft
autarch wants to merge 1 commit into03-25-tools-4148_convert_mongoimport_mode.js_to_go_integration_testsfrom
03-26-tools-4148_convert_mode_upsert_id_subdoc.js_to_go
Draft

TOOLS-4148 Convert mode_upsert_id_subdoc.js to Go#964
autarch wants to merge 1 commit into03-25-tools-4148_convert_mongoimport_mode.js_to_go_integration_testsfrom
03-26-tools-4148_convert_mode_upsert_id_subdoc.js_to_go

Conversation

@autarch
Copy link
Collaborator

@autarch autarch commented Mar 26, 2026

TestImportModeUpsertIDSubdoc verifies that --mode=upsert correctly uses a
full subdocument _id as the upsert key, preserving field order through a
round-trip of export → upsert-replace → re-import.

Helpers added:

  • exportCollectionToFile: exports a collection to a canonical JSON temp file
  • writeSubdocIDFile: writes a JSON lines file for the subdoc-_id docs
  • subdocIDDocs: builds the 20 test docs with complex nested _ids

Copy link
Collaborator Author

autarch commented Mar 26, 2026

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

This stack of pull requests is managed by Graphite. Learn more about stacking.

@autarch autarch force-pushed the 03-26-tools-4148_convert_mode_upsert_id_subdoc.js_to_go branch from fab9688 to 4acd009 Compare March 26, 2026 22:02
@autarch autarch force-pushed the 03-25-tools-4148_convert_mongoimport_mode.js_to_go_integration_tests branch from 14528f8 to 22fc798 Compare March 26, 2026 22:02
TestImportModeUpsertIDSubdoc verifies that --mode=upsert correctly uses a
full subdocument _id as the upsert key, preserving field order through a
round-trip of export → upsert-replace → re-import.

Helpers added:
- exportCollectionToFile: exports a collection to a canonical JSON temp file
- writeSubdocIDFile: writes a JSON lines file for the subdoc-_id docs
- subdocIDDocs: builds the 20 test docs with complex nested _ids
@autarch autarch force-pushed the 03-25-tools-4148_convert_mongoimport_mode.js_to_go_integration_tests branch from 22fc798 to c8a35cb Compare March 26, 2026 22:03
@autarch autarch force-pushed the 03-26-tools-4148_convert_mode_upsert_id_subdoc.js_to_go branch from 4acd009 to 23b8e20 Compare March 26, 2026 22:03
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