[ 
https://issues.apache.org/jira/browse/TINKERPOP-2747?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17700030#comment-17700030
 ] 

ASF GitHub Bot commented on TINKERPOP-2747:
-------------------------------------------

disq commented on code in PR #1989:
URL: https://github.com/apache/tinkerpop/pull/1989#discussion_r1135208270


##########
gremlin-go/driver/connection.go:
##########
@@ -42,15 +42,15 @@ type connection struct {
 }
 
 type connectionSettings struct {
-       authInfo                                *AuthInfo
-       tlsConfig                               *tls.Config
-       keepAliveInterval                       time.Duration
-       writeDeadline                           time.Duration
-       connectionTimeout                       time.Duration
-       enableCompression                       bool
-       readBufferSize                          int
-       writeBufferSize                         int
-       enableUserAgentOnConnect                bool
+       authInfo                 AuthInfoProvider

Review Comment:
   > There appears to be one test failing in the checks right now. The maven 
logs can be a bit much to search through, I like to search for `❌` in the logs 
to find the failing test quickly. It appears that 
`gremlin-go/driver/gorillaTransporter.go:68` can sometimes result in a nil 
pointer dereference.
   
   Thank you for the clarification on how to run the tests locally.
   
   The issue seems to be one of the tests setting `authInfo` to `nil`, which is 
unexpected (and isn't done anywhere else in the codebase as far as I can tell) 
so now `gorillaTransporter.getAuthInfo()` has a nil-check and returns 
`NoopAuthInfo` if `nil`. `NoopAuthInfo` is an idempotent way of specifying a 
zero-value for the `AuthInfoProvider` and can be used publicly as well. (maybe 
unnecessary, as simply `nil` would do the same thing)





> Add function callback hooks for gremlin-go authentication
> ---------------------------------------------------------
>
>                 Key: TINKERPOP-2747
>                 URL: https://issues.apache.org/jira/browse/TINKERPOP-2747
>             Project: TinkerPop
>          Issue Type: Improvement
>          Components: go
>            Reporter: Lyndon Bauto
>            Priority: Major
>
> Gremlin Go currently supports custom authentication headers.
>  
> For long running connections that reconnect over time, these headers can 
> expire.
>  
> We should allow injection of a function pointer to generate the header.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to