[jira] [Commented] (THRIFT-4676) CL tutorial build fails sporadically

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


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

ASF GitHub Bot commented on THRIFT-4676:


jeking3 closed pull request #1639: THRIFT-4676: Fix intermittent CL build 
failures
URL: https://github.com/apache/thrift/pull/1639
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/.gitignore b/.gitignore
index 0e7eedcd86..b7f7b454bb 100644
--- a/.gitignore
+++ b/.gitignore
@@ -339,8 +339,17 @@ project.lock.json
 /test/rs/target/
 /test/rs/*.iml
 /test/rs/**/*.iml
+/lib/cl/backport-update.zip
+/lib/cl/lib
+/tutorial/cl/quicklisp.lisp
+/tutorial/cl/externals/
+/tutorial/cl/quicklisp/
 /tutorial/cl/TutorialClient
 /tutorial/cl/TutorialServer
+/tutorial/cl/backport-update.zip
+/tutorial/cl/lib/
+/tutorial/cl/shared-implementation.fasl
+/tutorial/cl/tutorial-implementation.fasl
 /tutorial/cpp/TutorialClient
 /tutorial/cpp/TutorialServer
 /tutorial/c_glib/tutorial_client
diff --git a/tutorial/cl/Makefile.am b/tutorial/cl/Makefile.am
index fb6e83a420..2b2013a3c9 100755
--- a/tutorial/cl/Makefile.am
+++ b/tutorial/cl/Makefile.am
@@ -15,19 +15,30 @@
 # KIND, either express or implied. See the License for the
 # specific language governing permissions and limitations
 # under the License.
-#
+
+setup-local-lisp-env: ensure-externals.sh
+   bash ensure-externals.sh
 
 gen-cl: $(top_srcdir)/tutorial/tutorial.thrift
$(THRIFT) --gen cl -r $<
 
-TutorialServer: make-tutorial-server.lisp
-   $(SBCL) --script make-tutorial-server.lisp
+ALL_FILE_PREREQS = \
+  load-locally.lisp \
+  make-tutorial-server.lisp \
+  make-tutorial-client.lisp \
+  shared-implementation.lisp \
+  thrift-tutorial.asd \
+  tutorial-implementation.lisp
 
-TutorialClient: make-tutorial-client.lisp
+# NOTE: the server and client cannot be built in parallel
+# because on loading the make-tutorial-* scripts SBCL will
+# attempt to compile their dependencies. Unfortunately,
+# because their dependencies are shared, parallel jobs can
+# end up overwriting or corrupting the compiled files
+all-local: gen-cl setup-local-lisp-env $(ALL_FILE_PREREQS)
+   $(SBCL) --script make-tutorial-server.lisp
$(SBCL) --script make-tutorial-client.lisp
 
-all-local: gen-cl TutorialClient TutorialServer
-
 tutorialserver: all
./TutorialServer
 
@@ -35,9 +46,16 @@ tutorialclient: all
./TutorialClient
 
 clean-local:
-   $(RM) -r gen-*
-   $(RM) TutorialServer
-   $(RM) TutorialClient
+   -$(RM) -r gen-*
+   -$(RM) -r externals
+   -$(RM) -r quicklisp
+   -$(RM) -r lib
+   -$(RM) quicklisp.lisp
+   -$(RM) backport-update.zip
+   -$(RM) shared-implementation.fasl
+   -$(RM) tutorial-implementation.fasl
+   -$(RM) TutorialServer
+   -$(RM) TutorialClient
 
 EXTRA_DIST = \
