-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
changes to include gloang runtime #4093
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
minor nit s/golang/go
for the kind
ansible/files/runtimes.json
Outdated
@@ -208,6 +208,22 @@ | |||
} | |||
] | |||
}, | |||
"golang": [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this needs to be go
instead
"golang": [ | |
"go": [ |
ansible/files/runtimes.json
Outdated
@@ -208,6 +208,22 @@ | |||
} | |||
] | |||
}, | |||
"golang": [ | |||
{ | |||
"kind": "golang:1.11", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this needs to use go
"kind": "golang:1.11", | |
"kind": "go:1.11", |
Give me a chance to read the docs please 🙏🏼 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think for the deployment doc section it should be more brief and use “—kind go:1.11” instead of exposing the details about the docke image with “—docker”
We should use another word for “rule” when we want to reference an api/interface “contract” or “convention” |
weird that Travis is failing on systems tests unrelated to go 😱 |
@sciabarracom the systems tests pass in your local computer with the go changes? |
Codecov Report
@@ Coverage Diff @@
## master #4093 +/- ##
==========================================
- Coverage 86.12% 80.96% -5.16%
==========================================
Files 148 148
Lines 7249 7249
Branches 445 445
==========================================
- Hits 6243 5869 -374
- Misses 1006 1380 +374
Continue to review full report at Codecov.
|
@rabbah your had a chance to review the docs? |
docs/actions-go.md
Outdated
|
||
# Creating and Invoking Go Actions | ||
|
||
The runtime `actionloop-golang-v1.11` runtime can execute actions written in the Go programming language in OpenWhisk, either as precompiled binary or compiling sources on the fly. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Double “runtime”
docs/actions-go.md
Outdated
|
||
## Entry Point | ||
|
||
The source code of an action is one or more Go source file. The entry point of the action is a function, placed in the `main` package. The default name for the main function is `Main`, but you can change it to any name you want using the `--main` switch in `wsk`. The name is however always capitalized. The function must have a specific signature, as described next. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
source fileS.
|
||
The runtime `actionloop-golang-v1.11` accepts: | ||
|
||
- executable binaries in Linux ELF executable compiled for the AMD64 architecture |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can show cross compile setting?
docs/actions-go.md
Outdated
|
||
- executable binaries in Linux ELF executable compiled for the AMD64 architecture | ||
- zip files containing a binary executable named `exec` at the top level, again a Linux ELF executable compiled for the AMD64 architecture | ||
- a single file source code in Go language, that will be compiled |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A single source file in Go, that will be compiled
docs/actions-go.md
Outdated
For running tests, editing without errors with package resolution, 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. | ||
|
||
You should import it your subpackage with `import "hello"`. | ||
Note this means if you want to compile locally you have to set your `GOPATH` to parent directory of your `src` directory. If you use VSCode, you need to enable the `go.inferGopath` option. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
to the parent ...
docs/actions-go.md
Outdated
cd src | ||
zip -r ../hello.zip * | ||
cd .. | ||
wsk action create hello2-go hello.zip --kind go:1.11 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the action names can just be hello to avoid the unnecessary hyphe. Easier to read. Maybe instead of hello2 it’s hellozip
docs/actions-go.md
Outdated
|
||
Here a `Makefile` is helpful. Check the [examples](https://github.com/apache/incubator-openwhisk-runtime-go/tree/master/examples) for a collection of tested Makefiles. The generated executable is suitable to be deployed in OpenWhisk, so you can do: | ||
|
||
`wsk action create my/action exec.zip --kind go:1.11` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
my/action? This requires a package.
Description
Tests and config to include the go runtime
Related issue and scope
My changes affect the following components
Types of changes
Checklist: