Skip to content

TINKERPOP-1874 P does not appear to be serialized consistently in GraphSON#784

Merged
asfgit merged 3 commits intotp32from
TINKERPOP-1874
Jan 24, 2018
Merged

TINKERPOP-1874 P does not appear to be serialized consistently in GraphSON#784
asfgit merged 3 commits intotp32from
TINKERPOP-1874

Conversation

@spmallette
Copy link
Contributor

@spmallette spmallette commented Jan 19, 2018

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 P args to lists basically). I modified the P template for .NET and made it so that within and without are handled differently from the other enums - within and without will 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 within and without so 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 -i

VOTE +1

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.
@spmallette spmallette mentioned this pull request Jan 19, 2018
}
----

==== P within
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@jorgebay
Copy link
Contributor

I've added a small suggestion.
Looks great, VOTE +1.

==== 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).
Copy link
Member

@robertdale robertdale Jan 24, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was this meant to be changed?
/no/not/
/maybe/may be/

Copy link
Contributor Author

@spmallette spmallette Jan 24, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that's so weird....i will fix it. i thought i already had. +1 otherwise? 😄

Copy link
Member

@robertdale robertdale left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Grammar

==== 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).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)."))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)."))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/no/not/
/maybe/may be/

@spmallette
Copy link
Contributor Author

I will clean up all of @robertdale "no/not" stuff when i merge.

@robertdale
Copy link
Member

VOTE +1

@asfgit asfgit merged commit 1c33340 into tp32 Jan 24, 2018
@spmallette
Copy link
Contributor Author

Here's the follow up fixes given the comments: d5b6ebb

@asfgit asfgit deleted the TINKERPOP-1874 branch April 14, 2018 15:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

Comments