tutorial-implementation.lisp \
diff --git a/tutorial/cl/ensure-externals.sh b/tutorial/cl/ensure-externals.sh
new file mode 12
index 00..5ae8c5657c
--- /dev/null
+++ b/tutorial/cl/ensure-externals.sh
@@ -0,0 +1 @@
+../../lib/cl/ensure-externals.sh
\ No newline at end of file
diff --git a/tutorial/cl/load-locally.lisp b/tutorial/cl/load-locally.lisp
new file mode 100644
index 00..b52a0a2698
--- /dev/null
+++ b/tutorial/cl/load-locally.lisp
@@ -0,0 +1,22 @@
+(in-package #:cl-user)
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+ Just a script for loading the library itself, using bundled dependencies.
+ This is an identical copy of the file in lib/cl.
+
+(require "asdf")
+
+(load (merge-pathnames "externals/bundle.lisp" *load-truename*))
+(asdf:load-asd (merge-pathnames 
"lib/de.setf.thrift-backport-update/thrift.asd" *load-truename*))
+(asdf:load-system :thrift)
diff --git a/tutorial/cl/make-tutorial-client.lisp 
b/tutorial/cl/make-tutorial-client.lisp
index 59450a2eae..3a6d86134f 100644
--- a/tutorial/cl/make-tutorial-client.lisp
+++ b/tutorial/cl/make-tutorial-client.lisp
@@ -13,7 +13,7 @@
  limitations under the License.
 
 (require "asdf")
-(load (merg

[jira] [Commented] (THRIFT-4656) infinite loop in latest PHP library

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


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

ASF GitHub Bot commented on THRIFT-4656:


jeking3 closed pull request #1618: THRIFT-4656: Fix infinite loop in PHP 
TCurlClient
URL: https://github.com/apache/thrift/pull/1618
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/lib/php/lib/Transport/TCurlClient.php 
b/lib/php/lib/Transport/TCurlClient.php
index 3d4908d901..482b43b72c 100644
--- a/lib/php/lib/Transport/TCurlClient.php
+++ b/lib/php/lib/Transport/TCurlClient.php
@@ -169,6 +169,24 @@ public function read($len)
 }
 }
 
+/**
+ * Guarantees that the full amount of data is read. Since TCurlClient gets 
entire payload at
+ * once, parent readAll cannot be used.
+ *
+ * @return string The data, of exact length
+ * @throws TTransportException if cannot read data
+ */
+public function readAll($len)
+{
+$data = $this->read($len);
+
+if (TStringFuncFactory::create()->strlen($data) !== $len) {
+throw new TTransportException('TCurlClient could not read '.$len.' 
bytes');
+}
+
+return $data;
+}
+
 /**
  * Writes some data into the pending buffer
  *


 


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> infinite loop in latest PHP library
> ---
>
> Key: THRIFT-4656
> URL: https://issues.apache.org/jira/browse/THRIFT-4656
> Project: Thrift
>  Issue Type: Bug
>  Components: PHP - Library
>Reporter: Josip Sokcevic
>Priority: Major
> Fix For: 0.12.0
>
> Attachments: 
> 0001-THRIFT-4656-Fix-infinite-loop-in-PHP-TCurlClient.patch
>
>
> The latest PHP library can enter into infinite loop state when specific 
> payload is returned:
> HTTP status: 200
> Response body: 
>  
> It was introduced with THRIFT-4645, where check was replaced from
> {code:java}
> !$this->response_{code}
> to
> {code:java}
> $this->response_ === false{code}



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


[jira] [Resolved] (THRIFT-4676) CL tutorial build fails sporadically

2018-12-05 Thread James E. King III (JIRA)


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

James E. King III resolved THRIFT-4676.
---
   Resolution: Fixed
Fix Version/s: 1.0

> CL tutorial build fails sporadically
> 
>
> Key: THRIFT-4676
> URL: https://issues.apache.org/jira/browse/THRIFT-4676
> Project: Thrift
>  Issue Type: Task
>  Components: Build Process
>Reporter: Allen George
>Assignee: Allen George
>Priority: Minor
> Fix For: 1.0
>
>
> Many of the CI failures are caused by the CL tutorial build failing. This 
> isn't because the CL code is wrong, it's simply because of a race condition 
> _somewhere_.



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


[jira] [Updated] (THRIFT-4656) infinite loop in latest PHP library

2018-12-05 Thread James E. King III (JIRA)


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

James E. King III updated THRIFT-4656:
--
Affects Version/s: 0.12.0

> infinite loop in latest PHP library
> ---
>
> Key: THRIFT-4656
> URL: https://issues.apache.org/jira/browse/THRIFT-4656
> Project: Thrift
>  Issue Type: Bug
>  Components: PHP - Library
>Affects Versions: 0.12.0
>Reporter: Josip Sokcevic
>Assignee: James E. King III
>Priority: Major
> Fix For: 1.0
>
> Attachments: 
> 0001-THRIFT-4656-Fix-infinite-loop-in-PHP-TCurlClient.patch
>
>
> The latest PHP library can enter into infinite loop state when specific 
> payload is returned:
> HTTP status: 200
> Response body: 
>  
> It was introduced with THRIFT-4645, where check was replaced from
> {code:java}
> !$this->response_{code}
> to
> {code:java}
> $this->response_ === false{code}



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


[jira] [Resolved] (THRIFT-4656) infinite loop in latest PHP library

2018-12-05 Thread James E. King III (JIRA)


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

James E. King III resolved THRIFT-4656.
---
   Resolution: Fixed
 Assignee: James E. King III
Fix Version/s: (was: 0.12.0)
   1.0

Committed - thanks.

> infinite loop in latest PHP library
> ---
>
> Key: THRIFT-4656
> URL: https://issues.apache.org/jira/browse/THRIFT-4656
> Project: Thrift
>  Issue Type: Bug
>  Components: PHP - Library
>Affects Versions: 0.12.0
>Reporter: Josip Sokcevic
>Assignee: James E. King III
>Priority: Major
> Fix For: 1.0
>
> Attachments: 
> 0001-THRIFT-4656-Fix-infinite-loop-in-PHP-TCurlClient.patch
>
>
> The latest PHP library can enter into infinite loop state when specific 
> payload is returned:
> HTTP status: 200
> Response body: 
>  
> It was introduced with THRIFT-4645, where check was replaced from
> {code:java}
> !$this->response_{code}
> to
> {code:java}
> $this->response_ === false{code}



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


[jira] [Commented] (THRIFT-4656) infinite loop in latest PHP library

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


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

ASF GitHub Bot commented on THRIFT-4656:


sokac commented on issue #1618: THRIFT-4656: Fix infinite loop in PHP 
TCurlClient
URL: https://github.com/apache/thrift/pull/1618#issuecomment-44465
 
 
   @jeking3 sorry for spamming. Have you had time to review? I'd be great if we 
can get this out in v0.12 as current `master` has issue with infinite loop and 
0.11 doesn't have.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> infinite loop in latest PHP library
> ---
>
> Key: THRIFT-4656
> URL: https://issues.apache.org/jira/browse/THRIFT-4656
> Project: Thrift
>  Issue Type: Bug
>  Components: PHP - Library
>Reporter: Josip Sokcevic
>Priority: Major
> Fix For: 0.12.0
>
> Attachments: 
> 0001-THRIFT-4656-Fix-infinite-loop-in-PHP-TCurlClient.patch
>
>
> The latest PHP library can enter into infinite loop state when specific 
> payload is returned:
> HTTP status: 200
> Response body: 
>  
> It was introduced with THRIFT-4645, where check was replaced from
> {code:java}
> !$this->response_{code}
> to
> {code:java}
> $this->response_ === false{code}



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


[jira] [Commented] (THRIFT-4676) CL tutorial build fails sporadically

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


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

ASF GitHub Bot commented on THRIFT-4676:


allengeorge commented on issue #1639: THRIFT-4676: Fix intermittent CL build 
failures
URL: https://github.com/apache/thrift/pull/1639#issuecomment-444602420
 
 
   Yeap. If Tomek would like me to make changes I’m happy to do it in a 
follow-up PR. The changes as they exist will do the trick for the builds.
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> CL tutorial build fails sporadically
> 
>
> Key: THRIFT-4676
> URL: https://issues.apache.org/jira/browse/THRIFT-4676
> Project: Thrift
>  Issue Type: Task
>  Components: Build Process
>Reporter: Allen George
>Assignee: Allen George
>Priority: Minor
>
> Many of the CI failures are caused by the CL tutorial build failing. This 
> isn't because the CL code is wrong, it's simply because of a race condition 
> _somewhere_.



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


Re: [jira] [Commented] (THRIFT-4676) CL tutorial build fails sporadically

2018-12-05 Thread Allen George
Yeah - I think so. If Tomek sees improvements that can be made I can always add 
them in a subsequent PR. I know these changes will fix the problem though.


[jira] [Commented] (THRIFT-4676) CL tutorial build fails sporadically

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


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

ASF GitHub Bot commented on THRIFT-4676:


jeking3 commented on issue #1639: THRIFT-4676: Fix intermittent CL build 
failures
URL: https://github.com/apache/thrift/pull/1639#issuecomment-444600778
 
 
   Shall I merge?


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> CL tutorial build fails sporadically
> 
>
> Key: THRIFT-4676
> URL: https://issues.apache.org/jira/browse/THRIFT-4676
> Project: Thrift
>  Issue Type: Task
>  Components: Build Process
>Reporter: Allen George
>Assignee: Allen George
>Priority: Minor
>
> Many of the CI failures are caused by the CL tutorial build failing. This 
> isn't because the CL code is wrong, it's simply because of a race condition 
> _somewhere_.



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