[jira] [Commented] (THRIFT-4330) Allow unused crates in Rust files

2017-09-14 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/THRIFT-4330?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16167338#comment-16167338
 ] 

ASF GitHub Bot commented on THRIFT-4330:


Github user sadikovi commented on the issue:

https://github.com/apache/thrift/pull/1360
  
@allengeorge could you have a look at this change? Thanks!


> Allow unused crates in Rust files
> -
>
> Key: THRIFT-4330
> URL: https://issues.apache.org/jira/browse/THRIFT-4330
> Project: Thrift
>  Issue Type: Improvement
>Reporter: Ivan Sadikov
>Priority: Trivial
> Fix For: 0.11.0
>
>
> Currently thrift generated .rs files include following attributes:
> #![allow(unused_imports)]
> #![cfg_attr(feature = "cargo-clippy", allow(too_many_arguments, 
> type_complexity))]
> #![cfg_attr(rustfmt, rustfmt_skip)] 
> I propose to add 
> #![allow(unused_extern_crates)]
> to remove warning when using Rust nightly.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[GitHub] thrift issue #1360: THRIFT-4330: Allow unused extern crates

2017-09-14 Thread sadikovi
Github user sadikovi commented on the issue:

https://github.com/apache/thrift/pull/1360
  
@allengeorge could you have a look at this change? Thanks!


---


[jira] [Commented] (THRIFT-4330) Allow unused crates in Rust files

2017-09-14 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/THRIFT-4330?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16167332#comment-16167332
 ] 

ASF GitHub Bot commented on THRIFT-4330:


GitHub user sadikovi opened a pull request:

https://github.com/apache/thrift/pull/1360

THRIFT-4330: Allow unused extern crates

This PR adds attribute to the Rust generated code to allow unused crates, 
since some libraries may not use imports and generate warnings.
```
#![allow(unused_extern_crates)]
```

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/sadikovi/thrift THRIFT-4330

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/thrift/pull/1360.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #1360


commit 54b12d274616f819a90e16d188f1431260e0ed50
Author: Ivan Sadikov 
Date:   2017-09-15T05:09:08Z

THRIFT-4330: allow unused extern crates




> Allow unused crates in Rust files
> -
>
> Key: THRIFT-4330
> URL: https://issues.apache.org/jira/browse/THRIFT-4330
> Project: Thrift
>  Issue Type: Improvement
>Reporter: Ivan Sadikov
>Priority: Trivial
> Fix For: 0.11.0
>
>
> Currently thrift generated .rs files include following attributes:
> #![allow(unused_imports)]
> #![cfg_attr(feature = "cargo-clippy", allow(too_many_arguments, 
> type_complexity))]
> #![cfg_attr(rustfmt, rustfmt_skip)] 
> I propose to add 
> #![allow(unused_extern_crates)]
> to remove warning when using Rust nightly.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[GitHub] thrift pull request #1360: THRIFT-4330: Allow unused extern crates

2017-09-14 Thread sadikovi
GitHub user sadikovi opened a pull request:

https://github.com/apache/thrift/pull/1360

THRIFT-4330: Allow unused extern crates

This PR adds attribute to the Rust generated code to allow unused crates, 
since some libraries may not use imports and generate warnings.
```
#![allow(unused_extern_crates)]
```

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/sadikovi/thrift THRIFT-4330

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/thrift/pull/1360.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #1360


commit 54b12d274616f819a90e16d188f1431260e0ed50
Author: Ivan Sadikov 
Date:   2017-09-15T05:09:08Z

THRIFT-4330: allow unused extern crates




---


[GitHub] thrift issue #1333: Add c++ compiler no_skeleton flag option (THRIFT-4287)

2017-09-14 Thread oryahud
Github user oryahud commented on the issue:

https://github.com/apache/thrift/pull/1333
  
Done.


---


[jira] [Commented] (THRIFT-4064) Update node library dependencies

2017-09-14 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/THRIFT-4064?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16166961#comment-16166961
 ] 

ASF GitHub Bot commented on THRIFT-4064:


Github user jeking3 commented on the issue:

https://github.com/apache/thrift/pull/1359
  
Well that didn't work either.


