Point connect failures at --tls disable - #14
Merged
Merged
Conversation
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.
What
A database that does not serve TLS fails with the default
verify-full, and some drivers do not say so: Oracle reportsORA-17002: I/O 错误: Connection closed(which reads like a network fault) and the local test flow used by the README never mentions the flag.When the connection fails before the first statement (
indexempty, outcomenot_started) and the datasource usesverify-full, the CLI now appends(the connection failed before any statement; if this database does not serve TLS, retry with --tls disable)to the error message. Statements that already ran,unknownoutcomes and--tls disableconnections are untouched, so a mid-batch failure never suggests changing the transport.Verification
Against the four local containers, each datasource created with the default TLS mode:
cargo fmt --all -- --check,cargo clippy --workspace --all-targets --locked -- -D warningspassed.cargo test -p ottermind-sqlxadds a unit test covering all four branches (before-any-statement, after-a-statement, unknown outcome, TLS already disabled).Risks and limits
信息:/stack frames), which buries the message. That belongs in a separate change.