[jira] [Closed] (TINKERPOP-1875) Gremlin-Python only aggregates to list when using GraphSON3

2018-02-05 Thread David M. Brown (JIRA)

 [ 
https://issues.apache.org/jira/browse/TINKERPOP-1875?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

David M. Brown closed TINKERPOP-1875.
-
Resolution: Fixed

> Gremlin-Python only aggregates to list when using GraphSON3
> ---
>
> Key: TINKERPOP-1875
> URL: https://issues.apache.org/jira/browse/TINKERPOP-1875
> Project: TinkerPop
>  Issue Type: Bug
>  Components: python
>Affects Versions: 3.3.1
>Reporter: David M. Brown
>Assignee: David M. Brown
>Priority: Major
> Fix For: 3.3.2
>
>
> Gremlin-Python fails to correctly extract the aggregate_to value from the 
> Gremlin Server response when using GraphSON3. I believe this is the source of 
> the test failures that were temporarily fixed by using the v2.0 message 
> serializer in [this 
> commit|https://github.com/apache/tinkerpop/commit/8c299879e65748c2c2b03a58b6d0c5c401de].
>  
> In general, it seems this value is a bit buried in the new response message 
> format:
> {code:json}
> {'requestId': 'b2a51ad2-bca6-4493-9115-a57a92e477c7',
>  'result': {'data': {'@type': 'g:List',
>'@value': [{'@type': 'g:Map',
>  '@value': ['ripple', {'@type': 'g:Int64', '@value': 1}]},
> {'@type': 'g:Map', '@value': ['lop', {'@type': 'g:Int64', '@value': 
> 3}]}]},
>   'meta': {'@type': 'g:Map',
>'@value': ['aggregateTo', 'map', 'sideEffectKey', 'm']}},
>  'status': {'attributes': {'@type': 'g:Map', '@value': []},
>   'code': 200,
>   'message': ''}}
> {code}
> To access it, you have to do something like:
> {code:python}
> message['result']['meta']['@value'][1]
> {code}
> Which throws an error when no metadata is present. This seems a bit clumsy. I 
> haven't looked at how the Java driver deals with it, maybe there is a better 
> way to parse this.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[GitHub] tinkerpop pull request #790: TINKERPOP-1875 Gremlin-Python only aggregates t...

2018-02-05 Thread asfgit
Github user asfgit closed the pull request at:

https://github.com/apache/tinkerpop/pull/790


---


[jira] [Commented] (TINKERPOP-1875) Gremlin-Python only aggregates to list when using GraphSON3

2018-02-05 Thread ASF GitHub Bot (JIRA)

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

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

Github user asfgit closed the pull request at:

https://github.com/apache/tinkerpop/pull/790


> Gremlin-Python only aggregates to list when using GraphSON3
> ---
>
> Key: TINKERPOP-1875
> URL: https://issues.apache.org/jira/browse/TINKERPOP-1875
> Project: TinkerPop
>  Issue Type: Bug
>  Components: python
>Affects Versions: 3.3.1
>Reporter: David M. Brown
>Assignee: David M. Brown
>Priority: Major
> Fix For: 3.3.2
>
>
> Gremlin-Python fails to correctly extract the aggregate_to value from the 
> Gremlin Server response when using GraphSON3. I believe this is the source of 
> the test failures that were temporarily fixed by using the v2.0 message 
> serializer in [this 
> commit|https://github.com/apache/tinkerpop/commit/8c299879e65748c2c2b03a58b6d0c5c401de].
>  
> In general, it seems this value is a bit buried in the new response message 
> format:
> {code:json}
> {'requestId': 'b2a51ad2-bca6-4493-9115-a57a92e477c7',
>  'result': {'data': {'@type': 'g:List',
>'@value': [{'@type': 'g:Map',
>  '@value': ['ripple', {'@type': 'g:Int64', '@value': 1}]},
> {'@type': 'g:Map', '@value': ['lop', {'@type': 'g:Int64', '@value': 
> 3}]}]},
>   'meta': {'@type': 'g:Map',
>'@value': ['aggregateTo', 'map', 'sideEffectKey', 'm']}},
>  'status': {'attributes': {'@type': 'g:Map', '@value': []},
>   'code': 200,
>   'message': ''}}
> {code}
> To access it, you have to do something like:
> {code:python}
> message['result']['meta']['@value'][1]
> {code}
> Which throws an error when no metadata is present. This seems a bit clumsy. I 
> haven't looked at how the Java driver deals with it, maybe there is a better 
> way to parse this.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (TINKERPOP-1883) gremlinpython future will never return

2018-02-05 Thread ASF GitHub Bot (JIRA)

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

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

Github user davebshow commented on the issue:

https://github.com/apache/tinkerpop/pull/796
  
LGTM 

VOTE +1


> gremlinpython future will never return
> --
>
> Key: TINKERPOP-1883
> URL: https://issues.apache.org/jira/browse/TINKERPOP-1883
> Project: TinkerPop
>  Issue Type: Bug
>Affects Versions: 3.3.1
> Environment: all
>Reporter: Daniel Collins
>Priority: Major
>
> When using the promise() method to get a future from a traversal, a call to 
> result() will never return if an error is thrown by result_set.all().result() 
> in driver_remote_connection.py on line 69. This call should be wrapped in a 
> try block to set the exception of future on failure.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[GitHub] tinkerpop issue #796: Added correct setting of future exceptions, pursuant t...

2018-02-05 Thread davebshow
Github user davebshow commented on the issue:

https://github.com/apache/tinkerpop/pull/796
  
LGTM 

VOTE +1


---


Re: [DISCUSS] Gremlin JavaScript release

2018-02-05 Thread Stephen Mallette
I have no objections to using "gremlin" since it sounds like we have ways
to make sure users don't break in unclear ways. I'll give others a chance
to respond and barring no additional discussion will get The Baptist added
to the org in npm. i guess we can proceed to the next step from there.

On Mon, Feb 5, 2018 at 3:55 AM, Jorge Bay Gondra 
wrote:

> Reusing the existing package name while adding a deprecation message,
> sounds good to me then.
>
> Keep in mind we will be releasing both for 3.2.x and 3.3.x branches, so any
> deprecation message should be for versions lower than 3.2.
>
> If all agree, the next step will be to add jbmusso to tinkerpop org on npm
> and add him to the "developers" team. I can't do it, as I'm not an "owner"
> of the organization.
> Once you have the proper access rights, you should grant write access to
> package "tinkerpop:developers".
>
> Thanks,
> Jorge
>
>
> On Sat, Feb 3, 2018 at 12:45 PM, Jean-Baptiste Musso 
> wrote:
>
> > npm (and yarn) now freeze versions aggressively in package.json and
> > package-lock.json or yarn.lock, respectively. Publishing a new version on
> > the v3.y.z (v.3.3.2) shouldn't be a concern for most users since,
> luckily,
> > I never published past the 2.y.z major version on npm.
> >
> > What I'm thinking is that we could add a deprecation message that users
> > will see when installing all releases prior to using v3.3.2 when it's
> > published. https://docs.npmjs.com/cli/deprecate should be helpful.
> >
> > I don't think that will break anything unless people added "gremlin": "*"
> > in their package.json, but I guess very few people did that. What will
> > break is example in live docs, such as Microsoft Azure CosmosDB, where
> > installation requirements are "npm install gremlin": this will install
> > v3.3.2, and break things. The quick fix for them is to update their doc
> to
> > "npm install gremlin@v2" - that should work.
> >
> > I also need to deprecate "gremlin-javascript" on npm (that lib still gets
> > downloaded!), since I was pushing using this name before I was donated
> the
> > "gremlin" package name (I think 2-3 years ago). That'll be the second
> time
> > this package name is transferred, actually - back in the days, it was a
> > Node.js/JVM bridge using node-java.
> >
> > Another option is to publish under "@tinkerpop/gremlin", but I think it's
> > best if we can force people to no longer use the current "gremlin"
> package,
> > and use the official GLV, also under that same name. Having many package
> > names will add a lot of confusion in the next month/years, and I think
> it's
> > best to risk breaking few things in the short term rather than adding *a
> > lot* of confusion on the long term.
> >
> > Jean-Baptiste
> >
> > On Fri, Feb 2, 2018 at 1:32 PM, Stephen Mallette 
> > wrote:
> >
> > > It stinks that we would break 3K+ downloads. I don't know the npm
> > > environment too well. Can a break be expected for people? The current
> > > version of https://www.npmjs.com/package/gremlin is at 2.6.0 and we
> > would
> > > publish at 3.x which people could expect as a breaking change, no?
> > >
> > > On Tue, Jan 30, 2018 at 9:54 AM, Jorge Bay Gondra <
> > > jorgebaygon...@gmail.com>
> > > wrote:
> > >
> > > > Hi,
> > > > Now that the JavaScript GLV has been merged, it will be nice to have
> an
> > > > official pre-release (RC / beta) on the npm package manager as soon
> as
> > > > possible to allow users to start giving it a try.
> > > >
> > > > The package name identifier in the package.json is currently
> > > > gremlin-javascript  >,
> > > > which is under the tinkerpop organization created by Stephen:
> > > > https://www.npmjs.com/org/tinkerpop
> > > > npm orgs are a nice feature as it let's you handle the team members
> > that
> > > > can be collaborators (publish versions).
> > > >
> > > > Jean-Baptiste offered
> > > >  >
> > to
> > > > transfer ownership of gremlin  >
> > > > package to TinkerPop, so we can publish the GLV under that package
> > name.
> > > My
> > > > only concern would be to break the functionality for current users,
> as
> > > the
> > > > existent package has 3K downloads per month. I would prefer to
> include
> > a
> > > > message on the gremlin package explaining the difference with
> > > > gremlin-javascript (or recommending the GLV for future development),
> > but
> > > I
> > > > don't feel strongly either way.
> > > >
> > > > Cheers,
> > > > Jorge
> > > >
> > >
> >
>


[jira] [Commented] (TINKERPOP-1875) Gremlin-Python only aggregates to list when using GraphSON3

2018-02-05 Thread ASF GitHub Bot (JIRA)

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

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

Github user jorgebay commented on the issue:

https://github.com/apache/tinkerpop/pull/790
  
lgtm, VOTE +1


> Gremlin-Python only aggregates to list when using GraphSON3
> ---
>
> Key: TINKERPOP-1875
> URL: https://issues.apache.org/jira/browse/TINKERPOP-1875
> Project: TinkerPop
>  Issue Type: Bug
>  Components: python
>Affects Versions: 3.3.1
>Reporter: David M. Brown
>Assignee: David M. Brown
>Priority: Major
> Fix For: 3.3.2
>
>
> Gremlin-Python fails to correctly extract the aggregate_to value from the 
> Gremlin Server response when using GraphSON3. I believe this is the source of 
> the test failures that were temporarily fixed by using the v2.0 message 
> serializer in [this 
> commit|https://github.com/apache/tinkerpop/commit/8c299879e65748c2c2b03a58b6d0c5c401de].
>  
> In general, it seems this value is a bit buried in the new response message 
> format:
> {code:json}
> {'requestId': 'b2a51ad2-bca6-4493-9115-a57a92e477c7',
>  'result': {'data': {'@type': 'g:List',
>'@value': [{'@type': 'g:Map',
>  '@value': ['ripple', {'@type': 'g:Int64', '@value': 1}]},
> {'@type': 'g:Map', '@value': ['lop', {'@type': 'g:Int64', '@value': 
> 3}]}]},
>   'meta': {'@type': 'g:Map',
>'@value': ['aggregateTo', 'map', 'sideEffectKey', 'm']}},
>  'status': {'attributes': {'@type': 'g:Map', '@value': []},
>   'code': 200,
>   'message': ''}}
> {code}
> To access it, you have to do something like:
> {code:python}
> message['result']['meta']['@value'][1]
> {code}
> Which throws an error when no metadata is present. This seems a bit clumsy. I 
> haven't looked at how the Java driver deals with it, maybe there is a better 
> way to parse this.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[GitHub] tinkerpop issue #790: TINKERPOP-1875 Gremlin-Python only aggregates to list ...

2018-02-05 Thread jorgebay
Github user jorgebay commented on the issue:

https://github.com/apache/tinkerpop/pull/790
  
lgtm, VOTE +1


---


Re: [DISCUSS] Gremlin JavaScript release

2018-02-05 Thread Jorge Bay Gondra
Reusing the existing package name while adding a deprecation message,
sounds good to me then.

Keep in mind we will be releasing both for 3.2.x and 3.3.x branches, so any
deprecation message should be for versions lower than 3.2.

If all agree, the next step will be to add jbmusso to tinkerpop org on npm
and add him to the "developers" team. I can't do it, as I'm not an "owner"
of the organization.
Once you have the proper access rights, you should grant write access to
package "tinkerpop:developers".

Thanks,
Jorge


On Sat, Feb 3, 2018 at 12:45 PM, Jean-Baptiste Musso 
wrote:

> npm (and yarn) now freeze versions aggressively in package.json and
> package-lock.json or yarn.lock, respectively. Publishing a new version on
> the v3.y.z (v.3.3.2) shouldn't be a concern for most users since, luckily,
> I never published past the 2.y.z major version on npm.
>
> What I'm thinking is that we could add a deprecation message that users
> will see when installing all releases prior to using v3.3.2 when it's
> published. https://docs.npmjs.com/cli/deprecate should be helpful.
>
> I don't think that will break anything unless people added "gremlin": "*"
> in their package.json, but I guess very few people did that. What will
> break is example in live docs, such as Microsoft Azure CosmosDB, where
> installation requirements are "npm install gremlin": this will install
> v3.3.2, and break things. The quick fix for them is to update their doc to
> "npm install gremlin@v2" - that should work.
>
> I also need to deprecate "gremlin-javascript" on npm (that lib still gets
> downloaded!), since I was pushing using this name before I was donated the
> "gremlin" package name (I think 2-3 years ago). That'll be the second time
> this package name is transferred, actually - back in the days, it was a
> Node.js/JVM bridge using node-java.
>
> Another option is to publish under "@tinkerpop/gremlin", but I think it's
> best if we can force people to no longer use the current "gremlin" package,
> and use the official GLV, also under that same name. Having many package
> names will add a lot of confusion in the next month/years, and I think it's
> best to risk breaking few things in the short term rather than adding *a
> lot* of confusion on the long term.
>
> Jean-Baptiste
>
> On Fri, Feb 2, 2018 at 1:32 PM, Stephen Mallette 
> wrote:
>
> > It stinks that we would break 3K+ downloads. I don't know the npm
> > environment too well. Can a break be expected for people? The current
> > version of https://www.npmjs.com/package/gremlin is at 2.6.0 and we
> would
> > publish at 3.x which people could expect as a breaking change, no?
> >
> > On Tue, Jan 30, 2018 at 9:54 AM, Jorge Bay Gondra <
> > jorgebaygon...@gmail.com>
> > wrote:
> >
> > > Hi,
> > > Now that the JavaScript GLV has been merged, it will be nice to have an
> > > official pre-release (RC / beta) on the npm package manager as soon as
> > > possible to allow users to start giving it a try.
> > >
> > > The package name identifier in the package.json is currently
> > > gremlin-javascript ,
> > > which is under the tinkerpop organization created by Stephen:
> > > https://www.npmjs.com/org/tinkerpop
> > > npm orgs are a nice feature as it let's you handle the team members
> that
> > > can be collaborators (publish versions).
> > >
> > > Jean-Baptiste offered
> > > 
> to
> > > transfer ownership of gremlin 
> > > package to TinkerPop, so we can publish the GLV under that package
> name.
> > My
> > > only concern would be to break the functionality for current users, as
> > the
> > > existent package has 3K downloads per month. I would prefer to include
> a
> > > message on the gremlin package explaining the difference with
> > > gremlin-javascript (or recommending the GLV for future development),
> but
> > I
> > > don't feel strongly either way.
> > >
> > > Cheers,
> > > Jorge
> > >
> >
>