GumpacG opened a new pull request, #3468: URL: https://github.com/apache/tinkerpop/pull/3468
# Standardize `gremlin-dotnet` connection options Implements the .NET portion of the TinkerPop 4.x GLV connection-options standardization. Renames several `ConnectionSettings` properties and the `Auth` factory methods to canonical names (old names kept as `[Obsolete]` deprecated aliases), aligns defaults, adds new options, and fixes two latent bugs. .NET driver changes only; the other GLVs follow in separate PRs. **Proposal:** https://lists.apache.org/thread/yqtr2wnb1kq2pqqq4002cz511q5o0bkg ## Renames (deprecated aliases retained) | Old | New | Default | | ------------------------- | ---------------- | ------- | | `MaxConnectionsPerServer` | `MaxConnections` | 128 | | `IdleConnectionTimeout` | `IdleTimeout` | 180s | | `ConnectionTimeout` | `ConnectTimeout` | 5s | | `KeepAliveInterval` | `KeepAliveTime` | 30s | | `EnableCompression` | `Compression` | - | | `Auth.BasicAuth` | `Auth.Basic` | - | | `Auth.SigV4Auth` | `Auth.Sigv4` | - | The old property names and auth methods are retained as `[Obsolete]` deprecated aliases (marked "As of release 4.0.0, ...") that delegate to the canonical members, so existing code keeps compiling. ## Behavior changes (breaking) * **`ConnectTimeout`** default lowered 15s → 5s. * **`KeepAliveTime`** is now wired to a real TCP keep-alive socket option (via `SocketsHttpHandler.ConnectCallback`) rather than the inert HTTP/2 ping timeout, which had no effect on HTTP/1.1. * **`Compression`** is now a `{None, Deflate}` enum defaulting to `Deflate` (compression on by default); the driver sends `Accept-Encoding: deflate` by default. Set `Compression.None` to disable. The deprecated `EnableCompression` `bool` is preserved only as a compatibility shim mapping `true`/`false` to `Compression.Deflate`/`Compression.None`. ## New options * **`Ssl`** (`SslClientAuthenticationOptions`) - adds client-certificate and custom-CA support. `SkipCertificateValidation` is applied to an internal copy rather than mutating the caller's options. * **`DefaultBatchSize`** (64) - connection-level default that fills the per-request `batchSize` when unset. * **`MaxResponseHeaderBytes`** - the maximum response header size, in bytes (converted internally to the handler's native kilobyte unit). * **`ReadTimeout`** - a per-read idle timeout applied to each read of the response stream (via per-read `CancelAfter`). * **`Proxy`** (`IWebProxy`) - routes connections through an HTTP proxy. * **`GremlinServer.FromUrl(string)`** / **`GremlinServer(Uri)`** - configure the endpoint from a single URL (scheme, host, port, path), deriving SSL from the scheme. The existing host/port/path constructor remains. ## Removed (breaking) * **`maxResponseContentLength`** - responses now stream; `ReadTimeout` is the partial mitigation. ## Bug fixes * Fixed deflate response decompression, which threw on the server's zlib-framed output because it used `DeflateStream` (raw DEFLATE, RFC 1951) instead of `ZLibStream` (zlib, RFC 1950). The bug was previously masked because compression was off by default; turning it on by default would have made it a default-path failure. * Fixed `Ssl` options cloning (used on the skip-certificate-validation path) to copy `ClientCertificateContext` and `AllowTlsResume`, which were previously dropped, breaking mTLS client certificates and silently re-enabling TLS resumption. ## Testing * `gremlin-dotnet` unit tests pass (695 tests), including new `ConnectionSettingsTests` and the `ReadTimeout` slow-read timeout test. * CHANGELOG, reference config table (`gremlin-variants.asciidoc`), and upgrade guide (`release-4.x.x.asciidoc`) updated for the .NET slice. Assisted-by: Kiro: Claude Opus 4.8 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
