Standardized gremlin-go connection options#3467
Open
GumpacG wants to merge 4 commits into
Open
Conversation
Assisted-by: Kiro: Claude Opus 4.8
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #3467 +/- ##
============================================
- Coverage 76.35% 76.10% -0.26%
- Complexity 13424 13646 +222
============================================
Files 1012 1026 +14
Lines 60341 61743 +1402
Branches 7075 7209 +134
============================================
+ Hits 46076 46989 +913
- Misses 11548 11869 +321
- Partials 2717 2885 +168 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Assisted-by: Kiro: Claude Opus 4.8
Contributor
|
This PR has some open questions that are the same as the ones I mentioned in the PRs for the other GLVs. Other than those this LGTM. |
defaultBatchSize to batchSize Docs update Timeout and timeout millis Removed deprecated options Assisted-by: Kiro: Claude Opus 4.8
5ca4252 to
6d5d559
Compare
Contributor
|
VOTE +1 |
Contributor
|
VOTE +1 |
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.
Standardize
gremlin-goconnection optionsImplements the Go portion of the TinkerPop 4.x GLV connection-options standardization. Renames several settings fields to canonical names, moves the authentication helpers into a dedicated
authsub-package (flat functions kept as deprecated delegators), aligns defaults, adds new options, and fixes a silent proxy drop. Go driver changes only; the other GLVs follow in separate PRs.Proposal: https://lists.apache.org/thread/yqtr2wnb1kq2pqqq4002cz511q5o0bkg
Renames (breaking)
Struct fields cannot be aliased, so these are hard renames and existing code must be updated.
MaximumConcurrentConnectionsMaxConnectionsIdleConnectionTimeoutIdleTimeoutKeepAliveIntervalKeepAliveTimeConnectionTimeoutConnectTimeoutTlsConfig(*tls.Config)SslRequestInterceptorsInterceptorsEnableCompressionCompressionAuth helpers moved out of package
gremlingointo a newauthsub-package (github.com/apache/tinkerpop/gremlin-go/v4/driver/auth):BasicAuthauth.BasicSigV4Authauth.SigV4SigV4AuthWithCredentialsauth.SigV4WithCredentialsThe flat
gremlingoauth functions are retained as deprecated delegators (idiomatic Go// Deprecated:doc comments) so existing code keeps compiling. New code should use theauthsub-package.Behavior changes (breaking)
Compressionis now a typedCompressionconst (gremlingo.CompressionNone/gremlingo.CompressionDeflate) and defaults toCompressionDeflate(on); the driver sendsAccept-Encoding: deflateby default. Setgremlingo.CompressionNoneto disable. The manual per-chunk deflate decode path is retained.http.Transport.Proxynow defaults tohttp.ProxyFromEnvironment, soHTTP_PROXY/HTTPS_PROXY/NO_PROXYare honored. The custom transport previously leftProxyunset, silently dropping any environment proxy configuration.New options
ReadTimeout(default 0, off) - a per-read idle timeout reset on each read of the response body and re-armed across pooled-connection reuse, so it never fires while a pooled connection is idle between requests.MaxResponseHeaderBytes- exposeshttp.Transport.MaxResponseHeaderBytes(native bytes).Proxy- an explicit proxy override for the transport.DefaultBatchSize(64) - connection-level default that fills a request'sbatchSizewhen unset.The Go-specific
MaxIdleConnections(count-based idle keep-alive cap, default 8) is unchanged.Removed (breaking)
MaxResponseContentLength- responses now stream;ReadTimeoutis the partial mitigation.Testing
gremlin-gogo build ./...andgo vet ./...pass.auth.TestBasic/auth.TestSigV4in the newauthsub-package, andTestDeprecatedBasicAuth/TestDeprecatedSigV4Authcovering the deprecated delegators.gremlin-variants.asciidoc), and upgrade guide (release-4.x.x.asciidoc) updated for the Go slice.Assisted-by: Kiro: Claude Opus 4.8