> Update node library dependencies
> 
>
> Key: THRIFT-4064
> URL: https://issues.apache.org/jira/browse/THRIFT-4064
> Project: Thrift
>  Issue Type: Improvement
>  Components: Node.js - Library
>Affects Versions: 0.10.0
>Reporter: Andres Suarez
>Assignee: James E. King, III
>  Labels: security-issue
>
> ws@0.4.32 is really old and presents issues for users using modern versions 
> of Node (see 
> https://github.com/apache/thrift/pull/672#issuecomment-276678791). Its should 
> be updated.
> In the third pull request, here are the dependencies:
> node-int64 ~0.4.0
> q ~1.5.0
> ws >= 2.2.3 which implies node >= 4.1.0 
> (https://github.com/websockets/ws/tree/2.2.3)
> On the ubuntu-xenial image which uses node v8.4.0 and npm 5.3.0, and on the 
> centos-7.3 image which uses node v6.11.1 and npm 3.10.10 you end up with the 
> following packages:
> {noformat}
> root@ddb384ee75a5:/thrift/src/lib/nodejs# npm list --depth 0
> thrift@1.0.0-dev /thrift/src
> +-- buffer-equals@1.0.4
> +-- commander@2.11.0
> +-- connect@3.6.3
> +-- istanbul@0.4.5
> +-- minimatch@3.0.4
> +-- node-int64@0.4.0
> +-- phantomjs@2.1.7
> +-- q@1.5.0
> +-- run-browser@2.0.2
> +-- tape@4.8.0
> +-- utf-8-validate@3.0.3
> `-- ws@3.1.0
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[GitHub] thrift issue #1359: THRIFT-4064: update node dependencies

2017-09-14 Thread jeking3
Github user jeking3 commented on the issue:

https://github.com/apache/thrift/pull/1359
  
Well that didn't work either.


---


[jira] [Commented] (THRIFT-4064) Update node library dependencies

2017-09-14 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/THRIFT-4064?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16166912#comment-16166912
 ] 

ASF GitHub Bot commented on THRIFT-4064:


Github user jeking3 commented on the issue:

https://github.com/apache/thrift/pull/1359
  
I found grunt-jsdoc had a recent update; I changed the lib/js packages.json 
to require the 2.1.1 version or later, as they had a dependency issue with 
other packages that popped up.  When I ran npm install, it downrevved jsdoc 
from 3.5.4 to 3.4.3.  Let's see if that makes a difference.


> Update node library dependencies
> 
>
> Key: THRIFT-4064
> URL: https://issues.apache.org/jira/browse/THRIFT-4064
> Project: Thrift
>  Issue Type: Improvement
>  Components: Node.js - Library
>Affects Versions: 0.10.0
>Reporter: Andres Suarez
>Assignee: James E. King, III
>  Labels: security-issue
>
> ws@0.4.32 is really old and presents issues for users using modern versions 
> of Node (see 
> https://github.com/apache/thrift/pull/672#issuecomment-276678791). Its should 
> be updated.
> In the third pull request, here are the dependencies:
> node-int64 ~0.4.0
> q ~1.5.0
> ws >= 2.2.3 which implies node >= 4.1.0 
> (https://github.com/websockets/ws/tree/2.2.3)
> On the ubuntu-xenial image which uses node v8.4.0 and npm 5.3.0, and on the 
> centos-7.3 image which uses node v6.11.1 and npm 3.10.10 you end up with the 
> following packages:
> {noformat}
> root@ddb384ee75a5:/thrift/src/lib/nodejs# npm list --depth 0
> thrift@1.0.0-dev /thrift/src
> +-- buffer-equals@1.0.4
> +-- commander@2.11.0
> +-- connect@3.6.3
> +-- istanbul@0.4.5
> +-- minimatch@3.0.4
> +-- node-int64@0.4.0
> +-- phantomjs@2.1.7
> +-- q@1.5.0
> +-- run-browser@2.0.2
> +-- tape@4.8.0
> +-- utf-8-validate@3.0.3
> `-- ws@3.1.0
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[GitHub] thrift issue #1359: THRIFT-4064: update node dependencies

2017-09-14 Thread jeking3
Github user jeking3 commented on the issue:

https://github.com/apache/thrift/pull/1359
  
I found grunt-jsdoc had a recent update; I changed the lib/js packages.json 
to require the 2.1.1 version or later, as they had a dependency issue with 
other packages that popped up.  When I ran npm install, it downrevved jsdoc 
from 3.5.4 to 3.4.3.  Let's see if that makes a difference.


---


[jira] [Commented] (THRIFT-4064) Update node library dependencies

2017-09-14 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/THRIFT-4064?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16166796#comment-16166796
 ] 

ASF GitHub Bot commented on THRIFT-4064:


Github user jeking3 commented on the issue:

https://github.com/apache/thrift/pull/1359
  
@Jens-G any ideas on how to deal with this?  I've been working on it for a 
full day now and I cannot reproduce it using a fresh docker image and a fresh 
clone of the repo, but it fails inside travis every time.  My only recourse 
would be to disable the language until someone can figure it out.


> Update node library dependencies
> 
>
> Key: THRIFT-4064
> URL: https://issues.apache.org/jira/browse/THRIFT-4064
> Project: Thrift
>  Issue Type: Improvement
>  Components: Node.js - Library
>Affects Versions: 0.10.0
>Reporter: Andres Suarez
>Assignee: James E. King, III
>  Labels: security-issue
>
> ws@0.4.32 is really old and presents issues for users using modern versions 
> of Node (see 
> https://github.com/apache/thrift/pull/672#issuecomment-276678791). Its should 
> be updated.
> In the third pull request, here are the dependencies:
> node-int64 ~0.4.0
> q ~1.5.0
> ws >= 2.2.3 which implies node >= 4.1.0 
> (https://github.com/websockets/ws/tree/2.2.3)
> On the ubuntu-xenial image which uses node v8.4.0 and npm 5.3.0, and on the 
> centos-7.3 image which uses node v6.11.1 and npm 3.10.10 you end up with the 
> following packages:
> {noformat}
> root@ddb384ee75a5:/thrift/src/lib/nodejs# npm list --depth 0
> thrift@1.0.0-dev /thrift/src
> +-- buffer-equals@1.0.4
> +-- commander@2.11.0
> +-- connect@3.6.3
> +-- istanbul@0.4.5
> +-- minimatch@3.0.4
> +-- node-int64@0.4.0
> +-- phantomjs@2.1.7
> +-- q@1.5.0
> +-- run-browser@2.0.2
> +-- tape@4.8.0
> +-- utf-8-validate@3.0.3
> `-- ws@3.1.0
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[GitHub] thrift issue #1359: THRIFT-4064: update node dependencies

2017-09-14 Thread jeking3
Github user jeking3 commented on the issue:

https://github.com/apache/thrift/pull/1359
  
@Jens-G any ideas on how to deal with this?  I've been working on it for a 
full day now and I cannot reproduce it using a fresh docker image and a fresh 
clone of the repo, but it fails inside travis every time.  My only recourse 
would be to disable the language until someone can figure it out.


---


[jira] [Updated] (THRIFT-4329) c_glib Doesn't have a multiplexed processor

2017-09-14 Thread Gonzalo Aguilar (JIRA)

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

Gonzalo Aguilar updated THRIFT-4329:

Description: 
It seems that multiplexed protocol only implements 
thrift_multiplexed_protocol_write_message_begin that's ok for sending messages 
to a multiplexed server but not for the C server. We also need a multiplexed 
processor for the server.


  was:It seems that multiplexed protocol only implements 
thrift_multiplexed_protocol_write_message_begin that's ok for sending messages 
to a multiplexed server but not for the C server.


> c_glib Doesn't have a multiplexed processor
> ---
>
> Key: THRIFT-4329
> URL: https://issues.apache.org/jira/browse/THRIFT-4329
> Project: Thrift
>  Issue Type: Bug
>  Components: C glib - Library
>Affects Versions: 1.0
>Reporter: Gonzalo Aguilar
>Assignee: Gonzalo Aguilar
> Fix For: 1.0
>
>
> It seems that multiplexed protocol only implements 
> thrift_multiplexed_protocol_write_message_begin that's ok for sending 
> messages to a multiplexed server but not for the C server. We also need a 
> multiplexed processor for the server.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Created] (THRIFT-4329) c_glib multiplexed protocol doesn't support receiving multiplexed messages. Only written

2017-09-14 Thread Gonzalo Aguilar (JIRA)
Gonzalo Aguilar created THRIFT-4329:
---

 Summary: c_glib multiplexed protocol doesn't support receiving 
multiplexed messages. Only written
 Key: THRIFT-4329
 URL: https://issues.apache.org/jira/browse/THRIFT-4329
 Project: Thrift
  Issue Type: Bug
  Components: C glib - Library
Affects Versions: 1.0
Reporter: Gonzalo Aguilar
Assignee: Gonzalo Aguilar
 Fix For: 1.0


It seems that multiplexed protocol only implements 
thrift_multiplexed_protocol_write_message_begin that's ok for sending messages 
to a multiplexed server but not for the C server.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Updated] (THRIFT-4064) Update node library dependencies

2017-09-14 Thread James E. King, III (JIRA)

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

James E. King, III updated THRIFT-4064:
---
Description: 
ws@0.4.32 is really old and presents issues for users using modern versions of 
Node (see https://github.com/apache/thrift/pull/672#issuecomment-276678791). 
Its should be updated.

In the third pull request, here are the dependencies:

node-int64 ~0.4.0
q ~1.5.0
ws >= 2.2.3 which implies node >= 4.1.0 
(https://github.com/websockets/ws/tree/2.2.3)

On the ubuntu-xenial image which uses node v8.4.0 and npm 5.3.0, and on the 
centos-7.3 image which uses node v6.11.1 and npm 3.10.10 you end up with the 
following packages:
{noformat}
root@ddb384ee75a5:/thrift/src/lib/nodejs# npm list --depth 0
thrift@1.0.0-dev /thrift/src
+-- buffer-equals@1.0.4
+-- commander@2.11.0
+-- connect@3.6.3
+-- istanbul@0.4.5
+-- minimatch@3.0.4
+-- node-int64@0.4.0
+-- phantomjs@2.1.7
+-- q@1.5.0
+-- run-browser@2.0.2
+-- tape@4.8.0
+-- utf-8-validate@3.0.3
`-- ws@3.1.0
{noformat}

  was:
ws@0.4.32 is really old and presents issues for users using modern versions of 
Node (see https://github.com/apache/thrift/pull/672#issuecomment-276678791). 
Its should be updated.

In the third pull request, here are the dependencies:

node-int64 ~0.4.0
q ~1.5.0
ws >= 2.2.3 which implies node >= 4.1.0


> Update node library dependencies
> 
>
> Key: THRIFT-4064
> URL: https://issues.apache.org/jira/browse/THRIFT-4064
> Project: Thrift
>  Issue Type: Improvement
>  Components: Node.js - Library
>Affects Versions: 0.10.0
>Reporter: Andres Suarez
>Assignee: James E. King, III
>  Labels: security-issue
>
> ws@0.4.32 is really old and presents issues for users using modern versions 
> of Node (see 
> https://github.com/apache/thrift/pull/672#issuecomment-276678791). Its should 
> be updated.
> In the third pull request, here are the dependencies:
> node-int64 ~0.4.0
> q ~1.5.0
> ws >= 2.2.3 which implies node >= 4.1.0 
> (https://github.com/websockets/ws/tree/2.2.3)
> On the ubuntu-xenial image which uses node v8.4.0 and npm 5.3.0, and on the 
> centos-7.3 image which uses node v6.11.1 and npm 3.10.10 you end up with the 
> following packages:
> {noformat}
> root@ddb384ee75a5:/thrift/src/lib/nodejs# npm list --depth 0
> thrift@1.0.0-dev /thrift/src
> +-- buffer-equals@1.0.4
> +-- commander@2.11.0
> +-- connect@3.6.3
> +-- istanbul@0.4.5
> +-- minimatch@3.0.4
> +-- node-int64@0.4.0
> +-- phantomjs@2.1.7
> +-- q@1.5.0
> +-- run-browser@2.0.2
> +-- tape@4.8.0
> +-- utf-8-validate@3.0.3
> `-- ws@3.1.0
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Updated] (THRIFT-4064) Update node library dependencies

2017-09-14 Thread James E. King, III (JIRA)

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

James E. King, III updated THRIFT-4064:
---
Description: 
ws@0.4.32 is really old and presents issues for users using modern versions of 
Node (see https://github.com/apache/thrift/pull/672#issuecomment-276678791). 
Its should be updated.

In the third pull request, here are the dependencies:

node-int64 ~0.4.0
q ~1.5.0
ws >= 2.2.3 which implies node >= 4.1.0

  was:ws@0.4.32 is really old and presents issues for users using modern 
versions of Node (see 
https://github.com/apache/thrift/pull/672#issuecomment-276678791). Its should 
be updated.


> Update node library dependencies
> 
>
> Key: THRIFT-4064
> URL: https://issues.apache.org/jira/browse/THRIFT-4064
> Project: Thrift
>  Issue Type: Improvement
>  Components: Node.js - Library
>Affects Versions: 0.10.0
>Reporter: Andres Suarez
>Assignee: James E. King, III
>  Labels: security-issue
>
> ws@0.4.32 is really old and presents issues for users using modern versions 
> of Node (see 
> https://github.com/apache/thrift/pull/672#issuecomment-276678791). Its should 
> be updated.
> In the third pull request, here are the dependencies:
> node-int64 ~0.4.0
> q ~1.5.0
> ws >= 2.2.3 which implies node >= 4.1.0



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (THRIFT-4064) Update node library dependencies

2017-09-14 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/THRIFT-4064?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16166427#comment-16166427
 ] 

ASF GitHub Bot commented on THRIFT-4064:


GitHub user jeking3 opened a pull request:

https://github.com/apache/thrift/pull/1359

THRIFT-4064: update node dependencies



You can merge this pull request into a Git repository by running:

$ git pull https://github.com/jeking3/thrift THRIFT-4064

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/thrift/pull/1359.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #1359


commit 86300843b3c5e67c43f6da177b363c8725bfca48
Author: James E. King, III 
Date:   2017-09-14T15:07:08Z

THRIFT-4064: update node dependencies




> Update node library dependencies
> 
>
> Key: THRIFT-4064
> URL: https://issues.apache.org/jira/browse/THRIFT-4064
> Project: Thrift
>  Issue Type: Improvement
>  Components: Node.js - Library
>Affects Versions: 0.10.0
>Reporter: Andres Suarez
>Assignee: James E. King, III
>  Labels: security-issue
>
> ws@0.4.32 is really old and presents issues for users using modern versions 
> of Node (see 
> https://github.com/apache/thrift/pull/672#issuecomment-276678791). Its should 
> be updated.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[GitHub] thrift pull request #1359: THRIFT-4064: update node dependencies

2017-09-14 Thread jeking3
GitHub user jeking3 opened a pull request:

https://github.com/apache/thrift/pull/1359

THRIFT-4064: update node dependencies



You can merge this pull request into a Git repository by running:

$ git pull https://github.com/jeking3/thrift THRIFT-4064

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/thrift/pull/1359.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #1359


commit 86300843b3c5e67c43f6da177b363c8725bfca48
Author: James E. King, III 
Date:   2017-09-14T15:07:08Z

THRIFT-4064: update node dependencies




---


[jira] [Resolved] (THRIFT-4328) Travis CI builds are timing out (job 1) and haxe builds are failing since 9/11

2017-09-14 Thread James E. King, III (JIRA)

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

James E. King, III resolved THRIFT-4328.

Resolution: Fixed

> Travis CI builds are timing out (job 1) and haxe builds are failing since 9/11
> --
>
> Key: THRIFT-4328
> URL: https://issues.apache.org/jira/browse/THRIFT-4328
> Project: Thrift
>  Issue Type: Bug
>  Components: Build Process
>Affects Versions: 0.11.0
> Environment: travis CI
>Reporter: James E. King, III
>Assignee: James E. King, III
>Priority: Blocker
> Fix For: 0.11.0
>
>
> Need to split binary protocol cross tests to a new build job (previous 
> combination of build jobs was too aggressive).
> Need to fix haxe problem with builds that starts on 9/11.  Looks like a new 
> version of hxcpp is to blame, and pinning to the previous one resolves it.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Assigned] (THRIFT-4064) Update node library dependencies

2017-09-14 Thread James E. King, III (JIRA)

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

James E. King, III reassigned THRIFT-4064:
--

Assignee: James E. King, III

> Update node library dependencies
> 
>
> Key: THRIFT-4064
> URL: https://issues.apache.org/jira/browse/THRIFT-4064
> Project: Thrift
>  Issue Type: Improvement
>  Components: Node.js - Library
>Affects Versions: 0.10.0
>Reporter: Andres Suarez
>Assignee: James E. King, III
>  Labels: security-issue
>
> ws@0.4.32 is really old and presents issues for users using modern versions 
> of Node (see 
> https://github.com/apache/thrift/pull/672#issuecomment-276678791). Its should 
> be updated.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (THRIFT-4328) Travis CI builds are timing out (job 1) and haxe builds are failing since 9/11

2017-09-14 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/THRIFT-4328?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16166358#comment-16166358
 ] 

ASF GitHub Bot commented on THRIFT-4328:


Github user asfgit closed the pull request at:

https://github.com/apache/thrift/pull/1358


> Travis CI builds are timing out (job 1) and haxe builds are failing since 9/11
> --
>
> Key: THRIFT-4328
> URL: https://issues.apache.org/jira/browse/THRIFT-4328
> Project: Thrift
>  Issue Type: Bug
>  Components: Build Process
>Affects Versions: 0.11.0
> Environment: travis CI
>Reporter: James E. King, III
>Assignee: James E. King, III
>Priority: Blocker
> Fix For: 0.11.0
>
>
> Need to split binary protocol cross tests to a new build job (previous 
> combination of build jobs was too aggressive).
> Need to fix haxe problem with builds that starts on 9/11.  Looks like a new 
> version of hxcpp is to blame, and pinning to the previous one resolves it.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (THRIFT-4328) Travis CI builds are timing out (job 1) and haxe builds are failing since 9/11

2017-09-14 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/THRIFT-4328?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16166310#comment-16166310
 ] 

ASF GitHub Bot commented on THRIFT-4328:


Github user jeking3 commented on the issue:

https://github.com/apache/thrift/pull/1358
  
Build job 4 does not fail for me locally, it looks like something happening 
during "npm install".  I asked on the mailing list for some help.  In the 
meantime we'll continue to monitor this.


> Travis CI builds are timing out (job 1) and haxe builds are failing since 9/11
> --
>
> Key: THRIFT-4328
> URL: https://issues.apache.org/jira/browse/THRIFT-4328
> Project: Thrift
>  Issue Type: Bug
>  Components: Build Process
>Affects Versions: 0.11.0
> Environment: travis CI
>Reporter: James E. King, III
>Assignee: James E. King, III
>Priority: Blocker
> Fix For: 0.11.0
>
>
> Need to split binary protocol cross tests to a new build job (previous 
> combination of build jobs was too aggressive).
> Need to fix haxe problem with builds that starts on 9/11.  Looks like a new 
> version of hxcpp is to blame, and pinning to the previous one resolves it.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (THRIFT-4328) Travis CI builds are timing out (job 1) and haxe builds are failing since 9/11

2017-09-14 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/THRIFT-4328?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16166145#comment-16166145
 ] 

ASF GitHub Bot commented on THRIFT-4328:


GitHub user jeking3 opened a pull request:

https://github.com/apache/thrift/pull/1358

THRIFT-4328: disable centos-7.3 build jobs which appear to be unstabl…

…e/hang in jenkins

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/jeking3/thrift enable-cross-tests

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/thrift/pull/1358.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #1358


commit c76b28ad825574527a88f9543bc94f752a458942
Author: James E. King, III 
Date:   2017-09-14T12:10:29Z

THRIFT-4328: disable centos-7.3 build jobs which appear to be unstable/hang 
in jenkins




> Travis CI builds are timing out (job 1) and haxe builds are failing since 9/11
> --
>
> Key: THRIFT-4328
> URL: https://issues.apache.org/jira/browse/THRIFT-4328
> Project: Thrift
>  Issue Type: Bug
>  Components: Build Process
>Affects Versions: 0.11.0
> Environment: travis CI
>Reporter: James E. King, III
>Assignee: James E. King, III
>Priority: Blocker
> Fix For: 0.11.0
>
>
> Need to split binary protocol cross tests to a new build job (previous 
> combination of build jobs was too aggressive).
> Need to fix haxe problem with builds that starts on 9/11.  Looks like a new 
> version of hxcpp is to blame, and pinning to the previous one resolves it.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Reopened] (THRIFT-4328) Travis CI builds are timing out (job 1) and haxe builds are failing since 9/11

2017-09-14 Thread James E. King, III (JIRA)

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

James E. King, III reopened THRIFT-4328:


Builds still are not stable on Travis; fortunately Appveyor is doing okay.  The 
centos-7.3 image jobs are randomly hanging.

> Travis CI builds are timing out (job 1) and haxe builds are failing since 9/11
> --
>
> Key: THRIFT-4328
> URL: https://issues.apache.org/jira/browse/THRIFT-4328
> Project: Thrift
>  Issue Type: Bug
>  Components: Build Process
>Affects Versions: 0.11.0
> Environment: travis CI
>Reporter: James E. King, III
>Assignee: James E. King, III
>Priority: Blocker
> Fix For: 0.11.0
>
>
> Need to split binary protocol cross tests to a new build job (previous 
> combination of build jobs was too aggressive).
> Need to fix haxe problem with builds that starts on 9/11.  Looks like a new 
> version of hxcpp is to blame, and pinning to the previous one resolves it.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[GitHub] thrift pull request #1358: THRIFT-4328: disable centos-7.3 build jobs which ...

2017-09-14 Thread jeking3
GitHub user jeking3 opened a pull request:

https://github.com/apache/thrift/pull/1358

THRIFT-4328: disable centos-7.3 build jobs which appear to be unstabl…

…e/hang in jenkins

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/jeking3/thrift enable-cross-tests

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/thrift/pull/1358.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #1358


commit c76b28ad825574527a88f9543bc94f752a458942
Author: James E. King, III 
Date:   2017-09-14T12:10:29Z

THRIFT-4328: disable centos-7.3 build jobs which appear to be unstable/hang 
in jenkins




---


[jira] [Commented] (THRIFT-2289) Erlang impl of Thrift JSON protocol wrongly writes/expects true/false for bools

2017-09-14 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/THRIFT-2289?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16166101#comment-16166101
 ] 

ASF GitHub Bot commented on THRIFT-2289:


Github user walter-weinmann closed the pull request at:

https://github.com/apache/thrift/pull/1357


> Erlang impl of Thrift JSON protocol wrongly writes/expects true/false for 
> bools
> ---
>
> Key: THRIFT-2289
> URL: https://issues.apache.org/jira/browse/THRIFT-2289
> Project: Thrift
>  Issue Type: Bug
>  Components: Erlang - Library
>Affects Versions: 0.9.1
>Reporter: Jens Geyer
>
> Some implementations of Thrift JSON protocol wrongly write and expect 
> true/false for bools, instead of 0/1



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[GitHub] thrift pull request #1357: THRIFT-2289 Erlang impl of Thrift JSON protocol w...

2017-09-14 Thread walter-weinmann
Github user walter-weinmann closed the pull request at:

https://github.com/apache/thrift/pull/1357


---


[GitHub] thrift pull request #1357: THRIFT-2289 Erlang impl of Thrift JSON protocol w...

2017-09-14 Thread walter-weinmann
GitHub user walter-weinmann opened a pull request:

https://github.com/apache/thrift/pull/1357

THRIFT-2289 Erlang impl of Thrift JSON protocol wrongly writes/expect…

…s true/false for bools

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/walter-weinmann/thrift THRIFT-2289

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/thrift/pull/1357.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #1357


commit a0ba45c528cf72db373ec67a930c9d697b1d7e72
Author: walter-weinmann 
Date:   2017-09-14T11:21:09Z

THRIFT-2289 Erlang impl of Thrift JSON protocol wrongly writes/expects 
true/false for bools




---


[jira] [Commented] (THRIFT-4327) Improve TimerManager API to allow removing specific task

2017-09-14 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/THRIFT-4327?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16166034#comment-16166034
 ] 

ASF GitHub Bot commented on THRIFT-4327:


Github user Typz commented on a diff in the pull request:

https://github.com/apache/thrift/pull/1353#discussion_r138849560
  
--- Diff: lib/cpp/test/concurrency/TimerManagerTests.h ---
@@ -192,6 +192,38 @@ class TimerManagerTests {
 return true;
   }
 
+/**
+   * This test creates two tasks, removes the first one then waits for the 
second one. It then
+   * verifies that the timer manager properly clean up itself and the 
remaining orphaned timeout
+   * task when the manager goes out of scope and its destructor is called.
+   */
+  bool test03(int64_t timeout = 1000LL) {
+TimerManager timerManager;
+timerManager.threadFactory(shared_ptr(new 
PlatformThreadFactory()));
+timerManager.start();
+assert(timerManager.state() == TimerManager::STARTED);
+
+Synchronized s(_monitor);
+
+// Setup the two tasks
+shared_ptr taskToRemove
+= shared_ptr(new 
TimerManagerTests::Task(_monitor, timeout / 2));
+TimerManager::Timer timer = timerManager.add(taskToRemove, 
taskToRemove->_timeout);
+
+shared_ptr task
+  = shared_ptr(new 
TimerManagerTests::Task(_monitor, timeout));
+timerManager.add(task, task->_timeout);
+
+// Remove one task and wait until the other has completed
+timerManager.remove(timer);
--- End diff --

Done


> Improve TimerManager API to allow removing specific task
> 
>
> Key: THRIFT-4327
> URL: https://issues.apache.org/jira/browse/THRIFT-4327
> Project: Thrift
>  Issue Type: Improvement
>  Components: C++ - Library
>Reporter: Francois Ferrand
>
> The TimerManager::remove() method removes all timers with the specified 
> callback, and does so by traversing the list of timers.
> This should be improved by returning a "handle" in `TimerManager::add`, and 
> supporting efficiently removing a single timer from its handle:
> {code:java}
> class TimerManager {
>  Timer add(shared_ptr task, const struct timeval& value);
>  void remove(Timer t);
> }
> {code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (THRIFT-4327) Improve TimerManager API to allow removing specific task

2017-09-14 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/THRIFT-4327?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16166033#comment-16166033
 ] 

ASF GitHub Bot commented on THRIFT-4327:


Github user Typz commented on a diff in the pull request:

https://github.com/apache/thrift/pull/1353#discussion_r138849538
  
--- Diff: lib/cpp/src/thrift/concurrency/TimerManager.h ---
@@ -69,28 +72,33 @@ class TimerManager {
*
* @param task The task to execute
* @param timeout Time in milliseconds to delay before executing task
+   * @return Handle of the timer, which can be used to remose the timer.
--- End diff --

Done


> Improve TimerManager API to allow removing specific task
> 
>
> Key: THRIFT-4327
> URL: https://issues.apache.org/jira/browse/THRIFT-4327
> Project: Thrift
>  Issue Type: Improvement
>  Components: C++ - Library
>Reporter: Francois Ferrand
>
> The TimerManager::remove() method removes all timers with the specified 
> callback, and does so by traversing the list of timers.
> This should be improved by returning a "handle" in `TimerManager::add`, and 
> supporting efficiently removing a single timer from its handle:
> {code:java}
> class TimerManager {
>  Timer add(shared_ptr task, const struct timeval& value);
>  void remove(Timer t);
> }
> {code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[GitHub] thrift pull request #1353: THRIFT-4327: add API to efficiently remove a sing...

2017-09-14 Thread Typz
Github user Typz commented on a diff in the pull request:

https://github.com/apache/thrift/pull/1353#discussion_r138849538
  
--- Diff: lib/cpp/src/thrift/concurrency/TimerManager.h ---
@@ -69,28 +72,33 @@ class TimerManager {
*
* @param task The task to execute
* @param timeout Time in milliseconds to delay before executing task
+   * @return Handle of the timer, which can be used to remose the timer.
--- End diff --

Done


---


[GitHub] thrift pull request #1353: THRIFT-4327: add API to efficiently remove a sing...

2017-09-14 Thread Typz
Github user Typz commented on a diff in the pull request:

https://github.com/apache/thrift/pull/1353#discussion_r138849560
  
--- Diff: lib/cpp/test/concurrency/TimerManagerTests.h ---
@@ -192,6 +192,38 @@ class TimerManagerTests {
 return true;
   }
 
+/**
+   * This test creates two tasks, removes the first one then waits for the 
second one. It then
+   * verifies that the timer manager properly clean up itself and the 
remaining orphaned timeout
+   * task when the manager goes out of scope and its destructor is called.
+   */
+  bool test03(int64_t timeout = 1000LL) {
+TimerManager timerManager;
+timerManager.threadFactory(shared_ptr(new 
PlatformThreadFactory()));
+timerManager.start();
+assert(timerManager.state() == TimerManager::STARTED);
+
+Synchronized s(_monitor);
+
+// Setup the two tasks
+shared_ptr taskToRemove
+= shared_ptr(new 
TimerManagerTests::Task(_monitor, timeout / 2));
+TimerManager::Timer timer = timerManager.add(taskToRemove, 
taskToRemove->_timeout);
+
+shared_ptr task
+  = shared_ptr(new 
TimerManagerTests::Task(_monitor, timeout));
+timerManager.add(task, task->_timeout);
+
+// Remove one task and wait until the other has completed
+timerManager.remove(timer);
--- End diff --

Done


---


[jira] [Commented] (THRIFT-4327) Improve TimerManager API to allow removing specific task

2017-09-14 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/THRIFT-4327?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16166013#comment-16166013
 ] 

ASF GitHub Bot commented on THRIFT-4327:


Github user Typz commented on a diff in the pull request:

https://github.com/apache/thrift/pull/1353#discussion_r138845074
  
--- Diff: lib/cpp/src/thrift/concurrency/TimerManager.h ---
@@ -100,13 +108,26 @@ class TimerManager {
*/
   virtual void remove(stdcxx::shared_ptr task);
 
+  /**
+   * Removes a single pending task
+   *
+   * @param timer The timer to remove. The timer is returned when calling 
the
+   * add() method.
+   * @throws NoSuchTaskException Specified task doesn't exist. It was 
either
+   * processed already or this call was made 
for a
+   * task that was never added to this timer
+   *
+   * @throws UncancellableTaskException Specified task is already being
+   *executed or has completed 
execution.
+   */
+  virtual void remove(Timer timer);
--- End diff --

The old function removes *all* timers executing this task, and does this 
inefficiently by traversing the whole list.
This new function removes a single timer in constant time [O(1)] which may 
be significant for large system with many timers.
This does not impact the behavior of Thrift itself, since it does not rely 
on timer removal.


> Improve TimerManager API to allow removing specific task
> 
>
> Key: THRIFT-4327
> URL: https://issues.apache.org/jira/browse/THRIFT-4327
> Project: Thrift
>  Issue Type: Improvement
>  Components: C++ - Library
>Reporter: Francois Ferrand
>
> The TimerManager::remove() method removes all timers with the specified 
> callback, and does so by traversing the list of timers.
> This should be improved by returning a "handle" in `TimerManager::add`, and 
> supporting efficiently removing a single timer from its handle:
> {code:java}
> class TimerManager {
>  Timer add(shared_ptr task, const struct timeval& value);
>  void remove(Timer t);
> }
> {code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[GitHub] thrift pull request #1353: THRIFT-4327: add API to efficiently remove a sing...

2017-09-14 Thread Typz
Github user Typz commented on a diff in the pull request:

https://github.com/apache/thrift/pull/1353#discussion_r138845074
  
--- Diff: lib/cpp/src/thrift/concurrency/TimerManager.h ---
@@ -100,13 +108,26 @@ class TimerManager {
*/
   virtual void remove(stdcxx::shared_ptr task);
 
+  /**
+   * Removes a single pending task
+   *
+   * @param timer The timer to remove. The timer is returned when calling 
the
+   * add() method.
+   * @throws NoSuchTaskException Specified task doesn't exist. It was 
either
+   * processed already or this call was made 
for a
+   * task that was never added to this timer
+   *
+   * @throws UncancellableTaskException Specified task is already being
+   *executed or has completed 
execution.
+   */
+  virtual void remove(Timer timer);
--- End diff --

The old function removes *all* timers executing this task, and does this 
inefficiently by traversing the whole list.
This new function removes a single timer in constant time [O(1)] which may 
be significant for large system with many timers.
This does not impact the behavior of Thrift itself, since it does not rely 
on timer removal.


---


[jira] [Commented] (THRIFT-4232) ./configure does bad ant version check

2017-09-14 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/THRIFT-4232?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16165936#comment-16165936
 ] 

ASF GitHub Bot commented on THRIFT-4232:


Github user magiccrafter commented on a diff in the pull request:

https://github.com/apache/thrift/pull/1354#discussion_r138824699
  
--- Diff: aclocal/ax_javac_and_java.m4 ---
@@ -118,7 +118,7 @@ AC_DEFUN([AX_CHECK_JAVA_CLASS],
 AC_DEFUN([AX_CHECK_ANT_VERSION],
  [
   AC_MSG_CHECKING(for ant version > $2)
-  ANT_VALID=`expr $($1 -version 2>/dev/null | sed -n 's/.*version 
\(@<:@0-9\.@:>@*\).*/\1/p') \>= $2`
+  ANT_VALID=`expr "x$(printf "$2\n$($1 -version 2>/dev/null | sed 
-n 's/.*version \(@<:@0-9\.@:>@*\).*/\1/p')" | sort -t '.' -k 1,1 -k 2,2 -k 3,3 
-g | sed -n 1p)" = "x$2"`
--- End diff --

The issue that the pull request is fixing is the version comparison part. 
The ant version extraction is working like charm and doesn't need to be changed.

@jeking3, you are not testing accurately. Thats not a bash script file, 
this is a Autoconf/m4 macro and the following:
`ant -version | sed -n 's/.*version \(@<:@0-9\.@:>@*\).*/\1/p'`
 at the time of running the bash command will have the 'Quadrigraphs'(@<:@) 
escaped:
`ant -version | sed -n 's/.*version \([0-9\.]*\).*/\1/p'`

For further details check the docs: 
https://www.gnu.org/software/autoconf/manual/autoconf.html#Quadrigraphs

I hope this clears the things a bit.
Thanks


> ./configure does bad ant version check
> --
>
> Key: THRIFT-4232
> URL: https://issues.apache.org/jira/browse/THRIFT-4232
> Project: Thrift
>  Issue Type: Bug
>  Components: Build Process
>Affects Versions: 0.10.0
> Environment: OSX 10.12.5, running ant 1.10.1
>Reporter: David Woodward
>   Original Estimate: 3h
>  Remaining Estimate: 3h
>
> On line 18869 of the configure script, it checks that the ant version is >= 
> 1.7. It uses some kind of string comparison. This breaks for my current ant 
> version (1.10). It seems to think that 1.10 is not >= 1.7. I think this is 
> because it's comparing strings without taking into account what the strings 
> actually mean. Something like this might be a possible patch:
> https://stackoverflow.com/questions/16989598/bash-comparing-version-numbers
> This should be fixed because it means that people with new ant versions can't 
> build the java thrift library.
> Also it should be checked to see if other parts of the configure process are 
> using these kinds of faulty version checks.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[GitHub] thrift pull request #1354: THRIFT-4232 ./configure does bad ant version chec...

2017-09-14 Thread magiccrafter
Github user magiccrafter commented on a diff in the pull request:

https://github.com/apache/thrift/pull/1354#discussion_r138824699
  
--- Diff: aclocal/ax_javac_and_java.m4 ---
@@ -118,7 +118,7 @@ AC_DEFUN([AX_CHECK_JAVA_CLASS],
 AC_DEFUN([AX_CHECK_ANT_VERSION],
  [
   AC_MSG_CHECKING(for ant version > $2)
-  ANT_VALID=`expr $($1 -version 2>/dev/null | sed -n 's/.*version 
\(@<:@0-9\.@:>@*\).*/\1/p') \>= $2`
+  ANT_VALID=`expr "x$(printf "$2\n$($1 -version 2>/dev/null | sed 
-n 's/.*version \(@<:@0-9\.@:>@*\).*/\1/p')" | sort -t '.' -k 1,1 -k 2,2 -k 3,3 
-g | sed -n 1p)" = "x$2"`
--- End diff --

The issue that the pull request is fixing is the version comparison part. 
The ant version extraction is working like charm and doesn't need to be changed.

@jeking3, you are not testing accurately. Thats not a bash script file, 
this is a Autoconf/m4 macro and the following:
`ant -version | sed -n 's/.*version \(@<:@0-9\.@:>@*\).*/\1/p'`
 at the time of running the bash command will have the 'Quadrigraphs'(@<:@) 
escaped:
`ant -version | sed -n 's/.*version \([0-9\.]*\).*/\1/p'`

For further details check the docs: 
https://www.gnu.org/software/autoconf/manual/autoconf.html#Quadrigraphs

I hope this clears the things a bit.
Thanks


---


[GitHub] thrift pull request #1356: THRIFT-2289 Erlang impl of Thrift JSON protocol w...

2017-09-14 Thread walter-weinmann
Github user walter-weinmann closed the pull request at:

https://github.com/apache/thrift/pull/1356


---


[jira] [Commented] (THRIFT-2289) Erlang impl of Thrift JSON protocol wrongly writes/expects true/false for bools

2017-09-14 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/THRIFT-2289?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16165841#comment-16165841
 ] 

ASF GitHub Bot commented on THRIFT-2289:


Github user walter-weinmann closed the pull request at:

https://github.com/apache/thrift/pull/1356


> Erlang impl of Thrift JSON protocol wrongly writes/expects true/false for 
> bools
> ---
>
> Key: THRIFT-2289
> URL: https://issues.apache.org/jira/browse/THRIFT-2289
> Project: Thrift
>  Issue Type: Bug
>  Components: Erlang - Library
>Affects Versions: 0.9.1
>Reporter: Jens Geyer
>
> Some implementations of Thrift JSON protocol wrongly write and expect 
> true/false for bools, instead of 0/1



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (THRIFT-4312) Erlang client cannot connect to Python server: exception error: econnrefused

2017-09-14 Thread Walter Weinmann (JIRA)

[ 
https://issues.apache.org/jira/browse/THRIFT-4312?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16165820#comment-16165820
 ] 

Walter Weinmann commented on THRIFT-4312:
-

This is running with Ubuntu 17.04 on a Virtual Box.

It is not running with Windows 10.

> Erlang client cannot connect to Python server: exception error: econnrefused
> 
>
> Key: THRIFT-4312
> URL: https://issues.apache.org/jira/browse/THRIFT-4312
> Project: Thrift
>  Issue Type: Bug
>  Components: Erlang - Library, Python - Library, Tutorial
>Affects Versions: 0.10.0
> Environment: Windows 10
> Erlang OTP 20
> Python 3.6.2
>Reporter: Walter Weinmann
>  Labels: Connection, Erlang, Python, Tutorial
>
> h3. Connecting the Erlang client with the Python server gives connection 
> error:
> h3. 
> h4. Erlang client:
> h4. 
> h4. 
> -- the examples are taken from the Apache Thrift tutorials ---
> {quote}-module(client).
> -include("calculator_thrift.hrl").
> -export([t/0]).
> p(X) ->
> io:format("~p~n", [X]),
> ok.
> t() ->
> Port = 9090,
> {ok, Client0} = thrift_client_util:new("localhost",
>Port,
>calculator_thrift,
>[]),
> {Client1, {ok, ok}} = thrift_client:call(Client0, ping, []),
> io:format("ping~n", []),
> {Client2, {ok, Sum}} = thrift_client:call(Client1, add,  [1, 1]),
> io:format("1+1=~p~n", [Sum]),
> {Client3, {ok, Sum1}} = thrift_client:call(Client2, add, [1, 4]),
> io:format("1+4=~p~n", [Sum1]),
> Work = #'Work'{op=?TUTORIAL_OPERATION_SUBTRACT,
>  num1=15,
>  num2=10},
> {Client4, {ok, Diff}} = thrift_client:call(Client3, calculate, [1, Work]),
> io:format("15-10=~p~n", [Diff]),
> {Client5, {ok, Log}} = thrift_client:call(Client4, getStruct, [1]),
> io:format("Log: ~p~n", [Log]),
> Client6 =
> try
> Work1 = #'Work'{op=?TUTORIAL_OPERATION_DIVIDE,
>   num1=1,
>   num2=0},
> {ClientS1, {ok, _Quot}} = thrift_client:call(Client5, calculate, 
> [2, Work1]),
> io:format("LAME: exception handling is broken~n", []),
> ClientS1
> catch
> throw:{ClientS2, Z} ->
> io:format("Got exception where expecting - the " ++
>   "following is NOT a problem!!!~n"),
> p(Z),
> ClientS2
> end,
> {Client7, {ok, ok}} = thrift_client:call(Client6, zip, []),
> io:format("zip~n", []),
> {_Client8, ok} = thrift_client:close(Client7),
> ok.
> {quote}
> h4. Python server:
> h4. 
> {quote}#!/usr/bin/env python
> from tutorial import Calculator
> from tutorial.ttypes import InvalidOperation, Operation
> from shared.ttypes import SharedStruct
> from thrift.transport import TSocket
> from thrift.transport import TTransport
> from thrift.protocol import TBinaryProtocol
> from thrift.server import TServer
> class CalculatorHandler:
> def __init__(self):
> self.log = {}
> def ping(self):
> print('ping()')
> def add(self, n1, n2):
> print('add(%d,%d)' % (n1, n2))
> return n1 + n2
> def calculate(self, logid, work):
> print('calculate(%d, %r)' % (logid, work))
> if work.op == Operation.ADD:
> val = work.num1 + work.num2
> elif work.op == Operation.SUBTRACT:
> val = work.num1 - work.num2
> elif work.op == Operation.MULTIPLY:
> val = work.num1 * work.num2
> elif work.op == Operation.DIVIDE:
> if work.num2 == 0:
> x = InvalidOperation()
> x.whatOp = work.op
> x.why = 'Cannot divide by 0'
> raise x
> val = work.num1 / work.num2
> else:
> x = InvalidOperation()
> x.whatOp = work.op
> x.why = 'Invalid operation'
> raise x
> log = SharedStruct()
> log.key = logid
> log.value = '%d' % (val)
> self.log[logid] = log
> return val
> def getStruct(self, key):
> print('getStruct(%d)' % (key))
> return self.log[key]
> def zip(self):
> print('zip()')
> if __name__ == '__main__':
> handler = CalculatorHandler()
> processor = Calculator.Processor(handler)
> transport = TSocket.TServerSocket(port=9090)
> tfactory = TTransport.TBufferedTransportFactory()
> pfactory = TBinaryProtocol.TBinaryProtocolFactory()
> server = TServer.TSimpleServer(processor, transport, tfactory, pfactory)
> # You could do one of these for a multithreaded server
> # server 

[jira] [Updated] (THRIFT-4312) Erlang client cannot connect to Python server: exception error: econnrefused

2017-09-14 Thread Walter Weinmann (JIRA)

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

Walter Weinmann updated THRIFT-4312:

Description: 
h3. Connecting the Erlang client with the Python server gives connection error:
h3. 
h4. Erlang client:
h4. 
h4. 

-- the examples are taken from the Apache Thrift tutorials ---

{quote}-module(client).

-include("calculator_thrift.hrl").

-export([t/0]).

p(X) ->
io:format("~p~n", [X]),
ok.

t() ->
Port = 9090,

{ok, Client0} = thrift_client_util:new("localhost",
   Port,
   calculator_thrift,
   []),

{Client1, {ok, ok}} = thrift_client:call(Client0, ping, []),
io:format("ping~n", []),

{Client2, {ok, Sum}} = thrift_client:call(Client1, add,  [1, 1]),
io:format("1+1=~p~n", [Sum]),

{Client3, {ok, Sum1}} = thrift_client:call(Client2, add, [1, 4]),
io:format("1+4=~p~n", [Sum1]),

Work = #'Work'{op=?TUTORIAL_OPERATION_SUBTRACT,
 num1=15,
 num2=10},
{Client4, {ok, Diff}} = thrift_client:call(Client3, calculate, [1, Work]),
io:format("15-10=~p~n", [Diff]),

{Client5, {ok, Log}} = thrift_client:call(Client4, getStruct, [1]),
io:format("Log: ~p~n", [Log]),

Client6 =
try
Work1 = #'Work'{op=?TUTORIAL_OPERATION_DIVIDE,
  num1=1,
  num2=0},
{ClientS1, {ok, _Quot}} = thrift_client:call(Client5, calculate, 
[2, Work1]),

io:format("LAME: exception handling is broken~n", []),
ClientS1
catch
throw:{ClientS2, Z} ->
io:format("Got exception where expecting - the " ++
  "following is NOT a problem!!!~n"),
p(Z),
ClientS2
end,


{Client7, {ok, ok}} = thrift_client:call(Client6, zip, []),
io:format("zip~n", []),

{_Client8, ok} = thrift_client:close(Client7),
ok.
{quote}


h4. Python server:
h4. 

{quote}#!/usr/bin/env python

from tutorial import Calculator
from tutorial.ttypes import InvalidOperation, Operation

from shared.ttypes import SharedStruct

from thrift.transport import TSocket
from thrift.transport import TTransport
from thrift.protocol import TBinaryProtocol
from thrift.server import TServer


class CalculatorHandler:
def __init__(self):
self.log = {}

def ping(self):
print('ping()')

def add(self, n1, n2):
print('add(%d,%d)' % (n1, n2))
return n1 + n2

def calculate(self, logid, work):
print('calculate(%d, %r)' % (logid, work))

if work.op == Operation.ADD:
val = work.num1 + work.num2
elif work.op == Operation.SUBTRACT:
val = work.num1 - work.num2
elif work.op == Operation.MULTIPLY:
val = work.num1 * work.num2
elif work.op == Operation.DIVIDE:
if work.num2 == 0:
x = InvalidOperation()
x.whatOp = work.op
x.why = 'Cannot divide by 0'
raise x
val = work.num1 / work.num2
else:
x = InvalidOperation()
x.whatOp = work.op
x.why = 'Invalid operation'
raise x

log = SharedStruct()
log.key = logid
log.value = '%d' % (val)
self.log[logid] = log

return val

def getStruct(self, key):
print('getStruct(%d)' % (key))
return self.log[key]

def zip(self):
print('zip()')

if __name__ == '__main__':
handler = CalculatorHandler()
processor = Calculator.Processor(handler)
transport = TSocket.TServerSocket(port=9090)
tfactory = TTransport.TBufferedTransportFactory()
pfactory = TBinaryProtocol.TBinaryProtocolFactory()

server = TServer.TSimpleServer(processor, transport, tfactory, pfactory)

# You could do one of these for a multithreaded server
# server = TServer.TThreadedServer(
# processor, transport, tfactory, pfactory)
# server = TServer.TThreadPoolServer(
# processor, transport, tfactory, pfactory)

print('Starting the server...')
server.serve()
print('done.')
{quote}

h4. Runtime protocol:
h4. 

{quote}EBIN Path : 
D:\SoftDevelopment\Projects\erlang-and-thrift_idea\erlang-and-thrift\_build\default\lib\erlang_and_thrift\ebin
 
D:\SoftDevelopment\Projects\erlang-and-thrift_idea\erlang-and-thrift\_build\default\lib\jsx\ebin
 
D:\SoftDevelopment\Projects\erlang-and-thrift_idea\erlang-and-thrift\_build\default\lib\thrift\ebin
--
Eshell V9.0  (abort with ^G)
1> client:t().
** exception error: no match of right hand side value {error,econnrefused}
 in function  client:t/0