[GitHub] thrift pull request #1297: handleRuntimeExceptions

2017-06-26 Thread zhouxianjun
Github user zhouxianjun closed the pull request at:

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


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] thrift issue #1297: handleRuntimeExceptions

2017-06-26 Thread zhouxianjun
Github user zhouxianjun commented on the issue:

https://github.com/apache/thrift/pull/1297
  
I was wrong, I compiled the master, but I used 0.10.0, I'm sorry.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[jira] [Updated] (THRIFT-4237) Go TServerSocket Race Conditions

2017-06-26 Thread Zach Wasserman (JIRA)

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

Zach Wasserman updated THRIFT-4237:
---
Description: 
Run the following test with {{go test -race -run TestSocketConcurrency}}:

{code}
func TestSocketConcurrency(t *testing.T) {
host := "127.0.0.1"
port := 9090
addr := fmt.Sprintf("%s:%d", host, port)

socket := CreateServerSocket(t, addr)
go func() { socket.Listen() }()
go func() { socket.Interrupt() }()
}
{code}

This will result in an error from the race detector. It looks like:

{code}
go test -v -race -run TestSocketConcurrency
=== RUN   TestSocketConcurrency
--- PASS: TestSocketConcurrency (0.00s)
==
WARNING: DATA RACE
Write at 0x00c420016870 by goroutine 7:
  git.apache.org/thrift.git/lib/go/thrift.(*TServerSocket).Listen()
  
/Users/zwass/dev/go/src/git.apache.org/thrift.git/lib/go/thrift/server_socket.go:63
 +0x134
  git.apache.org/thrift.git/lib/go/thrift.TestSocketConcurrency.func1()
  
/Users/zwass/dev/go/src/git.apache.org/thrift.git/lib/go/thrift/server_socket_test.go:50
 +0x38

Previous read at 0x00c420016870 by goroutine 8:
  git.apache.org/thrift.git/lib/go/thrift.(*TServerSocket).Close()
  
/Users/zwass/dev/go/src/git.apache.org/thrift.git/lib/go/thrift/server_socket.go:114
 +0x7b
  git.apache.org/thrift.git/lib/go/thrift.(*TServerSocket).Interrupt()
  
/Users/zwass/dev/go/src/git.apache.org/thrift.git/lib/go/thrift/server_socket.go:123
 +0x6b
  git.apache.org/thrift.git/lib/go/thrift.TestSocketConcurrency.func2()
  
/Users/zwass/dev/go/src/git.apache.org/thrift.git/lib/go/thrift/server_socket_test.go:51
 +0x38

Goroutine 7 (running) created at:
  git.apache.org/thrift.git/lib/go/thrift.TestSocketConcurrency()
  
/Users/zwass/dev/go/src/git.apache.org/thrift.git/lib/go/thrift/server_socket_test.go:50
 +0x1a8
  testing.tRunner()
  /usr/local/Cellar/go/1.8/libexec/src/testing/testing.go:657 +0x107

Goroutine 8 (running) created at:
  git.apache.org/thrift.git/lib/go/thrift.TestSocketConcurrency()
  
/Users/zwass/dev/go/src/git.apache.org/thrift.git/lib/go/thrift/server_socket_test.go:51
 +0x1ca
  testing.tRunner()
  /usr/local/Cellar/go/1.8/libexec/src/testing/testing.go:657 +0x107
==
==
WARNING: DATA RACE
Write at 0x00c420016870 by goroutine 8:
  git.apache.org/thrift.git/lib/go/thrift.(*TServerSocket).Close.func1()
  
/Users/zwass/dev/go/src/git.apache.org/thrift.git/lib/go/thrift/server_socket.go:112
 +0x3b
  git.apache.org/thrift.git/lib/go/thrift.(*TServerSocket).Close()
  
/Users/zwass/dev/go/src/git.apache.org/thrift.git/lib/go/thrift/server_socket.go:117
 +0xe6
  git.apache.org/thrift.git/lib/go/thrift.(*TServerSocket).Interrupt()
  
