Conversation
…th database, hosts, SRV and TLS
…ects in the Restore confirmation
# Conflicts: # CHANGELOG.md # Plugins/SurrealDBDriverPlugin/SurrealValue+Display.swift
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
mongorestoregot--nsInclude=<target>.*, which matches the<source>.*namespaces stored in the archive, so every collection was filtered out and the tool still exited 0; it now gets--nsFrom=$db$.$coll$ --nsTo=<target>.$coll$.--host,--port,--authenticationDatabaseand--sslflags with their own auth database rule instead of the connection the driver uses; they now get one connection string, built with the driver's rule, in the0600config file next to the password.mysqldump, whilepg_restore,mongorestoreandsqlite3keep existing objects, DuckDB stops at the first one andsqlpackageneeds an empty database; each dump descriptor now declares what its restore does.Tests
NativeDumpRegistryTests.mongoScopesItsDatabase: spec change, the old assertion expected--nsInclude=sales.*and encoded the defect. Fails without the fix.mongoRestoreTargetIsLiteral(new) pins that*in the target stays literal.NativeDumpRegistryTests.mongoAuthenticatesAgainstTheAuthDatabase,mongoSrvUsesAConnectionString(kind:),mongoHostListUsesAConnectionStringandmongoRequiredSkipsVerification(new), plusmongoSkipsCredentialsWithoutUserandemptyHostFallsBackToLoopback(spec changes, the connection moved from argv into the config file). All six fail without the fix.MongoToolsConnectionStringTests(new, 11 cases): auth database parity with the driver'sMongoDBAuthSourceResolverfor every combination, SRV detection and port stripping, host list ports and IPv6, username encoding, connection options, extra URI parameters and each TLS mode. The type it tests is new, so it does not build without the fix.RestoreConfirmationTextTests(new, 6 cases): only MySQL and MariaDB say objects are overwritten, the appending engines say they are kept, DuckDB says it stops in both formats, SQL Server says it needs an empty database. Four of the six fail without the fix.RestoreConfirmationTextTestscovers the text the flow shows.Docs
The docs rewrite branch covers the user-facing text:
docs/features/backup-restore.mdx(the--nsIncludesentence and "Objects it names are overwritten") anddocs/databases/mongodb.mdx(Auth Database).CI fixes
The failed package test was
SyncRecordMapperTests.unknownWireValueFailsClosed. The mapper's duplicate Safe Mode decoder turned unknown values into Off. It now uses the model'sSafeModeLevel(wireValue:isReadOnly:)policy. Added regressions for unknown values on read-only connections and renames that preserve unknown wire values.The AllPlugins build failed because SurrealDB's JSON helper had become a property while its callers still supplied the requested text length. Restored the length-taking helper, keeping display truncation and complete export text.
Verification for these fixes:
TableProApp/rust-dameng,Contents/MacOS,Contents/Helpers,/Applications/Xcode-beta.app).Integrated main at
91150eb64and kept both sets of changelog entries.Pushing these commits triggers fresh GitHub Actions runs.
Unit-test compile correction
The unit-test build exposed three fixtures still calling the old one-argument cell API: two in Typesense and one in Elasticsearch. They now explicitly pass
length: .display, retaining their expected display truncation and write-refusal behavior.Both fixture files are identical on all four updated branches. The complete test target built on #3183, with all 87 selected storage and write-refusal tests passing. Separately, an isolated SwiftPM build of all Elasticsearch and Typesense driver sources and the actual driver test files passed 175 tests in 14 suites on this branch. SwiftLint found no violations in the two fixture files.