You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@openwhisk.apache.org by GitBox <gi...@apache.org> on 2020/08/17 09:59:12 UTC

[GitHub] [openwhisk-runtime-go] sciabarracom opened a new pull request #128: Go 13 14 support [do-not-merge yet]

sciabarracom opened a new pull request #128:
URL: https://github.com/apache/openwhisk-runtime-go/pull/128


   This PR includes support for Go 1.13 and 1.14 including many other improvements.
   And supports Go Modules.
   
   It should be functional, you can test it  but do not merge until I updated examples and documentation and removed older runtimes.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [openwhisk-runtime-go] sciabarracom commented on pull request #128: Go 1.13 1.14 and 1.15 support with modules, updated examples and documentation.

Posted by GitBox <gi...@apache.org>.
sciabarracom commented on pull request #128:
URL: https://github.com/apache/openwhisk-runtime-go/pull/128#issuecomment-680094694


   I actually the runtimes are ready  with a PR pending. There is still one test failing because tests does not include a proper go.mod but it is fault of the tests not of the runtime. Will fix the test, leaving 1.13 and 1.15. I was asking in order to complete the PR.
   
   
   -- 
     Michele Sciabarra
     michele@sciabarra.com
   
   
   
   ----- Original message -----
   From: Matt Rutkowski <no...@github.com>
   To: apache/openwhisk-runtime-go <op...@noreply.github.com>
   Cc: Michele Sciabarra <sc...@sciabarra.com>, Mention <me...@noreply.github.com>
   Subject: Re: [apache/openwhisk-runtime-go] Go 1.13 1.14 and 1.15 support with modules, updated examples and documentation. (#128)
   Date: Tuesday, August 25, 2020 5:08 PM
   
   
   
   Had not formulated an opinion on 1.13 strongly until now; however, with
   1.15 being so new and 1.14 being skipped, the 1.13 revisions do include 
   some interesting and sig. fixes and additions including many security and 
   crypto fixes. Could see some demand the 1.13 runtimes in addition as my 
   view it is the last stable minor revision that still includes support for 
   older CPUs and 32-bit as well. 
   
   If it were me, I would mint a 1.13.15 runtime and then work on 1.15.x and 
   if someone wants a 1.14 for some reason they can add it. 
   
   
   
   
   From: Michele Sciabarra <no...@github.com> 
   To: apache/openwhisk-runtime-go 
   <op...@noreply.github.com> 
   Cc: Matt Rutkowski <mr...@us.ibm.com>, Comment 
   <co...@noreply.github.com> 
   Date: 08/25/2020 09:03 AM 
   Subject: [EXTERNAL] Re: [apache/openwhisk-runtime-go] Go 1.13 1.14 
   and 1.15 support with modules, updated examples and documentation. (#128) 
   
   
   
   I was asking if we have to keep 1.13 
   
   -- 
   Michele Sciabarra 
   github@sciabarra.com 
   
   
   
   ----- Original message ----- 
   From: Matt Rutkowski <no...@github.com> 
   To: apache/openwhisk-runtime-go <op...@noreply.github.com> 
   Cc: Michele Sciabarra <gi...@sciabarra.com>, Mention 
   <me...@noreply.github.com> 
   Subject: Re: [apache/openwhisk-runtime-go] Go 1.13 1.14 and 1.15 support 
   with modules, updated examples and documentation. (#128) 
   Date: Tuesday, August 25, 2020 3:28 PM 
   
   
   
   Hi Michele, 
   
   You must have missed the comment I made previously above the one you 
   copied below. It reads: 
   
   "@sciabarracom I have been warned away from using go 1.14.x in any 
   production setting due to EINTR issues... the advice is to skip from 1.13 
   to 1.15 (where the comm. addressed regressions in sys libs.) which 
   thankfully was just released a couple of weeks ago." 
   
   
   
   
   From: Michele Sciabarra <no...@github.com> 
   To: apache/openwhisk-runtime-go 
   <op...@noreply.github.com> 
   Cc: Matt Rutkowski <mr...@us.ibm.com>, Comment 
   <co...@noreply.github.com> 
   Date: 08/25/2020 02:42 AM 
   Subject: [EXTERNAL] Re: [apache/openwhisk-runtime-go] Go 1.13 1.14 
   and 1.15 support with modules, updated examples and documentation. (#128) 
   
   
   
   Yes but what we do? Do we get rid of all the runtimes older than 1.15? Or 
   just skip 1.14? 
   
   -- 
   Michele Sciabarra 
   michele@sciabarra.com 
   
   
   
   ----- Original message ----- 
   From: Matt Rutkowski <no...@github.com> 
   To: apache/openwhisk-runtime-go <op...@noreply.github.com> 
   Cc: Michele Sciabarra <sc...@sciabarra.com>, Mention 
   <me...@noreply.github.com> 
   Subject: Re: [apache/openwhisk-runtime-go] Go 1.13 1.14 and 1.15 support 
   with modules, updated examples and documentation. (#128) 
   Date: Monday, August 24, 2020 11:57 PM 
   
   
   
   
   @sciabarra <https://github.com/sciabarra> The issue is ack'ed in the 1.14 
   release notes: 
   https://golang.org/doc/go1.14 
   
   
   Specifically: 
   "Goroutines are now asynchronously preemptible. As a result, loops without 
   
   function calls no longer potentially deadlock the scheduler or 
   significantly delay garbage collection. This is supported on all platforms 
   
   except windows/arm, darwin/arm, js/wasm, and plan9/*. 
   
   A consequence of the implementation of preemption is that on Unix systems, 
   
   including Linux and macOS systems, programs built with Go 1.14 will 
   receive more signals than programs built with earlier releases. This means 
   
   that programs that use packages like syscall or golang.org/x/sys/unix will 
   
   see more slow system calls fail with EINTR errors. Those programs will 
   have to handle those errors in some way, most likely looping to try the 
   system call again. For more information about this see man 7 signal for 
   Linux systems or similar documentation for other systems. " 
   
   Under production loads, many sys. level calls will fail because they are 
   not coded to be interrupt tolerant (i.e., code their own retries on 
   failure) resulting higher order errors. 
   
   
   — 
   You are receiving this because you were mentioned. 
   Reply to this email directly, view it on GitHub < 
   https://github.com/apache/openwhisk-runtime-go/pull/128#issuecomment-679387166> 
   
   , or unsubscribe < 
   https://github.com/notifications/unsubscribe-auth/AHJ4D3YETUV4QDCLRX7BI43SCLO35ANCNFSM4QBO6K2A> 
   
   . 
   
   — 
   You are receiving this because you commented. 
   Reply to this email directly, view it on GitHub, or unsubscribe. 
   
   
   
   
   
   — 
   You are receiving this because you were mentioned. 
   Reply to this email directly, view it on GitHub < 
   https://github.com/apache/openwhisk-runtime-go/pull/128#issuecomment-680025019> 
   , or unsubscribe < 
   https://github.com/notifications/unsubscribe-auth/AAEEPCJR5HK6MJ2AYFOQBUTSCO4ANANCNFSM4QBO6K2A> 
   . 
   
   — 
   You are receiving this because you commented. 
   Reply to this email directly, view it on GitHub, or unsubscribe. 
   
   
   
   
   
   —
   You are receiving this because you were mentioned.
   Reply to this email directly, view it on GitHub <https://github.com/apache/openwhisk-runtime-go/pull/128#issuecomment-680083829>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AHJ4D33PNXWYH22FDY3XYNDSCPHVDANCNFSM4QBO6K2A>.
   
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [openwhisk-runtime-go] mrutkows commented on pull request #128: Go 1.13 1.14 and 1.15 support with modules, updated examples and documentation.

Posted by GitBox <gi...@apache.org>.
mrutkows commented on pull request #128:
URL: https://github.com/apache/openwhisk-runtime-go/pull/128#issuecomment-680025019


   Hi Michele,
   
   You must have missed the comment I made previously above the one you 
   copied below.  It reads:
   
   "@sciabarracom I have been warned away from using go 1.14.x in any 
   production setting due to EINTR issues... the advice is to skip from 1.13 
   to 1.15 (where the comm. addressed regressions in sys libs.) which 
   thankfully was just released a couple of weeks ago."
   
   
   
   
   From:   Michele Sciabarra <no...@github.com>
   To:     apache/openwhisk-runtime-go 
   <op...@noreply.github.com>
   Cc:     Matt Rutkowski <mr...@us.ibm.com>, Comment 
   <co...@noreply.github.com>
   Date:   08/25/2020 02:42 AM
   Subject:        [EXTERNAL] Re: [apache/openwhisk-runtime-go] Go 1.13 1.14 
   and 1.15 support with modules, updated examples and documentation. (#128)
   
   
   
   Yes but what we do? Do we get rid of all the runtimes older than 1.15? Or 
   just skip 1.14? 
   
   -- 
   Michele Sciabarra
   michele@sciabarra.com
   
   
   
   ----- Original message -----
   From: Matt Rutkowski <no...@github.com>
   To: apache/openwhisk-runtime-go <op...@noreply.github.com>
   Cc: Michele Sciabarra <sc...@sciabarra.com>, Mention 
   <me...@noreply.github.com>
   Subject: Re: [apache/openwhisk-runtime-go] Go 1.13 1.14 and 1.15 support 
   with modules, updated examples and documentation. (#128)
   Date: Monday, August 24, 2020 11:57 PM
   
   
   
   
   @sciabarra <https://github.com/sciabarra> The issue is ack'ed in the 1.14 
   release notes:
   https://golang.org/doc/go1.14
   
   
   Specifically:
   "Goroutines are now asynchronously preemptible. As a result, loops without 
   function calls no longer potentially deadlock the scheduler or 
   significantly delay garbage collection. This is supported on all platforms 
   except windows/arm, darwin/arm, js/wasm, and plan9/*.
   
   A consequence of the implementation of preemption is that on Unix systems, 
   including Linux and macOS systems, programs built with Go 1.14 will 
   receive more signals than programs built with earlier releases. This means 
   that programs that use packages like syscall or golang.org/x/sys/unix will 
   see more slow system calls fail with EINTR errors. Those programs will 
   have to handle those errors in some way, most likely looping to try the 
   system call again. For more information about this see man 7 signal for 
   Linux systems or similar documentation for other systems. "
   
   Under production loads, many sys. level calls will fail because they are 
   not coded to be interrupt tolerant (i.e., code their own retries on 
   failure) resulting higher order errors.
   
   
   —
   You are receiving this because you were mentioned.
   Reply to this email directly, view it on GitHub <
   https://github.com/apache/openwhisk-runtime-go/pull/128#issuecomment-679387166>
   , or unsubscribe <
   https://github.com/notifications/unsubscribe-auth/AHJ4D3YETUV4QDCLRX7BI43SCLO35ANCNFSM4QBO6K2A>
   .
   
   —
   You are receiving this because you commented.
   Reply to this email directly, view it on GitHub, or unsubscribe.
   
   
   
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [openwhisk-runtime-go] rabbah commented on a change in pull request #128: Go 1.13 1.14 and 1.15 support with modules, updated examples and documentation.

Posted by GitBox <gi...@apache.org>.
rabbah commented on a change in pull request #128:
URL: https://github.com/apache/openwhisk-runtime-go/pull/128#discussion_r475270396



##########
File path: CHANGES.md
##########
@@ -16,7 +16,10 @@
 # limitations under the License.
 #
 -->
-# 1.16.0 (next release)
+# 1.16.0

Review comment:
       ```suggestion
   # 1.16.0 (next release)
   ```




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [openwhisk-runtime-go] sciabarracom commented on a change in pull request #128: Go 1.13 1.14 and 1.15 support with modules, updated examples and documentation.

Posted by GitBox <gi...@apache.org>.
sciabarracom commented on a change in pull request #128:
URL: https://github.com/apache/openwhisk-runtime-go/pull/128#discussion_r475495069



##########
File path: golang1.14/Dockerfile
##########
@@ -14,27 +14,28 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 #
-
-IMG?=whisk/action-golang-v1.11
-IMG2?=whisk/actionloop
-
-all: golang bash
-
-test.lua:
-	echo 'wrk.method = "POST"'>test.lua
-	echo "wrk.body = '{\"value\":{\"name\":\"Mike\"}}'">>test.lua
-	echo 'wrk.headers["Content-Type"] = "application/json"'>>test.lua
-
-golang: test.lua
-	docker run -d --name under-test --rm -p 8080:8080 $(IMG)
-	bash init.sh main.go
-	wrk -t1 -c1 -stest.lua http://localhost:8080/run
-	docker kill under-test
-
-bash: test.lua
-	docker run -d --name under-test --rm -p 8080:8080 $(IMG2)
-	bash init.sh main.sh
-	wrk -t1 -c1 -stest.lua http://localhost:8080/run
-	docker kill under-test
-
-.PHONY: all golang bash
+FROM golang:1.13.8

Review comment:
       ouch! How I did miss this? basically all the update is a lie then :)




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [openwhisk-runtime-go] sciabarracom commented on pull request #128: Go 1.13 and 1.14 support with modules! Also updated examples and documentation.

Posted by GitBox <gi...@apache.org>.
sciabarracom commented on pull request #128:
URL: https://github.com/apache/openwhisk-runtime-go/pull/128#issuecomment-678635357


   Added go 1.15 too


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [openwhisk-runtime-go] sciabarracom merged pull request #128: Go 1.13 and 1.15 support with modules, updated examples and documentation (despite the branch name mentioning 1.14)

Posted by GitBox <gi...@apache.org>.
sciabarracom merged pull request #128:
URL: https://github.com/apache/openwhisk-runtime-go/pull/128


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [openwhisk-runtime-go] mrutkows commented on pull request #128: Go 1.13 1.14 and 1.15 support with modules, updated examples and documentation.

Posted by GitBox <gi...@apache.org>.
mrutkows commented on pull request #128:
URL: https://github.com/apache/openwhisk-runtime-go/pull/128#issuecomment-679387166


   @sciabarra The issue is ack'ed in the 1.14 release notes:
   https://golang.org/doc/go1.14
   
   Specifically:
   "Goroutines are now asynchronously preemptible. As a result, loops without function calls no longer potentially deadlock the scheduler or significantly delay garbage collection. This is supported on all platforms except windows/arm, darwin/arm, js/wasm, and plan9/*.
   
   A consequence of the implementation of preemption is that on Unix systems, including Linux and macOS systems, programs built with Go 1.14 will receive more signals than programs built with earlier releases. This means that programs that use packages like syscall or golang.org/x/sys/unix will see more slow system calls fail with EINTR errors. Those programs will have to handle those errors in some way, most likely looping to try the system call again. For more information about this see man 7 signal for Linux systems or similar documentation for other systems. "
   
   Under production loads, many sys. level calls will fail because they are not coded to be interrupt tolerant (i.e., code their own retries on failure) resulting higher order errors.  


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [openwhisk-runtime-go] mrutkows commented on pull request #128: Go 1.13 and 1.14 support with modules! Also updated examples and documentation.

Posted by GitBox <gi...@apache.org>.
mrutkows commented on pull request #128:
URL: https://github.com/apache/openwhisk-runtime-go/pull/128#issuecomment-678410832


   > i guess very little... will add it tomorrow
   
   Yes, despite updating wskdeploy and CLI to 1.14, we want to move quickly to 1.15 to avoid any issues with EINTR problems...
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [openwhisk-runtime-go] sciabarra commented on pull request #128: Go 1.13 1.14 and 1.15 support with modules, updated examples and documentation.

Posted by GitBox <gi...@apache.org>.
sciabarra commented on pull request #128:
URL: https://github.com/apache/openwhisk-runtime-go/pull/128#issuecomment-680045100


   I was asking if we have to keep 1.13
   
   -- 
     Michele Sciabarra
     github@sciabarra.com
   
   
   
   ----- Original message -----
   From: Matt Rutkowski <no...@github.com>
   To: apache/openwhisk-runtime-go <op...@noreply.github.com>
   Cc: Michele Sciabarra <gi...@sciabarra.com>, Mention <me...@noreply.github.com>
   Subject: Re: [apache/openwhisk-runtime-go] Go 1.13 1.14 and 1.15 support with modules, updated examples and documentation. (#128)
   Date: Tuesday, August 25, 2020 3:28 PM
   
   
   
   Hi Michele,
   
   You must have missed the comment I made previously above the one you 
   copied below. It reads: 
   
   "@sciabarracom I have been warned away from using go 1.14.x in any 
   production setting due to EINTR issues... the advice is to skip from 1.13 
   to 1.15 (where the comm. addressed regressions in sys libs.) which 
   thankfully was just released a couple of weeks ago." 
   
   
   
   
   From: Michele Sciabarra <no...@github.com> 
   To: apache/openwhisk-runtime-go 
   <op...@noreply.github.com> 
   Cc: Matt Rutkowski <mr...@us.ibm.com>, Comment 
   <co...@noreply.github.com> 
   Date: 08/25/2020 02:42 AM 
   Subject: [EXTERNAL] Re: [apache/openwhisk-runtime-go] Go 1.13 1.14 
   and 1.15 support with modules, updated examples and documentation. (#128) 
   
   
   
   Yes but what we do? Do we get rid of all the runtimes older than 1.15? Or 
   just skip 1.14? 
   
   -- 
   Michele Sciabarra 
   michele@sciabarra.com 
   
   
   
   ----- Original message ----- 
   From: Matt Rutkowski <no...@github.com> 
   To: apache/openwhisk-runtime-go <op...@noreply.github.com> 
   Cc: Michele Sciabarra <sc...@sciabarra.com>, Mention 
   <me...@noreply.github.com> 
   Subject: Re: [apache/openwhisk-runtime-go] Go 1.13 1.14 and 1.15 support 
   with modules, updated examples and documentation. (#128) 
   Date: Monday, August 24, 2020 11:57 PM 
   
   
   
   
   @sciabarra <https://github.com/sciabarra> The issue is ack'ed in the 1.14 
   release notes: 
   https://golang.org/doc/go1.14 
   
   
   Specifically: 
   "Goroutines are now asynchronously preemptible. As a result, loops without 
   function calls no longer potentially deadlock the scheduler or 
   significantly delay garbage collection. This is supported on all platforms 
   except windows/arm, darwin/arm, js/wasm, and plan9/*. 
   
   A consequence of the implementation of preemption is that on Unix systems, 
   including Linux and macOS systems, programs built with Go 1.14 will 
   receive more signals than programs built with earlier releases. This means 
   that programs that use packages like syscall or golang.org/x/sys/unix will 
   see more slow system calls fail with EINTR errors. Those programs will 
   have to handle those errors in some way, most likely looping to try the 
   system call again. For more information about this see man 7 signal for 
   Linux systems or similar documentation for other systems. " 
   
   Under production loads, many sys. level calls will fail because they are 
   not coded to be interrupt tolerant (i.e., code their own retries on 
   failure) resulting higher order errors. 
   
   
   — 
   You are receiving this because you were mentioned. 
   Reply to this email directly, view it on GitHub < 
   https://github.com/apache/openwhisk-runtime-go/pull/128#issuecomment-679387166> 
   , or unsubscribe < 
   https://github.com/notifications/unsubscribe-auth/AHJ4D3YETUV4QDCLRX7BI43SCLO35ANCNFSM4QBO6K2A> 
   . 
   
   — 
   You are receiving this because you commented. 
   Reply to this email directly, view it on GitHub, or unsubscribe. 
   
   
   
   
   
   —
   You are receiving this because you were mentioned.
   Reply to this email directly, view it on GitHub <https://github.com/apache/openwhisk-runtime-go/pull/128#issuecomment-680025019>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AAEEPCJR5HK6MJ2AYFOQBUTSCO4ANANCNFSM4QBO6K2A>.
   
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [openwhisk-runtime-go] style95 commented on a change in pull request #128: Go 1.13 1.14 and 1.15 support with modules, updated examples and documentation.

Posted by GitBox <gi...@apache.org>.
style95 commented on a change in pull request #128:
URL: https://github.com/apache/openwhisk-runtime-go/pull/128#discussion_r475300773



##########
File path: examples/module-main/go.mod
##########
@@ -0,0 +1,5 @@
+module action
+
+go 1.14

Review comment:
       a nit

##########
File path: docs/BUILD.md
##########
@@ -43,10 +43,11 @@ To build the docker images, after compiling go proxy:
 
 This will build the images:
 
-* `action-golang-v1.11`: an image supporting  Go sources
-* `actionloop`: the base image, supporting generic executables ans shell script
+* `action-golang-v1.13`: an image supporting Go 1.13 sources (does expect an ack)
+* `action-golang-v1.14`: an image supporting Go 1.14 sources (does expect an ack)

Review comment:
       Should we mention v1.15 as well?

##########
File path: docs/ACTION.md
##########
@@ -22,7 +22,7 @@
 
 ## How to write Go Actions
 
-The `action-golang-v1.11` runtime can execute actions written in the Go programming language in OpenWhisk, either precompiled binary or compiling sources on the fly.
+The `action-golang-v1.14` runtime can execute actions written in the Go programming language in OpenWhisk, either precompiled binary or compiling sources on the fly.

Review comment:
       Would it be better to change this to v1.15?

##########
File path: examples/package-main/hello/go.mod
##########
@@ -0,0 +1,3 @@
+module hello
+
+go 1.14

Review comment:
       a nit

##########
File path: examples/EXAMPLES.md
##########
@@ -22,29 +22,24 @@
 This is a collection of examples.
 Tested on:
 
-- dep version 0.5.0 (check the version `dep version`)
-- Go version 1.11.1
+- Go version 1.14.6

Review comment:
       a nit

##########
File path: examples/package-main/go.mod
##########
@@ -0,0 +1,7 @@
+module action
+
+go 1.14

Review comment:
       a nit

##########
File path: docs/DEPLOY.md
##########
@@ -49,120 +49,41 @@ The runtime `action-golang-v1.11` accepts:
 
 Please note in the separate the rules about the name of the main function (that defaults to `main.Main`), and the rules about how to overwrite the `main.main`.
 
-## Using packages and vendor folder
+## Using packages and modules
 
 When you deploy a zip file, you can:
 
 - have all your functions in the `main` package
 - have some functions placed in some packages, like `hello`
 - have some third party dependencies you want to include in your sources
 
-If all your functions are in the main package, just place all your sources in the top level of your zip file
+You can manage those dependencies using appropriate `go.mod` files using relative and absolute references.
 
-### Use a package folder
-
-If some functions belong to a package, like `hello/`, you need to be careful with the layout of your source. The layout supported is the following:
-
-```
-golang-main-package/
-├── Makefile
-└── src
-    ├── hello
-    │   ├── hello.go
-    │   └── hello_test.go
-    └── main.go
-```
-
-You need to use a `src` folder, place the sources that belongs to the main package in the `src` and place sources of your package in the `src/hello` folder.
-
-Then you should import it your subpackage with `import "hello"`.
-Note that this means if you want to compile locally you have to set your GOPATH to parent directory of your `src` packages. Check below for using [VcCode](#vscode) as an editor with this setup.
-
-When you send the image you will have to zip the content
-
-Check the example `golang-main-package` and the associated `Makefile` for an example including also how to deploy and precompile your sources.
-
-### Using vendor folders
-
-When you need to use third part libraries, the runtime does not download them from Internet. You have to provide them,  downloading and placing them using the `vendor` folder mechanism. We are going to show here how to use the vendor folder with the `dep` tool.
-
-*NOTE* the `vendor` folder does not work at the top level, you have to use a `src` folder and a package folder to have also the vendor folder.
-
-If you want for example use the library `github.com/sirupsen/logrus` to manage your logs (a widely used drop-in replacement for the standard `log` package), you have to include it in your source code *in a sub package*.
-
-For example consider you have in the file `src/hello/hello.go` the import:
-
-```go
-import "github.com/sirupsen/logrus"
-```
-
-To create a vendor folder, you need to
-
-- install the [dep](https://github.com/golang/dep) tool
-- cd to the `src/hello` folder (*not* the `src` folder)
-- run `GOPATH=$PWD/../.. dep init` the first time (it will create 2 manifest files `Gopkg.lock` and `Gopkg.toml`) or `dep ensure` if you already have the manifest files.
-
-The layout will be something like this:
+For example you can use a local package `hello` with:
 
 ```
-golang-hello-vendor
-├── Makefile
-└── src
-    ├── hello
-    │   ├── Gopkg.lock
-    │   ├── Gopkg.toml
-    │   ├── hello.go
-    │   ├── hello_test.go
-    │   └── vendor
-    │       ├── github.com/...
-    │       └── golang.org/...
-    └── hello.go
+replace hello => ./hello
 ```
 
-Check the example `golang-hello-vendor`.
-
-Note you do not need to store the `vendor` folder in the version control system as it can be regenerated (only the manifest files), but you need to include the entire vendor folder when you deploy the action.
-
-If you need to use vendor folder in the main package, you need to create a directory `main` and place all the source code that would normally go in the top level, in the `main` folder instead.  A vendor folder in the top level *does not work*.
-
-<a name="vscode">
-
-### Using VsCode
-
-If you are using [VsCode](https://code.visualstudio.com/) as your Go development environment with the [VsCode Go](https://marketplace.visualstudio.com/items?itemName=ms-vscode.Go) support, and you want to get rid of errors and have it working properly, you need to configure it to support the suggested:
-
-- you need to have a `src` folder in your source
-- you need either to open the `src` folder as the top level source or add it as a folder in the workspace (not just have it as a subfolder)
-- you need to enable the option `go.inferGopath`
-
-Using this option, the GOPATH will be set to the parent directory of your `src` folder and you will not have errors in your imports.
+Check the example: `package-main` and `module-main` and look for the format of the `go.mod` files.
 
 <a name="precompile"/>
-
 ## Precompiling Go Sources Offline
 
-Compiling sources on the image can take some time when the images is initialized. You can speed up precompiling the sources using the image `action-golang-v1.11` as an offline compiler. You need `docker` for doing that.
+Compiling sources on the image can take some time when the images is initialized. You can speed up precompiling the sources using the image `action-golang-v1.14` as an offline compiler. You need `docker` for doing that.

Review comment:
       Same with above.

##########
File path: golang1.14/Dockerfile
##########
@@ -14,27 +14,28 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 #
-
-IMG?=whisk/action-golang-v1.11
-IMG2?=whisk/actionloop
-
-all: golang bash
-
-test.lua:
-	echo 'wrk.method = "POST"'>test.lua
-	echo "wrk.body = '{\"value\":{\"name\":\"Mike\"}}'">>test.lua
-	echo 'wrk.headers["Content-Type"] = "application/json"'>>test.lua
-
-golang: test.lua
-	docker run -d --name under-test --rm -p 8080:8080 $(IMG)
-	bash init.sh main.go
-	wrk -t1 -c1 -stest.lua http://localhost:8080/run
-	docker kill under-test
-
-bash: test.lua
-	docker run -d --name under-test --rm -p 8080:8080 $(IMG2)
-	bash init.sh main.sh
-	wrk -t1 -c1 -stest.lua http://localhost:8080/run
-	docker kill under-test
-
-.PHONY: all golang bash
+FROM golang:1.13.8

Review comment:
       Should this be some 1.14.x version?




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [openwhisk-runtime-go] mrutkows commented on pull request #128: Go 1.13 1.14 and 1.15 support with modules, updated examples and documentation.

Posted by GitBox <gi...@apache.org>.
mrutkows commented on pull request #128:
URL: https://github.com/apache/openwhisk-runtime-go/pull/128#issuecomment-680083829


   Had not formulated an opinion on 1.13 strongly until now; however, with 
   1.15 being so new and 1.14 being skipped, the 1.13 revisions do include 
   some interesting and sig. fixes and additions including many security and 
   crypto fixes.  Could see some demand the 1.13 runtimes in addition as my 
   view it is the last stable minor revision that still includes support for 
   older CPUs and 32-bit as well. 
   
   If it were me, I would mint a 1.13.15 runtime and then work on 1.15.x and 
   if someone wants a 1.14 for some reason they can add it.
   
   
   
   
   From:   Michele Sciabarra <no...@github.com>
   To:     apache/openwhisk-runtime-go 
   <op...@noreply.github.com>
   Cc:     Matt Rutkowski <mr...@us.ibm.com>, Comment 
   <co...@noreply.github.com>
   Date:   08/25/2020 09:03 AM
   Subject:        [EXTERNAL] Re: [apache/openwhisk-runtime-go] Go 1.13 1.14 
   and 1.15 support with modules, updated examples and documentation. (#128)
   
   
   
   I was asking if we have to keep 1.13
   
   -- 
   Michele Sciabarra
   github@sciabarra.com
   
   
   
   ----- Original message -----
   From: Matt Rutkowski <no...@github.com>
   To: apache/openwhisk-runtime-go <op...@noreply.github.com>
   Cc: Michele Sciabarra <gi...@sciabarra.com>, Mention 
   <me...@noreply.github.com>
   Subject: Re: [apache/openwhisk-runtime-go] Go 1.13 1.14 and 1.15 support 
   with modules, updated examples and documentation. (#128)
   Date: Tuesday, August 25, 2020 3:28 PM
   
   
   
   Hi Michele,
   
   You must have missed the comment I made previously above the one you 
   copied below. It reads: 
   
   "@sciabarracom I have been warned away from using go 1.14.x in any 
   production setting due to EINTR issues... the advice is to skip from 1.13 
   to 1.15 (where the comm. addressed regressions in sys libs.) which 
   thankfully was just released a couple of weeks ago." 
   
   
   
   
   From: Michele Sciabarra <no...@github.com> 
   To: apache/openwhisk-runtime-go 
   <op...@noreply.github.com> 
   Cc: Matt Rutkowski <mr...@us.ibm.com>, Comment 
   <co...@noreply.github.com> 
   Date: 08/25/2020 02:42 AM 
   Subject: [EXTERNAL] Re: [apache/openwhisk-runtime-go] Go 1.13 1.14 
   and 1.15 support with modules, updated examples and documentation. (#128) 
   
   
   
   Yes but what we do? Do we get rid of all the runtimes older than 1.15? Or 
   just skip 1.14? 
   
   -- 
   Michele Sciabarra 
   michele@sciabarra.com 
   
   
   
   ----- Original message ----- 
   From: Matt Rutkowski <no...@github.com> 
   To: apache/openwhisk-runtime-go <op...@noreply.github.com> 
   Cc: Michele Sciabarra <sc...@sciabarra.com>, Mention 
   <me...@noreply.github.com> 
   Subject: Re: [apache/openwhisk-runtime-go] Go 1.13 1.14 and 1.15 support 
   with modules, updated examples and documentation. (#128) 
   Date: Monday, August 24, 2020 11:57 PM 
   
   
   
   
   @sciabarra <https://github.com/sciabarra> The issue is ack'ed in the 1.14 
   release notes: 
   https://golang.org/doc/go1.14 
   
   
   Specifically: 
   "Goroutines are now asynchronously preemptible. As a result, loops without 
   
   function calls no longer potentially deadlock the scheduler or 
   significantly delay garbage collection. This is supported on all platforms 
   
   except windows/arm, darwin/arm, js/wasm, and plan9/*. 
   
   A consequence of the implementation of preemption is that on Unix systems, 
   
   including Linux and macOS systems, programs built with Go 1.14 will 
   receive more signals than programs built with earlier releases. This means 
   
   that programs that use packages like syscall or golang.org/x/sys/unix will 
   
   see more slow system calls fail with EINTR errors. Those programs will 
   have to handle those errors in some way, most likely looping to try the 
   system call again. For more information about this see man 7 signal for 
   Linux systems or similar documentation for other systems. " 
   
   Under production loads, many sys. level calls will fail because they are 
   not coded to be interrupt tolerant (i.e., code their own retries on 
   failure) resulting higher order errors. 
   
   
   — 
   You are receiving this because you were mentioned. 
   Reply to this email directly, view it on GitHub < 
   https://github.com/apache/openwhisk-runtime-go/pull/128#issuecomment-679387166> 
   
   , or unsubscribe < 
   https://github.com/notifications/unsubscribe-auth/AHJ4D3YETUV4QDCLRX7BI43SCLO35ANCNFSM4QBO6K2A> 
   
   . 
   
   — 
   You are receiving this because you commented. 
   Reply to this email directly, view it on GitHub, or unsubscribe. 
   
   
   
   
   
   —
   You are receiving this because you were mentioned.
   Reply to this email directly, view it on GitHub <
   https://github.com/apache/openwhisk-runtime-go/pull/128#issuecomment-680025019>
   , or unsubscribe <
   https://github.com/notifications/unsubscribe-auth/AAEEPCJR5HK6MJ2AYFOQBUTSCO4ANANCNFSM4QBO6K2A>
   .
   
   —
   You are receiving this because you commented.
   Reply to this email directly, view it on GitHub, or unsubscribe.
   
   
   
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [openwhisk-runtime-go] sciabarracom commented on pull request #128: Go 1.13 1.14 and 1.15 support with modules, updated examples and documentation.

Posted by GitBox <gi...@apache.org>.
sciabarracom commented on pull request #128:
URL: https://github.com/apache/openwhisk-runtime-go/pull/128#issuecomment-679860805


   Yes but what we do? Do we get rid of all the runtimes older than 1.15? Or just skip 1.14? 
   
   -- 
     Michele Sciabarra
     michele@sciabarra.com
   
   
   
   ----- Original message -----
   From: Matt Rutkowski <no...@github.com>
   To: apache/openwhisk-runtime-go <op...@noreply.github.com>
   Cc: Michele Sciabarra <sc...@sciabarra.com>, Mention <me...@noreply.github.com>
   Subject: Re: [apache/openwhisk-runtime-go] Go 1.13 1.14 and 1.15 support with modules, updated examples and documentation. (#128)
   Date: Monday, August 24, 2020 11:57 PM
   
   
   
   
   @sciabarra <https://github.com/sciabarra> The issue is ack'ed in the 1.14 release notes:
   https://golang.org/doc/go1.14
   
   
   Specifically:
   "Goroutines are now asynchronously preemptible. As a result, loops without function calls no longer potentially deadlock the scheduler or significantly delay garbage collection. This is supported on all platforms except windows/arm, darwin/arm, js/wasm, and plan9/*.
   
   A consequence of the implementation of preemption is that on Unix systems, including Linux and macOS systems, programs built with Go 1.14 will receive more signals than programs built with earlier releases. This means that programs that use packages like syscall or golang.org/x/sys/unix will see more slow system calls fail with EINTR errors. Those programs will have to handle those errors in some way, most likely looping to try the system call again. For more information about this see man 7 signal for Linux systems or similar documentation for other systems. "
   
   Under production loads, many sys. level calls will fail because they are not coded to be interrupt tolerant (i.e., code their own retries on failure) resulting higher order errors.
   
   
   —
   You are receiving this because you were mentioned.
   Reply to this email directly, view it on GitHub <https://github.com/apache/openwhisk-runtime-go/pull/128#issuecomment-679387166>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AHJ4D3YETUV4QDCLRX7BI43SCLO35ANCNFSM4QBO6K2A>.
   
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [openwhisk-runtime-go] sciabarracom commented on a change in pull request #128: Go 1.13 1.14 and 1.15 support with modules, updated examples and documentation.

Posted by GitBox <gi...@apache.org>.
sciabarracom commented on a change in pull request #128:
URL: https://github.com/apache/openwhisk-runtime-go/pull/128#discussion_r475495069



##########
File path: golang1.14/Dockerfile
##########
@@ -14,27 +14,28 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 #
-
-IMG?=whisk/action-golang-v1.11
-IMG2?=whisk/actionloop
-
-all: golang bash
-
-test.lua:
-	echo 'wrk.method = "POST"'>test.lua
-	echo "wrk.body = '{\"value\":{\"name\":\"Mike\"}}'">>test.lua
-	echo 'wrk.headers["Content-Type"] = "application/json"'>>test.lua
-
-golang: test.lua
-	docker run -d --name under-test --rm -p 8080:8080 $(IMG)
-	bash init.sh main.go
-	wrk -t1 -c1 -stest.lua http://localhost:8080/run
-	docker kill under-test
-
-bash: test.lua
-	docker run -d --name under-test --rm -p 8080:8080 $(IMG2)
-	bash init.sh main.sh
-	wrk -t1 -c1 -stest.lua http://localhost:8080/run
-	docker kill under-test
-
-.PHONY: all golang bash
+FROM golang:1.13.8

Review comment:
       ouch! How I did miss this?




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [openwhisk-runtime-go] mrutkows commented on pull request #128: Go 1.13 1.14 and 1.15 support with modules, updated examples and documentation.

Posted by GitBox <gi...@apache.org>.
mrutkows commented on pull request #128:
URL: https://github.com/apache/openwhisk-runtime-go/pull/128#issuecomment-679335336


   @sciabarracom  I have been warned away from using go 1.14.x in any production setting due to EINTR issues...  the advice is to skip from 1.13 to 1.15 (where the comm. addressed regressions in sys libs.) which thankfully was just released a couple of weeks ago.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [openwhisk-runtime-go] sciabarra commented on pull request #128: Go 1.13 and 1.14 support with modules! Also updated examples and documentation.

Posted by GitBox <gi...@apache.org>.
sciabarra commented on pull request #128:
URL: https://github.com/apache/openwhisk-runtime-go/pull/128#issuecomment-678262010


   i guess very little... will add it tomorrow


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org