Repository navigation
Async database and mail clients on turnloop-io - #6
Conversation
|
Important Review skippedToo many files! This PR contains 101 files, which is 1 over the limit of 100. To get a review, reduce the PR to 100 files or fewer by splitting it into smaller PRs or changing its base branch. Upgrade to a paid plan to raise the limit. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (101)
You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
A real PostgreSQL 16 with ssl=on offers SCRAM-SHA-256-PLUS, and the async client selected it without tls-server-end-point data, so every TLS login failed. turnloop-tls now exposes the peer chain and an RFC 5929 hash of the leaf (bounded DER reader for the signature AlgorithmIdentifier: RSA, ECDSA, RSASSA-PSS; MD5/SHA-1 map to SHA-256). The sans-IO core prefers PLUS only when binding data is available and falls back to SCRAM-SHA-256 otherwise (libpq channel_binding=prefer); channel_binding_required still demands PLUS and is checked again at AuthenticationOk. Verified against a real PostgreSQL 16: real_async_required_channel_binding_authenticates_over_ssl passes.
…in fixtures A terminated backend (57P01 then EOF) reached the async client as a completed query because the core replaced the diagnostic with Transport and async completion accepted Outcome::Aborted. The core now returns Error::ConnectionAborted with the full server error, discards unsent output, rejects reuse and completes each pending token once before Closed; async readers return io::ErrorKind::ConnectionAborted carrying the typed error. Ordinary ERROR still becomes Outcome::ServerError after ReadyForQuery. Error/Outcome are Clone instead of Copy. The parallel no-spin failure was test interference: every owned child subscribes to process-wide SIGCHLD, so unrelated children exiting in parallel tests woke the quiet loop. The unchanged services_no_spin contract now runs in a fresh native_child process (exact success line asserted), and the two SIGUSR1 fan-out fixtures are serialized so one cannot release the other's waiters after SIG_DFL is restored. Verified against real PostgreSQL 16 and MySQL (native and WASI 0.2): the full real_async_tls_queries_copy_cancel_pool_and_connection_kill now runs to the end, including max_uses, pool.end and the cancel-future timeout.
|
Windows validation: the trial branch |
…e failover protocol (WASI 0.2 real servers) failed at assert_ne!(before_primary, after_primary). The server logs show rs1 stepped down at 00:41:29 with replSetStepDown 5, no election handoff, and rs1 itself winning the next election at 00:41:39 once its 5 s ineligibility had expired, so the same node legitimately became primary again. real_mongodb.rs already uses 60 s; the async test now does too, so a different primary is guaranteed and the assertion is unchanged.
Async clients on
turnloop-iofor PostgreSQL, MySQL, Redis, SMTP and MongoDB: TLS, auth, pools, pub/sub and cluster routing, SDAM/CMAP, cursors. Also WASI 0.2ip-name-lookupDNS through an additiveBackend::resolvedefault method (native backends keep the blocking-pool fallback), executorBlocking/Closefutures, per-crate examples and CI wiring. Lane reports:LANE_REPORT.md(adapters-db, adb-fix1, adb-fix2).Follow-ups found by running the real SQL servers outside the Codex sandbox
9862322(SCRAM-PLUS): a real PostgreSQL 16 withssl=onoffers SCRAM-SHA-256-PLUS, and every TLS login failed.tls-server-end-pointfrom the verified leaf (RFC 5929; bounded DER reader for RSA, ECDSA and RSASSA-PSS), with a SCRAM-SHA-256 fallback (libpqprefer).channel_binding_requiredis enforced at mechanism selection and again at AuthenticationOk.8d2865a(FATAL/PANIC): a FATAL/PANIC ErrorResponse followed by close (for example 57P01 frompg_terminate_backend) now surfaces asErrorKind::ConnectionAbortedcarrying the server diagnostic, and the client is no longer reusable.Error/OutcomebecomeClone, notCopy.native_surface: it was test interference. Every owned child subscribes to process-wide SIGCHLD, so unrelated child exits in parallel tests woke the quiet loop.services_no_spincontract now runs in a fresh fixture process, and the test asserts its exact success line.Verification
real_async_tls_queries_copy_cancel_pool_and_connection_killnow runs to the end.8d2865a: every job passes except the Windows jobs, which fail only onunresolved import backend::Platform, provided by Implement and validate the Windows IOCP backend #5.integrate/windows-db) is running CI to validate this code on windows-2025.Merge order: #5 first, then this PR updated with
main, soci-gateis green without bypassing it.Known unrelated flake
backend::unix::udp_tests::cancelled_udp_with_cached_events_survives_exact_fd_and_port_reusefailed once under the default parallel workspace run (bindreturned -1). The test rebinds an ephemeral port afterdup2closes it, and a parallel test can take the port in between. Tracked separately.