TINKERPOP-1874 P does not appear to be serialized consistently in GraphSON#784
TINKERPOP-1874 P does not appear to be serialized consistently in GraphSON#784
Conversation
Validates various forms of serialization with focus on GraphSON and GLVs (where there were problems).
GraphSON deserialization of P.within and P.without expects a single collection regardless of the number of values, so even a single argument should serialize to a list.
| } | ||
| ---- | ||
|
|
||
| ==== P within |
There was a problem hiding this comment.
Good idea to add within and without examples. Can we also add a little introductory text saying that P expects a single value or a list of values, except in the case of within and without where its always a list of values?
There was a problem hiding this comment.
that's a good idea. i will make a note to do it after i merge if that's ok. i'd rather not have to re-work the PR on master as a result of that little change. i have a bunch of cleanup to do anyway after these merge.
|
I've added a small suggestion. |
| ==== Authentication Challenge | ||
|
|
||
| When authentication is enabled, an initial request to the server will result in an authentication challenge. The typical response message will appear as follows, but handling it could be different dependending on the SASL implementation (e.g. multiple challenges maybe requested in some cases, but not in the default provided by Gremlin Server). | ||
| When authentication is enabled, an initial request to the server will result in an authentication challenge. The typical response message will appear as follows, but handling it could be different dependending on the SASL implementation (e.g. multiple challenges maybe requested in some cases, but no in the default provided by Gremlin Server). |
There was a problem hiding this comment.
Was this meant to be changed?
/no/not/
/maybe/may be/
There was a problem hiding this comment.
that's so weird....i will fix it. i thought i already had. +1 otherwise? 😄
| ==== Authentication Challenge | ||
|
|
||
| When authentication is enabled, an initial request to the server will result in an authentication challenge. The typical response message will appear as follows, but handling it could be different dependending on the SASL implementation (e.g. multiple challenges maybe requested in some cases, but not in the default provided by Gremlin Server). | ||
| When authentication is enabled, an initial request to the server will result in an authentication challenge. The typical response message will appear as follows, but handling it could be different dependending on the SASL implementation (e.g. multiple challenges maybe requested in some cases, but no in the default provided by Gremlin Server). |
There was a problem hiding this comment.
And this one?
/no/not/
/maybe/may be/
| writer.write("=== ResponseMessage\n\n") | ||
| msg = ResponseMessage.build(UUID.fromString("41d2e28a-20a4-4ab0-b379-d810dede3786")). | ||
| code(org.apache.tinkerpop.gremlin.driver.message.ResponseStatusCode.AUTHENTICATE).create() | ||
| writer.write(toJson(msg, "Authentication Challenge", "When authentication is enabled, an initial request to the server will result in an authentication challenge. The typical response message will appear as follows, but handling it could be different dependending on the SASL implementation (e.g. multiple challenges maybe requested in some cases, but no in the default provided by Gremlin Server).")) |
There was a problem hiding this comment.
Maybe it was this one that meant to be /no/not/ ?
And /maybe/may be/ ?
| writer.write("=== ResponseMessage\n\n") | ||
| msg = ResponseMessage.build(UUID.fromString("41d2e28a-20a4-4ab0-b379-d810dede3786")). | ||
| code(org.apache.tinkerpop.gremlin.driver.message.ResponseStatusCode.AUTHENTICATE).create() | ||
| writer.write(toJson(msg, "Authentication Challenge", "When authentication is enabled, an initial request to the server will result in an authentication challenge. The typical response message will appear as follows, but handling it could be different dependending on the SASL implementation (e.g. multiple challenges maybe requested in some cases, but no in the default provided by Gremlin Server).")) |
|
I will clean up all of @robertdale "no/not" stuff when i merge. |
|
VOTE +1 |
|
Here's the follow up fixes given the comments: d5b6ebb |
https://issues.apache.org/jira/browse/TINKERPOP-1874
Added bunch of tests for this and found that .NET was still working, but that was just because of how the gherkin processor was generating the traversals (it was always converting
Pargs to lists basically). I modified thePtemplate for .NET and made it so thatwithinandwithoutare handled differently from the other enums -withinandwithoutwill always pass a collection rather than an individual object if there is only one item present in the arg array.I also updated the IO docs to include
withinandwithoutso that it was clear to implementers what was expected for them. I may have to come back and do some cleanup here, but I already went deep on my PR to master for this so I'd rather just CTR in the doc fixes later.All tests pass with
docker/build.sh -t -n -iVOTE +1