/Users/zwass/dev/go/src/git.apache.org/thrift.git/lib/go/thrift/server_socket.go:123
 +0x6b
  git.apache.org/thrift.git/lib/go/thrift.TestSocketConcurrency.func2()
  
/Users/zwass/dev/go/src/git.apache.org/thrift.git/lib/go/thrift/server_socket_test.go:51
 +0x38

Previous read at 0x00c420016870 by goroutine 7:
  git.apache.org/thrift.git/lib/go/thrift.(*TServerSocket).Listen()
  
/Users/zwass/dev/go/src/git.apache.org/thrift.git/lib/go/thrift/server_socket.go:56
 +0x48
  git.apache.org/thrift.git/lib/go/thrift.TestSocketConcurrency.func1()
  
/Users/zwass/dev/go/src/git.apache.org/thrift.git/lib/go/thrift/server_socket_test.go:50
 +0x38

Goroutine 8 (running) created at:
  git.apache.org/thrift.git/lib/go/thrift.TestSocketConcurrency()
  
/Users/zwass/dev/go/src/git.apache.org/thrift.git/lib/go/thrift/server_socket_test.go:51
 +0x1ca
  testing.tRunner()
  /usr/local/Cellar/go/1.8/libexec/src/testing/testing.go:657 +0x107

Goroutine 7 (finished) created at:
  git.apache.org/thrift.git/lib/go/thrift.TestSocketConcurrency()
  
/Users/zwass/dev/go/src/git.apache.org/thrift.git/lib/go/thrift/server_socket_test.go:50
 +0x1a8
  testing.tRunner()
  /usr/local/Cellar/go/1.8/libexec/src/testing/testing.go:657 +0x107
==
FAIL
exit status 1
FAILgit.apache.org/thrift.git/lib/go/thrift 0.186s
{code}

I believe this is because {{Interrupt()}}
 
(https://github.com/apache/thrift/blob/master/lib/go/thrift/server_socket.go#L120)
 and {{Listen()}} 
(https://github.com/apache/thrift/blob/master/lib/go/thrift/server_socket.go#L55)
 both read and write {{p.listener}}, but only {{Interrupt()}} locks the mutex.

  was:
Run the following test with {{go test -race -run TestSocketConcurrency}}:

{code:golang}
func TestSocketConcurrency(t *testing.T) {
host := "127.0.0.1"
port := 9090
addr := fmt.Sprintf("%s:%d", host, port)

socket := CreateServerSocket(t, addr)
go func() { socket.Listen() }()
go func() { socket.Interrupt() }()
}
{code}

This will result in an error from the race detector. It looks like:

{code}
go test -v -race 

[jira] [Created] (THRIFT-4237) Go TServerSocket Race Conditions

2017-06-26 Thread Zach Wasserman (JIRA)
Zach Wasserman created THRIFT-4237:
--

 Summary: Go TServerSocket Race Conditions
 Key: THRIFT-4237
 URL: https://issues.apache.org/jira/browse/THRIFT-4237
 Project: Thrift
  Issue Type: Bug
  Components: Go - Library
Affects Versions: 0.10.0
Reporter: Zach Wasserman


Run the following test with {{go test -race -run TestSocketConcurrency}}:

{code:golang}
func TestSocketConcurrency(t *testing.T) {
host := "127.0.0.1"
port := 9090
addr := fmt.Sprintf("%s:%d", host, port)

socket := CreateServerSocket(t, addr)
go func() { socket.Listen() }()
go func() { socket.Interrupt() }()
}
{code}

This will result in an error from the race detector. It looks like:

{code}
go test -v -race -run TestSocketConcurrency
=== RUN   TestSocketConcurrency
--- PASS: TestSocketConcurrency (0.00s)
==
WARNING: DATA RACE
Write at 0x00c420016870 by goroutine 7:
  git.apache.org/thrift.git/lib/go/thrift.(*TServerSocket).Listen()
  
/Users/zwass/dev/go/src/git.apache.org/thrift.git/lib/go/thrift/server_socket.go:63
 +0x134
  git.apache.org/thrift.git/lib/go/thrift.TestSocketConcurrency.func1()
  
/Users/zwass/dev/go/src/git.apache.org/thrift.git/lib/go/thrift/server_socket_test.go:50
 +0x38

Previous read at 0x00c420016870 by goroutine 8:
  git.apache.org/thrift.git/lib/go/thrift.(*TServerSocket).Close()
  
/Users/zwass/dev/go/src/git.apache.org/thrift.git/lib/go/thrift/server_socket.go:114
 +0x7b
  git.apache.org/thrift.git/lib/go/thrift.(*TServerSocket).Interrupt()
  
/Users/zwass/dev/go/src/git.apache.org/thrift.git/lib/go/thrift/server_socket.go:123
 +0x6b
  git.apache.org/thrift.git/lib/go/thrift.TestSocketConcurrency.func2()
  
/Users/zwass/dev/go/src/git.apache.org/thrift.git/lib/go/thrift/server_socket_test.go:51
 +0x38

Goroutine 7 (running) created at:
  git.apache.org/thrift.git/lib/go/thrift.TestSocketConcurrency()
  
/Users/zwass/dev/go/src/git.apache.org/thrift.git/lib/go/thrift/server_socket_test.go:50
 +0x1a8
  testing.tRunner()
  /usr/local/Cellar/go/1.8/libexec/src/testing/testing.go:657 +0x107

Goroutine 8 (running) created at:
  git.apache.org/thrift.git/lib/go/thrift.TestSocketConcurrency()
  
/Users/zwass/dev/go/src/git.apache.org/thrift.git/lib/go/thrift/server_socket_test.go:51
 +0x1ca
  testing.tRunner()
  /usr/local/Cellar/go/1.8/libexec/src/testing/testing.go:657 +0x107
==
==
WARNING: DATA RACE
Write at 0x00c420016870 by goroutine 8:
  git.apache.org/thrift.git/lib/go/thrift.(*TServerSocket).Close.func1()
  
/Users/zwass/dev/go/src/git.apache.org/thrift.git/lib/go/thrift/server_socket.go:112
 +0x3b
  git.apache.org/thrift.git/lib/go/thrift.(*TServerSocket).Close()
  
/Users/zwass/dev/go/src/git.apache.org/thrift.git/lib/go/thrift/server_socket.go:117
 +0xe6
  git.apache.org/thrift.git/lib/go/thrift.(*TServerSocket).Interrupt()
  
/Users/zwass/dev/go/src/git.apache.org/thrift.git/lib/go/thrift/server_socket.go:123
 +0x6b
  git.apache.org/thrift.git/lib/go/thrift.TestSocketConcurrency.func2()
  
/Users/zwass/dev/go/src/git.apache.org/thrift.git/lib/go/thrift/server_socket_test.go:51
 +0x38

Previous read at 0x00c420016870 by goroutine 7:
  git.apache.org/thrift.git/lib/go/thrift.(*TServerSocket).Listen()
  
/Users/zwass/dev/go/src/git.apache.org/thrift.git/lib/go/thrift/server_socket.go:56
 +0x48
  git.apache.org/thrift.git/lib/go/thrift.TestSocketConcurrency.func1()
  
/Users/zwass/dev/go/src/git.apache.org/thrift.git/lib/go/thrift/server_socket_test.go:50
 +0x38

Goroutine 8 (running) created at:
  git.apache.org/thrift.git/lib/go/thrift.TestSocketConcurrency()
  
/Users/zwass/dev/go/src/git.apache.org/thrift.git/lib/go/thrift/server_socket_test.go:51
 +0x1ca
  testing.tRunner()
  /usr/local/Cellar/go/1.8/libexec/src/testing/testing.go:657 +0x107

Goroutine 7 (finished) created at:
  git.apache.org/thrift.git/lib/go/thrift.TestSocketConcurrency()
  
/Users/zwass/dev/go/src/git.apache.org/thrift.git/lib/go/thrift/server_socket_test.go:50
 +0x1a8
  testing.tRunner()
  /usr/local/Cellar/go/1.8/libexec/src/testing/testing.go:657 +0x107
==
FAIL
exit status 1
FAILgit.apache.org/thrift.git/lib/go/thrift 0.186s
{code}

I believe this is because {{Interrupt()}}
 
(https://github.com/apache/thrift/blob/master/lib/go/thrift/server_socket.go#L120)
 and {{Listen()}} 
(https://github.com/apache/thrift/blob/master/lib/go/thrift/server_socket.go#L55)
 both read and write {{p.listener}}, but only {{Interrupt()}} locks the mutex.



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


[GitHub] thrift issue #1297: handleRuntimeExceptions

2017-06-26 Thread Jens-G
Github user Jens-G commented on the issue:

https://github.com/apache/thrift/pull/1297
  
Something is wrong here. Could you please review your pull request? 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[jira] [Resolved] (THRIFT-4234) Travis build fails cross language tests with "Unsupported security protocol type"

2017-06-26 Thread Jens Geyer (JIRA)

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

Jens Geyer resolved THRIFT-4234.

   Resolution: Fixed
Fix Version/s: 0.11.0

Committed, thanks!

> Travis build fails cross language tests with "Unsupported security protocol 
> type"
> -
>
> Key: THRIFT-4234
> URL: https://issues.apache.org/jira/browse/THRIFT-4234
> Project: Thrift
>  Issue Type: Bug
>  Components: C# - Compiler, C# - Library, Test Suite
>Affects Versions: 0.10.0
> Environment: csharp, mono
>Reporter: Eric Conner
>Priority: Blocker
> Fix For: 0.11.0
>
>
> The Travis build cross-functional ssl tests for java - csharp fail due to SSL 
> protocol problems on the C-Sharp side.
> The server fails with the following error:
> {code:java}
> NotSupportedException: "Unsupported security protocol type"
> {code}
> and the client throws an exception in kind:
> [java] Sample TSimpleJSONProtocol output:
> [java] {}
> [java] org.apache.thrift.transport.TTransportException: 
> javax.net.ssl.SSLProtocolException: handshake alert:  internal_error



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


[jira] [Commented] (THRIFT-4234) Travis build fails cross language tests with "Unsupported security protocol type"

2017-06-26 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on THRIFT-4234:


Github user asfgit closed the pull request at:

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


> Travis build fails cross language tests with "Unsupported security protocol 
> type"
> -
>
> Key: THRIFT-4234
> URL: https://issues.apache.org/jira/browse/THRIFT-4234
> Project: Thrift
>  Issue Type: Bug
>  Components: C# - Compiler, C# - Library, Test Suite
>Affects Versions: 0.10.0
> Environment: csharp, mono
>Reporter: Eric Conner
>Priority: Blocker
> Fix For: 0.11.0
>
>
> The Travis build cross-functional ssl tests for java - csharp fail due to SSL 
> protocol problems on the C-Sharp side.
> The server fails with the following error:
> {code:java}
> NotSupportedException: "Unsupported security protocol type"
> {code}
> and the client throws an exception in kind:
> [java] Sample TSimpleJSONProtocol output:
> [java] {}
> [java] org.apache.thrift.transport.TTransportException: 
> javax.net.ssl.SSLProtocolException: handshake alert:  internal_error



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


[jira] [Commented] (THRIFT-4213) Travis build fails at curl -sSL https://www.npmjs.com/install.sh | sh

2017-06-26 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on THRIFT-4213:


Github user asfgit closed the pull request at:

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


> Travis build fails at curl -sSL https://www.npmjs.com/install.sh | sh
> -
>
> Key: THRIFT-4213
> URL: https://issues.apache.org/jira/browse/THRIFT-4213
> Project: Thrift
>  Issue Type: Bug
>  Components: Build Process
>Reporter: Jens Geyer
>Priority: Blocker
>
> {code}
> Step 24 : RUN curl -sSL https://www.npmjs.com/install.sh | sh
> ---> Running in 0edf1ca023e7
> tar=/bin/tar
> version:
> tar (GNU tar) 1.27.1
> Copyright (C) 2013 Free Software Foundation, Inc.
> License GPLv3+: GNU GPL version 3 or later 
> .
> This is free software: you are free to change and redistribute it.
> There is NO WARRANTY, to the extent permitted by law.
> Written by John Gilmore and Jay Fenlason.
> install npm@latest
> fetching: https://registry.npmjs.org/npm/-/npm-4.6.1.tgz
> npm ERR! Object function (err) {
> npm ERR! if (err) return cb(err)
> npm ERR! fs.fsync(fd, function (err) {
> npm ERR!   if (err) return cb(err)
> npm ERR!   fs.close(fd, cb)
> npm ERR! })
> npm ERR!   } has no method 'toLowerCase'
> It failed
> The command '/bin/sh -c curl -sSL https://www.npmjs.com/install.sh | sh' 
> returned a non-zero code: 1
> /home/travis/.travis/job_stages: line 155:  1053 Terminated 
> travis_jigger $! $timeout $cmd
> {code}



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


[jira] [Commented] (THRIFT-4213) Travis build fails at curl -sSL https://www.npmjs.com/install.sh | sh

2017-06-26 Thread Jens Geyer (JIRA)

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

Jens Geyer commented on THRIFT-4213:


Good question. Since tzhe overall result has improved, I just committed this, 
but leave the ticket open.

> Travis build fails at curl -sSL https://www.npmjs.com/install.sh | sh
> -
>
> Key: THRIFT-4213
> URL: https://issues.apache.org/jira/browse/THRIFT-4213
> Project: Thrift
>  Issue Type: Bug
>  Components: Build Process
>Reporter: Jens Geyer
>Priority: Blocker
>
> {code}
> Step 24 : RUN curl -sSL https://www.npmjs.com/install.sh | sh
> ---> Running in 0edf1ca023e7
> tar=/bin/tar
> version:
> tar (GNU tar) 1.27.1
> Copyright (C) 2013 Free Software Foundation, Inc.
> License GPLv3+: GNU GPL version 3 or later 
> .
> This is free software: you are free to change and redistribute it.
> There is NO WARRANTY, to the extent permitted by law.
> Written by John Gilmore and Jay Fenlason.
> install npm@latest
> fetching: https://registry.npmjs.org/npm/-/npm-4.6.1.tgz
> npm ERR! Object function (err) {
> npm ERR! if (err) return cb(err)
> npm ERR! fs.fsync(fd, function (err) {
> npm ERR!   if (err) return cb(err)
> npm ERR!   fs.close(fd, cb)
> npm ERR! })
> npm ERR!   } has no method 'toLowerCase'
> It failed
> The command '/bin/sh -c curl -sSL https://www.npmjs.com/install.sh | sh' 
> returned a non-zero code: 1
> /home/travis/.travis/job_stages: line 155:  1053 Terminated 
> travis_jigger $! $timeout $cmd
> {code}



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


[GitHub] thrift pull request #1296: THRIFT-4234 Travis build fails cross language tes...

2017-06-26 Thread asfgit
Github user asfgit closed the pull request at:

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


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] thrift pull request #1295: THRIFT-4213 Travis build fails at curl -sSL https...

2017-06-26 Thread asfgit
Github user asfgit closed the pull request at:

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


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[jira] [Commented] (THRIFT-4236) Support context in go generated code.

2017-06-26 Thread Jens Geyer (JIRA)

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

Jens Geyer commented on THRIFT-4236:


{quote}
> other framework like grpc will pass a context for the first param, so the 
> expected output for above definition may looks like:
{quote}

Not yet. However, Thift is Open Source, which means it lives by contributions 
from its users. Hence, if you feel like [contributing some add-on functionally 
to the Thrift Go lib, we appreciate your pull 
request|https://thrift.apache.org/docs/HowToContribute]. 


> Support context in go generated code.
> -
>
> Key: THRIFT-4236
> URL: https://issues.apache.org/jira/browse/THRIFT-4236
> Project: Thrift
>  Issue Type: Improvement
>  Components: Go - Compiler, Go - Library
>Reporter: taozle
>
> Since context is widely used in go's community, and there is lots of 
> advantage to use context such as control timeout, carry extra info in one 
> request etc, so is there any plan for this? i just searched the issues but 
> didn't find anything about this.



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


[jira] [Commented] (THRIFT-4234) Travis build fails cross language tests with "Unsupported security protocol type"

2017-06-26 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on THRIFT-4234:


Github user Jens-G commented on the issue:

https://github.com/apache/thrift/pull/1296
  
Nice, but not 100%. Still two are saying ..

> npm install
> /bin/bash: npm: command not found
> 



> Travis build fails cross language tests with "Unsupported security protocol 
> type"
> -
>
> Key: THRIFT-4234
> URL: https://issues.apache.org/jira/browse/THRIFT-4234
> Project: Thrift
>  Issue Type: Bug
>  Components: C# - Compiler, C# - Library, Test Suite
>Affects Versions: 0.10.0
> Environment: csharp, mono
>Reporter: Eric Conner
>Priority: Blocker
>
> The Travis build cross-functional ssl tests for java - csharp fail due to SSL 
> protocol problems on the C-Sharp side.
> The server fails with the following error:
> {code:java}
> NotSupportedException: "Unsupported security protocol type"
> {code}
> and the client throws an exception in kind:
> [java] Sample TSimpleJSONProtocol output:
> [java] {}
> [java] org.apache.thrift.transport.TTransportException: 
> javax.net.ssl.SSLProtocolException: handshake alert:  internal_error



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


[GitHub] thrift issue #1296: THRIFT-4234 Travis build fails cross language tests with...

2017-06-26 Thread Jens-G
Github user Jens-G commented on the issue:

https://github.com/apache/thrift/pull/1296
  
Nice, but not 100%. Still two are saying ..

> npm install
> /bin/bash: npm: command not found
> 



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


Re: Broken Build?

2017-06-26 Thread Eric Conner
Ok, these 2 PRs together should fix the build:
https://github.com/apache/thrift/pull/1296
https://github.com/apache/thrift/pull/1295



On Sat, Jun 24, 2017 at 7:04 PM, Eric Conner  wrote:

> Great, I've updated the issue with a PR and some comments.  We can move
> the discussion there.
>
> On Sat, Jun 24, 2017 at 3:05 AM, Jens Geyer  wrote:
>
>> Hi,
>>
>> the ticket describing the issue in more detail is this:
>>
>> https://issues.apache.org/jira/browse/THRIFT-4213
>>
>> There is also a link to the recently auto-closed npm issue.
>>
>> The builds use some docker container infrastructure which one can find in
>> the /builds directory.
>>
>> Appreciating your help!
>>
>> Have fun,
>> JensG
>>
>>
>>
>>
>> -Ursprüngliche Nachricht-
>> From: Eric Conner
>> Sent: Thursday, June 22, 2017 6:49 PM
>> To: dev@thrift.apache.org
>> Subject: Broken Build?
>>
>> Hi all,
>> I am a (potentially) new contributor who is trying to add a patch.  It
>> appears that the build is broken.
>>
>> The first 3 cross language tests fail with
>> [java] Sample TSimpleJSONProtocol output:
>> [java] {}
>> [java] org.apache.thrift.transport.TTransportException:
>> javax.net.ssl.SSLProtocolException: handshake alert:  internal_error
>> ...
>>
>> And the other two failures appear to be caused by missing npm:
>> UBSan...
>> /bin/bash: npm: command not found
>>
>> Java, Lua, Php...
>> /bin/bash: npm: command not found
>>
>> I'd be happy to help try to fix these failures, but I'm not exactly sure
>> how to replicate the build environments locally.  Are there instructions
>> on
>> how to do that?  (I've looked at "make cross" but that doesn't appear to
>> use docker as the build does).
>>
>> Thanks!
>> -Eric
>>
>>
>


[jira] [Commented] (THRIFT-4236) Support context in go generated code.

2017-06-26 Thread taozle (JIRA)

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

taozle commented on THRIFT-4236:


I don't think the {{THeaderTransport}} is what i want.

The {{context}} that i mentioned above is the library {{context}} officially 
accepted in go1.7 which previously located at {{golang.org/x/net/context}}.
Currently, the thrift definition:
{code:java}
service HelloService {
string ping()
}
{code}
will generate code like this:
{code:java}
type HelloService interface {
  Ping() (r string, err error)
}
{code}
other framework like grpc will pass a {{context}} for the first param, so the 
expected output for above definition may looks like:
{code:java}
type HelloService interface {
  Ping(ctx Context) (r string, err error)
}
{code}
Adding the {{context}} we can return immediately if current request is already 
expired:
{code:java}
func (h *HelloHandler) Ping(ctx Context) {
f, cancer := CreateLongTask()
rv = make(chan string)
go f(rv) // long task

select {
case <-ctx.Done():
cancer()
return // Timeout!
case <-rv:
// Another heavy work.
}
}
{code}
or carry extra info like zipkin span for framework level usage.

> Support context in go generated code.
> -
>
> Key: THRIFT-4236
> URL: https://issues.apache.org/jira/browse/THRIFT-4236
> Project: Thrift
>  Issue Type: Improvement
>  Components: Go - Compiler, Go - Library
>Reporter: taozle
>
> Since context is widely used in go's community, and there is lots of 
> advantage to use context such as control timeout, carry extra info in one 
> request etc, so is there any plan for this? i just searched the issues but 
> didn't find anything about this.



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


[jira] [Commented] (THRIFT-4236) Support context in go generated code.

2017-06-26 Thread Jens Geyer (JIRA)

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

Jens Geyer commented on THRIFT-4236:


There is {{THeaderTransport}}, currently only implemented for C++. 

If you want to [contribute a functionally identical version for the Go lib, 
please do|https://thrift.apache.org/docs/HowToContribute]. 
If that is not what you mean by "context", please explain.




> Support context in go generated code.
> -
>
> Key: THRIFT-4236
> URL: https://issues.apache.org/jira/browse/THRIFT-4236
> Project: Thrift
>  Issue Type: Improvement
>  Components: Go - Compiler, Go - Library
>Reporter: taozle
>
> Since context is widely used in go's community, and there is lots of 
> advantage to use context such as control timeout, carry extra info in one 
> request etc, so is there any plan for this? i just searched the issues but 
> didn't find anything about this.



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


[GitHub] thrift pull request #1297: handleRuntimeExceptions

2017-06-26 Thread zhouxianjun
GitHub user zhouxianjun opened a pull request:

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

handleRuntimeExceptions

RT:
thrift command: 0.10.0
thrift java lib: 0.10.0
Method does not override method from its superclass
org.apache.thrift.ProcessFunction is no handleRuntimeExceptions method

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

$ git pull https://github.com/apache/thrift master

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

https://github.com/apache/thrift/pull/1297.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 #1297


commit db3a92ebcffea09fc456bf76754b78fe8466fe59
Author: ciarancourtney 
Date:   2016-12-20T11:12:15Z

THRIFT-4009 Use @implementer instead of implements in TTwisted.py
Client: Python
Patch: ciarancourtney 

This closes #1142

commit 30a8b65dcec88d0710143ca2b94f71915a8549c5
Author: Simon South 
Date:   2016-12-22T11:29:17Z

THRIFT-3968: Deserializing empty string/binary fields
Client: C (GLib)
Patch: Simon South 

Deserialize empty strings as they are instead of returning NULL.
Expand test cases to clarify existing behavior when deserializing empty
binary fields.

commit 366e89ead7df34b4132c2accb59dc14fce564883
Author: Palmer Cox 
Date:   2016-12-22T06:24:33Z

THRIFT-4012 Python Twisted implementation uses implements, not compatible 
with Py3
Client: Python
Patch: Palmer Cox 

This closes #1144

Zope implements doesn't work with Python 3; @implementer does. Replace uses 
of implements with @implementer since the former does not work with Python 3, 
while the latter works with both Python 2 and 3.

commit 19066b75d014487d5ba6731910edd524aac6aaf6
Author: Jens Geyer 
Date:   2016-12-26T10:19:35Z

THRIFT-4014 align C# meta data in AssemblyInfo.cs
Clöient: C#
Patch: Jens Geyer

commit fa133629a265284eeae2bfead4ea2cd6839bf1ff
Author: Jens Geyer 
Date:   2016-12-26T10:27:24Z

THRIFT-4015 Fix wrongly spelled "Thirft"s
Client: Perl + NodeJS
Patch: Jens Geyer

commit 476cf694ee80f6d2d6aaa5e46bbda8f915863a49
Author: Bruno Fonseca 
Date:   2016-12-20T13:19:43Z

THRIFT-4010 Q.fcall messing up with *this* pointer inside called function
Client: js
Patch: Bruno Fonseca

This closes #1143

commit 60ac165aeb6b86ae10bb554b107c273bfcde7a83
Author: Jens Geyer 
Date:   2016-12-28T00:25:10Z

THRIFT-4008 broken ci due to upstream dependency versioning break
Client: Haskell
Patch: Jens Geyer

This closes #1145

commit 540e346d6ec3be9893ff1f29ef89e000c314edf4
Author: Jens Geyer 
Date:   2016-12-28T13:25:41Z

THRIFT-4016 testInsanity() impl does not conform to test spec in 
ThriftTest.thrift
Client: Delphi
Patch: Jens Geyer

commit d8bb0e3b9ff7e6cecfc85c01a81280dc3d046430
Author: Allen George 
Date:   2017-01-02T09:43:37Z

THRIFT-4016 testInsanity() impl does not conform to test spec in 
ThriftTest.thrift
Client: C#
Patch: Allen George 

commit 3c55440230f3645816913d9c53b42dcc16b70f95
Author: Mark Erickson 
Date:   2017-01-04T16:11:06Z

THRIFT-4019: Dart Makefiles should also clean pubspec.lock
Client: Dart
Patch: Mark Erickson 

This closes #1150

commit b587a12a116cc394b62d9af2bbcecd50cfb18ce3
Author: Volodymyr Gotra 
Date:   2016-09-15T00:18:48Z

THRIFT-3933 Microsoft .Net Core library port and generator for this library
Client: .NET Core
Patch: Volodymyr Gotra  PR #1088, with significant 
improvements by Jens Geyer  PR #1149

This closes #1088
This closes #1149

commit fac3f69725f507872e6d68afea5debd020ce2580
Author: James E. King, III 
Date:   2017-01-05T02:46:23Z

fix appveyor builds - ant version changed to 1.9.8

commit 59fab5adb499866ac174d2a8edc3808619b2ed58
Author: czm1989 
Date:   2017-01-09T14:07:42Z

THRIFT-4023 Skip unexpected field types on read/write
Client: Go
Patch: Chen Zhiming 

This closes #1154

commit 1ca09d0e02f0af3f008183974fc4846ce34993b8
Author: Jens Geyer 
Date:   2017-01-10T21:48:09Z

THRIFT-4016 testInsanity() impl does not conform to test spec in 
ThriftTest.thrift
Client: Haxe
Patch: Jens Geyer

commit 4f710aa4f47e051d41c863aa7aa9239dab5b9636
Author: BCG 
Date:   2016-11-04T03:22:35Z

THRIFT-3960 Inherited services in Lua generator are not named correctly