(openwhisk-cli) branch main deleted (was 4b848880)
This is an automated email from the ASF dual-hosted git repository. msciabarra pushed a change to branch main in repository https://gitbox.apache.org/repos/asf/openwhisk-cli.git was 4b848880 initial commit This change permanently discards the following revisions: discard 4b848880 initial commit
(openwhisk-cli) 01/01: initial commit
This is an automated email from the ASF dual-hosted git repository. msciabarra pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/openwhisk-cli.git commit 4b848880b8a9517650a4da7830e7127c88e4117a Author: Michele Sciabarra AuthorDate: Sun Jul 7 12:24:33 2024 +0200 initial commit --- .envrc| 1 + shell.nix | 10 ++ 2 files changed, 11 insertions(+) diff --git a/.envrc b/.envrc new file mode 100644 index ..1d953f4b --- /dev/null +++ b/.envrc @@ -0,0 +1 @@ +use nix diff --git a/shell.nix b/shell.nix new file mode 100644 index ..34426f6b --- /dev/null +++ b/shell.nix @@ -0,0 +1,10 @@ +let + nixpkgs = fetchTarball "https://github.com/NixOS/nixpkgs/tarball/nixos-23.11";; + pkgs = import nixpkgs { config = {}; overlays = []; }; +in + +pkgs.mkShellNoCC { + packages = with pkgs; [ + go + ]; +}
(openwhisk-cli) branch main created (now 4b848880)
This is an automated email from the ASF dual-hosted git repository. msciabarra pushed a change to branch main in repository https://gitbox.apache.org/repos/asf/openwhisk-cli.git at 4b848880 initial commit This branch includes the following new commits: new 4b848880 initial commit The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference.
[openwhisk-client-go] branch master updated: add Env field in action (#158)
This is an automated email from the ASF dual-hosted git repository. msciabarra pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/openwhisk-client-go.git The following commit(s) were added to refs/heads/master by this push: new 13fc65f add Env field in action (#158) 13fc65f is described below commit 13fc65f65684e04f401fee67b231b370c53b3dcd Author: Giuseppe De Palma AuthorDate: Fri Apr 21 10:15:59 2023 +0200 add Env field in action (#158) --- whisk/action.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/whisk/action.go b/whisk/action.go index 3673236..19f67ec 100644 --- a/whisk/action.go +++ b/whisk/action.go @@ -44,6 +44,7 @@ type Action struct { Code int `json:"code,omitempty"` Publish*bool `json:"publish,omitempty"` Updatedint64 `json:"updated,omitempty"` + EnvKeyValueArr `json:"env,omitempty"` } type Exec struct { @@ -92,7 +93,7 @@ func (action Action) ToHeaderString() string { } // ToSummaryRowString() returns a compound string of required parameters for printing -// from CLI command `wsk action list`. +// from CLI command `wsk action list`. // ***Method of type Sortable*** func (action Action) ToSummaryRowString() string { var kind string
[openwhisk] branch master updated: fixes to use different secrets, show the results in the log (#5367)
This is an automated email from the ASF dual-hosted git repository. msciabarra pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/openwhisk.git The following commit(s) were added to refs/heads/master by this push: new 21c9a6363 fixes to use different secrets, show the results in the log (#5367) 21c9a6363 is described below commit 21c9a6363fe14e581ec67da281e1762db02ae557 Author: Michele Sciabarra AuthorDate: Thu Dec 22 14:11:26 2022 +0100 fixes to use different secrets, show the results in the log (#5367) * fixes to use different secrets, show the results in the log * propagating aws variabales and disabiling a test if the key is there ut empty Co-authored-by: Michele Sciabarra --- .github/workflows/0-on-demand.yaml | 10 +- .github/workflows/1-unit.yaml | 9 +++-- .github/workflows/2-system.yaml| 10 +- .github/workflows/3-multi-runtime.yaml | 10 +- .github/workflows/4-standalone.yaml| 10 +- .github/workflows/5-scheduler.yaml | 10 +- .github/workflows/6-performance.yaml | 8 .github/workflows/README.md| 18 +- .../org/apache/openwhisk/core/database/s3/S3Aws.scala | 2 +- tools/github/checkAndUploadLogs.sh | 10 +++--- tools/github/s3-upload.sh | 14 +++--- tools/github/setup.sh | 3 +++ 12 files changed, 63 insertions(+), 51 deletions(-) diff --git a/.github/workflows/0-on-demand.yaml b/.github/workflows/0-on-demand.yaml index 5d8d66ea3..a39a379d9 100644 --- a/.github/workflows/0-on-demand.yaml +++ b/.github/workflows/0-on-demand.yaml @@ -47,10 +47,10 @@ env: SLACK_WEBHOOK: ${{secrets.SLACK_WEBHOOK}} # (optional) s3 log upload - AWS_BUCKET: ${{ secrets.AWS_BUCKET }} - AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} - AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - AWS_REGION: ${{ secrets.AWS_REGION }} + LOG_BUCKET: ${{ secrets.LOG_BUCKET }} + LOG_ACCESS_KEY_ID: ${{ secrets.LOG_ACCESS_KEY_ID }} + LOG_SECRET_ACCESS_KEY: ${{ secrets.LOG_SECRET_ACCESS_KEY }} + LOG_REGION: ${{ secrets.LOG_REGION }} # github GH_BUILD: ${{ github.event_name }}-${{ github.sha }} @@ -74,7 +74,7 @@ jobs: run: "./tools/github/run${{ env.TEST_SUITE }}Tests.sh" continue-on-error: true - id: logs -name: Upload Logs +name: Show results and Upload logs run: ./tools/github/checkAndUploadLogs.sh ${{ env.TEST_SUITE }} - name: Slack Notification run: > diff --git a/.github/workflows/1-unit.yaml b/.github/workflows/1-unit.yaml index 144720625..c94061250 100644 --- a/.github/workflows/1-unit.yaml +++ b/.github/workflows/1-unit.yaml @@ -34,7 +34,12 @@ env: SLACK_WEBHOOK: ${{secrets.SLACK_WEBHOOK}} # (optional) s3 log upload - AWS_BUCKET: ${{ secrets.AWS_BUCKET }} + LOG_BUCKET: ${{ secrets.LOG_BUCKET }} + LOG_ACCESS_KEY_ID: ${{ secrets.LOG_ACCESS_KEY_ID }} + LOG_SECRET_ACCESS_KEY: ${{ secrets.LOG_SECRET_ACCESS_KEY }} + LOG_REGION: ${{ secrets.LOG_REGION }} + + # some tests need also this even if they are empty on pull_requests... AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} AWS_REGION: ${{ secrets.AWS_REGION }} @@ -56,7 +61,7 @@ jobs: run: "./tools/github/run${{ env.TEST_SUITE }}Tests.sh" continue-on-error: true - id: logs -name: Upload Logs +name: Show results and Upload logs run: ./tools/github/checkAndUploadLogs.sh ${{ env.TEST_SUITE }} - name: Slack Notification run: > diff --git a/.github/workflows/2-system.yaml b/.github/workflows/2-system.yaml index 9295f921f..79c5ea6eb 100644 --- a/.github/workflows/2-system.yaml +++ b/.github/workflows/2-system.yaml @@ -34,10 +34,10 @@ env: SLACK_WEBHOOK: ${{secrets.SLACK_WEBHOOK}} # (optional) s3 log upload - AWS_BUCKET: ${{ secrets.AWS_BUCKET }} - AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} - AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - AWS_REGION: ${{ secrets.AWS_REGION }} + LOG_BUCKET: ${{ secrets.LOG_BUCKET }} + LOG_ACCESS_KEY_ID: ${{ secrets.LOG_ACCESS_KEY_ID }} + LOG_SECRET_ACCESS_KEY: ${{ secrets.LOG_SECRET_ACCESS_KEY }} + LOG_REGION: ${{ secrets.LOG_REGION }} # github GH_BUILD: ${{ github.event_name }}-${{ github.sha }} @@ -56,7 +56,7 @@ jobs: run: "./tools/github/run${{ env.TEST_SUITE }}Tests.sh" continue-on-error: true - id: logs -name: Upload Logs +name: Show results and Upload logs run: ./tools/github/checkAndUploadLogs.sh ${{ env.TEST_SUITE }} - name: Slack Notification run:
[openwhisk] branch master updated: GitHub action (#5361)
This is an automated email from the ASF dual-hosted git repository. msciabarra pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/openwhisk.git The following commit(s) were added to refs/heads/master by this push: new f717619c8 GitHub action (#5361) f717619c8 is described below commit f717619c8c25b54294cfa195732732e85c5d9431 Author: Michele Sciabarra AuthorDate: Fri Dec 16 16:33:32 2022 +0100 GitHub action (#5361) * github action initial commit * fix blank * debug * fix push * fix java * add setup * triggering build * run unit test * ooops * updating debugAction * waitifdebug * fix cleanup * final test * disable ngrok * reworked the PR - multiple jobs and slack * split in multiple build * github actions updated * scancode fixes * forcing a corresponding version of jdk in ci and docker image and renaming S3_LOG_BUCKET to AWS_BUCKET to fix tests * more fixes - only one test failing against 1.0.0 * finally passing all the tests on 1.0.0 * restored master variables * restored more master files * triggered on push and pull request * unit test too * wskadmin fixes * improve message * dummy enabled * better git message * cleanup the log messages * unnecessary change to master - even if beneficial * improved messages (and a test disabled) * reverting commented test * get rid of DummyKO no more needed Co-authored-by: Michele Sciabarra --- .github/workflows/0-on-demand.yaml | 92 ++ .github/workflows/1-unit.yaml | 70 .github/workflows/2-system.yaml| 70 .github/workflows/3-multi-runtime.yaml | 70 .github/workflows/4-standalone.yaml| 70 .github/workflows/5-scheduler.yaml | 70 .github/workflows/6-performance.yaml | 84 .github/workflows/README.md| 56 + .gitignore | 4 + common/scala/Dockerfile| 3 +- tools/github/checkAndUploadLogs.sh | 59 ++ tools/github/debugAction.sh| 69 tools/github/flake8.sh | 42 ++ .../Dockerfile => tools/github/runDummyTests.sh| 21 ++--- .../github/runLeanSystemTests.sh | 27 --- .../github/runMultiRuntimeTests.sh | 27 --- .../github/runSchedulerTests.sh| 26 +++--- tools/github/runStandaloneTests.sh | 64 +++ .../Dockerfile => tools/github/runSystemTests.sh | 27 --- .../Dockerfile => tools/github/runUnitTests.sh | 25 +++--- tools/github/s3-upload.sh | 53 + tools/github/scan.sh | 52 tools/github/setup.sh | 79 +++ .../Dockerfile => tools/github/waitIfDebug.sh | 32 .../Dockerfile => tools/github/writeOnSlack.sh | 23 +++--- 25 files changed, 1112 insertions(+), 103 deletions(-) diff --git a/.github/workflows/0-on-demand.yaml b/.github/workflows/0-on-demand.yaml new file mode 100644 index 0..5d8d66ea3 --- /dev/null +++ b/.github/workflows/0-on-demand.yaml @@ -0,0 +1,92 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you 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. +# +name: On Demand Tests + +on: + workflow_dispatch: +inputs: + enable_ngrok_debug: +description: "Enable Ngrok Debugging" +required: true +type: boolean +default: false + test_suite: +description: Select Test Suite to run +type: choice +options: +- Unit +- System +- MultiRuntime +- Standalone +- Scheduler +
[openwhisk-runtime-go] branch master updated: drop golang1.13 and golang1.15 (#167)
This is an automated email from the ASF dual-hosted git repository. msciabarra pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/openwhisk-runtime-go.git The following commit(s) were added to refs/heads/master by this push: new 21dedfe drop golang1.13 and golang1.15 (#167) 21dedfe is described below commit 21dedfee0ecf572f33f9b9e6d743f5a598c3a80d Author: David Grove AuthorDate: Fri May 13 08:27:27 2022 -0400 drop golang1.13 and golang1.15 (#167) --- .travis.yml| 2 +- docs/BUILD.md | 4 +- docs/DEPLOY.md | 2 +- golang1.13/Dockerfile | 48 --- golang1.13/Makefile| 45 --- golang1.13/bin/compile | 138 - golang1.13/build.gradle| 38 -- golang1.13/lib/launcher.go | 122 -- golang1.15/Dockerfile | 54 golang1.15/Makefile| 44 --- golang1.15/bin/compile | 138 - golang1.15/build.gradle| 38 -- golang1.15/lib/launcher.go | 122 -- settings.gradle| 2 - .../ActionLoopBasicGo13Tests.scala | 31 - .../ActionLoopBasicGo15Tests.scala | 31 - .../ActionLoopGo13ContainerTests.scala | 31 - .../ActionLoopGo15ContainerTests.scala | 31 - 18 files changed, 4 insertions(+), 917 deletions(-) diff --git a/.travis.yml b/.travis.yml index f295134..6cad132 100644 --- a/.travis.yml +++ b/.travis.yml @@ -51,7 +51,7 @@ deploy: repo: apache/openwhisk-runtime-go - provider: script skip_cleanup: true -script: "./tools/travis/publish.sh openwhisk 1.13 nightly && ./tools/travis/publish.sh openwhisk 1.15 nightly && ./tools/travis/publish.sh openwhisk 1.16 nightly && ./tools/travis/publish.sh openwhisk 1.17 nightly && ./tools/travis/publish.sh openwhisk 1.18 nightly" +script: "./tools/travis/publish.sh openwhisk 1.16 nightly && ./tools/travis/publish.sh openwhisk 1.17 nightly && ./tools/travis/publish.sh openwhisk 1.18 nightly" on: branch: master repo: apache/openwhisk-runtime-go diff --git a/docs/BUILD.md b/docs/BUILD.md index bef4bc2..14b5841 100644 --- a/docs/BUILD.md +++ b/docs/BUILD.md @@ -43,9 +43,9 @@ To build the docker images, after compiling go proxy: This will build the images: -* `action-golang-v1.13`: an image supporting Go 1.13 sources (does expect an ack) -* `action-golang-v1.15`: an image supporting Go 1.15 sources (does expect an ack) * `action-golang-v1.16`: an image supporting Go 1.16 sources (does expect an ack) +* `action-golang-v1.17`: an image supporting Go 1.17 sources (does expect an ack) +* `action-golang-v1.18`: an image supporting Go 1.18 sources (does expect an ack) * `actionloop-base`: the base image, supporting generic executables ans shell script (does not expect an ack) The `actionloop-base` image can be used for supporting other compiled programming languages as long as they implement a `compile` script and the *action loop* protocol described below. Please check [ENVVARS.md](ENVVARS.md) for configuration options diff --git a/docs/DEPLOY.md b/docs/DEPLOY.md index 4f928b8..a784bd0 100644 --- a/docs/DEPLOY.md +++ b/docs/DEPLOY.md @@ -19,7 +19,7 @@ # Deployment options -There are a few images provided: the `actionloop-base` and the `action-golang-v1.13`, `action-golang-v1.15` and `action-golang-v1.16` are available. Each image accepts different input in the deployment. +There are a few images provided: the `actionloop-base` and the `action-golang-v1.16`, `action-golang-v1.17` and `action-golang-v1.18` are available. Each image accepts different input in the deployment. diff --git a/golang1.13/Dockerfile b/golang1.13/Dockerfile deleted file mode 100644 index 59f7da7..000 --- a/golang1.13/Dockerfile +++ /dev/null @@ -1,48 +0,0 @@ -# -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright ownership. -# The ASF licenses this file to You 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
[openwhisk-runtime-go] branch master updated: New example aws (#152)
This is an automated email from the ASF dual-hosted git repository. msciabarra pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/openwhisk-runtime-go.git The following commit(s) were added to refs/heads/master by this push: new 9cab25e New example aws (#152) 9cab25e is described below commit 9cab25ed8f115981ac06d85b7f9700cb59a37b0d Author: Michele Sciabarra <30654959+sciabarra...@users.noreply.github.com> AuthorDate: Wed Jul 28 14:56:35 2021 +0200 New example aws (#152) * updated examples * using actionloop-base as image for the bash example Co-authored-by: Michele Sciabarra --- examples/Makefile | 34 +++--- examples/{module-main => aws-main}/Makefile | 9 ++--- examples/aws-main/go.mod| 5 +++ examples/aws-main/go.sum| 17 + examples/aws-main/main.go | 55 + examples/module-main/Makefile | 5 +-- examples/package-main/Makefile | 5 +-- examples/single-hello/Makefile | 5 +-- examples/single-main/Makefile | 5 +-- examples/standalone/Makefile| 5 +-- 10 files changed, 118 insertions(+), 27 deletions(-) diff --git a/examples/Makefile b/examples/Makefile index cde98ef..1cb85ba 100644 --- a/examples/Makefile +++ b/examples/Makefile @@ -17,40 +17,48 @@ # prefix OW_USER?=openwhisk +OW_VER?=v1.16:nightly -test: .PHONY +.PHONY: test +test: all cat */test.out | grep 'Hello' | sort >test.out diff test.out test.expected -all: .PHONY +.PHONY: all +all: bash standalone single-main single-hello package-main module-main .PHONY: bash bash: - cd $@ && OW_USER=$(OW_USER) make clean deploy test + cd $@ && OW_USER=$(OW_USER) OW_VER=$(OW_VER) make clean deploy test .PHONY: standalone standalone: - cd $@ && OW_USER=$(OW_USER) make clean devel test - cd $@ && OW_USER=$(OW_USER) make clean deploy test + cd $@ && OW_USER=$(OW_USER) OW_VER=$(OW_VER) make clean devel test + cd $@ && OW_USER=$(OW_USER) OW_VER=$(OW_VER) make clean deploy test .PHONY: single-main single-main: - cd $@ && OW_USER=$(OW_USER) make clean devel test - cd $@ && OW_USER=$(OW_USER) make clean deploy test + cd $@ && OW_USER=$(OW_USER) OW_VER=$(OW_VER) make clean devel test + cd $@ && OW_USER=$(OW_USER) OW_VER=$(OW_VER) make clean deploy test .PHONY: single-hello single-hello: - cd $@ && OW_USER=$(OW_USER) make clean devel test - cd $@ && OW_USER=$(OW_USER) make clean deploy test + cd $@ && OW_USER=$(OW_USER) OW_VER=$(OW_VER) make clean devel test + cd $@ && OW_USER=$(OW_USER) OW_VER=$(OW_VER) make clean deploy test .PHONY: package-main package-main: - cd $@ && OW_USER=$(OW_USER) make clean devel test - cd $@ && OW_USER=$(OW_USER) make clean deploy test + cd $@ && OW_USER=$(OW_USER) OW_VER=$(OW_VER) make clean devel test + cd $@ && OW_USER=$(OW_USER) OW_VER=$(OW_VER) make clean deploy test .PHONY: module-main module-main: # this exceeds 3 seconds for initialization - #cd $@ && OW_USER=$(OW_USER) make clean devel test - cd $@ && OW_USER=$(OW_USER) make clean deploy test + #cd $@ && OW_USER=$(OW_USER) OW_VER=$(OW_VER) make clean devel test + cd $@ && OW_USER=$(OW_USER) OW_VER=$(OW_VER) make clean deploy test +.PHONY: aws-main +aws-main: + # this exceeds 3 seconds for initialization + #cd $@ && OW_USER=$(OW_USER) OW_VER=$(OW_VER) make clean devel test + cd $@ && OW_USER=$(OW_USER) OW_VER=$(OW_VER) make clean deploy test diff --git a/examples/module-main/Makefile b/examples/aws-main/Makefile similarity index 91% copy from examples/module-main/Makefile copy to examples/aws-main/Makefile index 4ae74ba..5d8d99b 100644 --- a/examples/module-main/Makefile +++ b/examples/aws-main/Makefile @@ -16,13 +16,14 @@ # OW_USER?=openwhisk -OW_RUNTIME?=$(OW_USER)/action-golang-v1.15:nightly -OW_COMPILER?=$(OW_USER)/action-golang-v1.15:nightly +OW_VER?=v1.16:nightly +OW_RUNTIME?=$(OW_USER)/action-golang-$(OW_VER) +OW_COMPILER?=$(OW_USER)/action-golang-$(OW_VER) WSK?=wsk MAIN=main PACKAGE=test SRCS=main.go go.mod go.sum -NAME=module-main +NAME=aws-main BINZIP=$(MAIN)-bin.zip SRCZIP=$(MAIN)-src.zip @@ -48,7 +49,7 @@ test: test.json $(WSK) action invoke test/$(NAME) -P test.json -r | tee -a test.out test.json: - echo '{ "name": "Mike" }' >test.json + echo '{}' >test.json package.done: $(WSK) package update $(PACKAGE) diff --git a/examples/aws-main/go.mod b/examples/aws-main/go.mod new file mode 1
[openwhisk-runtime-go] branch master updated: Symlink in zips (#148)
This is an automated email from the ASF dual-hosted git repository. msciabarra pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/openwhisk-runtime-go.git The following commit(s) were added to refs/heads/master by this push: new 55229db Symlink in zips (#148) 55229db is described below commit 55229db17afd0ce21912598d3178afc668349aaf Author: Michele Sciabarra <30654959+sciabarra...@users.noreply.github.com> AuthorDate: Sat Jul 10 13:50:06 2021 +0200 Symlink in zips (#148) * implemented symlinks in zips * bug fixes Co-authored-by: Michele Sciabarra Co-authored-by: Michele Sciabarra --- .gitignore | 5 +++ CHANGES.md | 3 +- openwhisk/_test/build.sh | 2 +- openwhisk/util_test.go | 12 +++ openwhisk/version.go | 2 +- openwhisk/zip.go | 84 ++-- openwhisk/zip_test.go| 21 7 files changed, 109 insertions(+), 20 deletions(-) diff --git a/.gitignore b/.gitignore index a06a05b..361c9ec 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,9 @@ # Mac .DS_Store +# goenv +.go-version + # Gradle .gradle/ .gogradle/ @@ -27,10 +30,12 @@ openwhisk/_test/*.zip openwhisk/_test/*.jar openwhisk/_test/compile/ openwhisk/_test/output/ +openwhisk/_test/venv/ openwhisk/action/ openwhisk/compile/ openwhisk/debug.test *.pyc +*.env # Eclipse tests/bin/ diff --git a/CHANGES.md b/CHANGES.md index 44a7c61..6d83c4d 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -17,7 +17,8 @@ # --> -# next release +# 1.17.1 +- support for zipping and unzipping symbolic links (required to support virtualenvs) - go 1.15 runtime upgraded to 1.15.13 # 1.17.0 diff --git a/openwhisk/_test/build.sh b/openwhisk/_test/build.sh index fe17a65..769c58e 100755 --- a/openwhisk/_test/build.sh +++ b/openwhisk/_test/build.sh @@ -60,4 +60,4 @@ zip -q -r exec.zip exec etc dir echo exec/env >helloack/exec.env zip -j helloack.zip helloack/* - +python3 -m venv venv diff --git a/openwhisk/util_test.go b/openwhisk/util_test.go index 586520a..fc0d810 100644 --- a/openwhisk/util_test.go +++ b/openwhisk/util_test.go @@ -138,6 +138,7 @@ func dump(file *os.File) { os.Remove(file.Name()) } +// printing output only if no errors func sys(cli string, args ...string) { os.Chmod(cli, 0755) cmd := exec.Command(cli, args...) @@ -149,6 +150,17 @@ func sys(cli string, args ...string) { } } +// version printing output also when errors +func sys2(cli string, args ...string) { + os.Chmod(cli, 0755) + cmd := exec.Command(cli, args...) + out, err := cmd.CombinedOutput() + fmt.Print(string(out)) + if err != nil { + log.Print(err) + } +} + func exists(dir, filename string) error { path := fmt.Sprintf("%s/%d/%s", dir, highestDir(dir), filename) _, err := os.Stat(path) diff --git a/openwhisk/version.go b/openwhisk/version.go index fd310fe..d8ede5b 100644 --- a/openwhisk/version.go +++ b/openwhisk/version.go @@ -17,4 +17,4 @@ package openwhisk // Version number - internal -var Version = "1.16.0" +var Version = "1.17.1" diff --git a/openwhisk/zip.go b/openwhisk/zip.go index fd4b994..f327a53 100644 --- a/openwhisk/zip.go +++ b/openwhisk/zip.go @@ -60,24 +60,42 @@ func Unzip(src []byte, dest string) error { os.MkdirAll(dest, 0755) // Closure to address file descriptors issue with all the deferred .Close() methods extractAndWriteFile := func(f *zip.File) error { + + path := filepath.Join(dest, f.Name) + isLink := f.FileInfo().Mode()&os.ModeSymlink == os.ModeSymlink + + // dir + if f.FileInfo().IsDir() && !isLink { + return os.MkdirAll(path, f.Mode()) + } + + // open file rc, err := f.Open() - defer rc.Close() if err != nil { return err } - path := filepath.Join(dest, f.Name) - if f.FileInfo().IsDir() { - return os.MkdirAll(path, 0755) + defer rc.Close() + + // link + if isLink { + buf, err := ioutil.ReadAll(rc) + if err != nil { + return err + } + return os.Symlink(string(buf), path) } + + // file + // eventually create a missing ddir err = os.MkdirAll(filepath.Dir(path), 0755) if err != nil { return err } file, err := os.OpenFile(path, os.O_WRONLY|os.O_CREATE|os.O_TRUNC, f.Mode()) - defer file.Close() if err != nil {
[openwhisk-runtime-go] branch master updated: Go 1.13 and 1.15 support with modules, updated examples and documentation (despite the branch name mentioning 1.14) (#128)
This is an automated email from the ASF dual-hosted git repository. msciabarra pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/openwhisk-runtime-go.git The following commit(s) were added to refs/heads/master by this push: new a9f3aa8 Go 1.13 and 1.15 support with modules, updated examples and documentation (despite the branch name mentioning 1.14) (#128) a9f3aa8 is described below commit a9f3aa832d742c2fce92c5132ff52a95a6b94bff Author: Michele Sciabarra <30654959+sciabarra...@users.noreply.github.com> AuthorDate: Sun Aug 30 17:05:08 2020 +0200 Go 1.13 and 1.15 support with modules, updated examples and documentation (despite the branch name mentioning 1.14) (#128) * updated tests * adding go1.13 and go1.15 * reworked examples and docs * support modules Co-authored-by: rodric rabbah --- .gitignore | 2 +- .travis.yml| 2 +- CHANGES.md | 3 + docs/ACTION.md | 7 +- docs/BUILD.md | 10 +- docs/DEPLOY.md | 107 +++- examples/EXAMPLES.md | 27 ++-- examples/Makefile | 64 +- examples/{bash-hello => bash}/Makefile | 11 +- examples/{bash-hello => bash}/hello.sh | 5 +- examples/benchmark/init.sh | 20 --- examples/golang-hello-vendor/Makefile | 63 -- examples/golang-hello-vendor/src/hello/Gopkg.lock | 44 --- examples/golang-hello-vendor/src/hello/Gopkg.toml | 66 -- examples/golang-hello-vendor/src/hello/hello.go| 43 --- .../golang-hello-vendor/src/hello/hello_test.go| 41 -- examples/golang-main-single/main.go| 31 - examples/golang-main-vendor/src/main/Gopkg.lock| 25 examples/golang-main-vendor/src/main/Gopkg.toml| 66 -- .../{golang-main-vendor => module-main}/Makefile | 24 ++-- examples/module-main/go.mod| 5 + examples/module-main/go.sum| 12 ++ .../src/main => module-main}/main.go | 2 +- .../{golang-main-package => package-main}/Makefile | 17 +-- examples/package-main/go.mod | 7 ++ examples/package-main/hello/go.mod | 3 + .../src => package-main}/hello/hello.go| 2 +- .../src => package-main}/hello/hello_test.go | 2 +- .../src => package-main}/main.go | 0 .../{golang-hello-single => single-hello}/Makefile | 11 +- .../{golang-hello-single => single-hello}/hello.go | 2 +- .../{golang-main-single => single-main}/Makefile | 11 +- examples/{benchmark => single-main}/main.go| 2 +- .../Makefile | 9 +- .../src/exec => standalone/exec.go}| 6 +- examples/test.expected | 10 ++ go.mod | 6 +- go.sum | 20 +++ golang1.11/Dockerfile | 8 +- golang1.12/Dockerfile | 8 +- {golang1.11 => golang1.13}/Dockerfile | 38 +++--- {examples/benchmark => golang1.13}/Makefile| 41 +++--- golang1.13/bin/compile | 138 + .../src/main/main.go => golang1.13/build.gradle| 34 ++--- .../src/exec => golang1.13/lib/launcher.go | 40 +++--- {golang1.11 => golang1.15}/Dockerfile | 38 +++--- examples/benchmark/main.sh => golang1.15/Makefile | 35 -- golang1.15/bin/compile | 138 + .../src/main/main.go => golang1.15/build.gradle| 34 ++--- .../src/exec => golang1.15/lib/launcher.go | 40 +++--- main/proxy.go | 5 +- openwhisk/actionProxy.go | 9 +- openwhisk/actionProxy_test.go | 4 +- openwhisk/compiler_test.go | 4 + settings.gradle| 2 + .../ActionLoopBasicGo12Tests.scala | 115 + .../ActionLoopBasicGo13Tests.scala | 20 +-- .../ActionLoopBasicGo15Tests.scala | 20 +-- .../actionContainers/ActionLoopBasicGoTests.scala | 36 +++--- .../ActionLoopGo12ContainerTests.scala | 119 +- .../ActionLoopGo13ContainerTests.scala | 22 ++-- .../ActionLoopGo15ContainerTests.scala | 22 ++-- .../ActionLoopGoContainerTests.scala | 11 +- tools/travis/
[openwhisk-runtime-go] branch master updated: Make unzip always create sub dir using mode 0755 (#126)
This is an automated email from the ASF dual-hosted git repository. msciabarra pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/openwhisk-runtime-go.git The following commit(s) were added to refs/heads/master by this push: new 16aa5d3 Make unzip always create sub dir using mode 0755 (#126) 16aa5d3 is described below commit 16aa5d3acd44a774e8ae83678c6fdb3c29cff73b Author: jiangpch AuthorDate: Mon Aug 17 18:00:19 2020 +0800 Make unzip always create sub dir using mode 0755 (#126) Co-authored-by: jiang.pengcheng --- openwhisk/zip.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openwhisk/zip.go b/openwhisk/zip.go index 5f97696..fd4b994 100644 --- a/openwhisk/zip.go +++ b/openwhisk/zip.go @@ -67,7 +67,7 @@ func Unzip(src []byte, dest string) error { } path := filepath.Join(dest, f.Name) if f.FileInfo().IsDir() { - return os.MkdirAll(path, f.Mode()) + return os.MkdirAll(path, 0755) } err = os.MkdirAll(filepath.Dir(path), 0755) if err != nil {
[openwhisk-runtime-go] branch master updated: Upgrade golang version to 1.13 in travis (#127)
This is an automated email from the ASF dual-hosted git repository. msciabarra pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/openwhisk-runtime-go.git The following commit(s) were added to refs/heads/master by this push: new bd69e63 Upgrade golang version to 1.13 in travis (#127) bd69e63 is described below commit bd69e633f352643abdd1ece17c7c4873c7dd391d Author: jiangpch AuthorDate: Thu Aug 6 16:55:12 2020 +0800 Upgrade golang version to 1.13 in travis (#127) * Upgrade golang version to 1.13 in travis * Add GO111MODULE=off environment Co-authored-by: jiang.pengcheng --- .travis.yml | 2 +- common/gobuild.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 1438f62..d51fdc7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -18,7 +18,7 @@ sudo: required language: go go: - - "1.12.9" + - "1.13.14" services: - docker notifications: diff --git a/common/gobuild.py b/common/gobuild.py index f86f7cb..ceb7c19 100755 --- a/common/gobuild.py +++ b/common/gobuild.py @@ -56,7 +56,8 @@ def build(parent, source_dir, target): env = { "PATH": os.environ["PATH"], "GOPATH": os.path.abspath(parent), - "GOCACHE": "/tmp" + "GOCACHE": "/tmp", + "GO111MODULE": "off" } if os.path.isdir("%s/main" % source_dir): source_dir += "/main"
[openwhisk] branch master updated: Add -i to docker command, otherwise doesnt work (#4864)
This is an automated email from the ASF dual-hosted git repository. msciabarra pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/openwhisk.git The following commit(s) were added to refs/heads/master by this push: new 37c1236 Add -i to docker command, otherwise doesnt work (#4864) 37c1236 is described below commit 37c123655321043a33b818d4382dfa75f9871397 Author: Peter Nemere AuthorDate: Sun Mar 29 06:55:44 2020 +1000 Add -i to docker command, otherwise doesnt work (#4864) --- docs/actions-go.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/actions-go.md b/docs/actions-go.md index c83fbfd..6a6009a 100644 --- a/docs/actions-go.md +++ b/docs/actions-go.md @@ -180,7 +180,7 @@ If you have multiple sources in current directory, even with a subfolder with so cd src zip -r ../src.zip * cd .. -docker run openwhisk/action-golang-v1.11 -compile main exec.zip +docker -i run openwhisk/action-golang-v1.11 -compile main exec.zip ``` Note that the output is always a zip file in Linux AMD64 format so the executable can be run only inside a Docker Linux container.
[openwhisk-runtime-python] branch master updated: use apache sources (#86)
This is an automated email from the ASF dual-hosted git repository. msciabarra pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/openwhisk-runtime-python.git The following commit(s) were added to refs/heads/master by this push: new 55b7c10 use apache sources (#86) 55b7c10 is described below commit 55b7c10516d311ef7d93072cc0b01fd83e79c499 Author: Michele Sciabarra AuthorDate: Sun Mar 15 15:36:55 2020 +0100 use apache sources (#86) * use runtime from apache sources * built also actionloop for pyhton3.7 ai --- .travis.yml | 2 +- core/python2ActionLoop/Dockerfile | 7 --- core/python3ActionLoop/Dockerfile | 7 --- core/python3AiActionLoop/Dockerfile | 9 + tests/build.gradle | 2 ++ tools/travis/publish.sh | 2 ++ 6 files changed, 18 insertions(+), 11 deletions(-) diff --git a/.travis.yml b/.travis.yml index 2184acf..217a680 100644 --- a/.travis.yml +++ b/.travis.yml @@ -45,7 +45,7 @@ deploy: all_branches: true repo: apache/openwhisk-runtime-python - provider: script -script: "./tools/travis/publish.sh openwhisk 3 nightly && ./tools/travis/publish.sh openwhisk 3-ai nightly && ./tools/travis/publish.sh openwhisk 3-loop nightly" +script: "./tools/travis/publish.sh openwhisk 3 nightly && ./tools/travis/publish.sh openwhisk 3-ai nightly && ./tools/travis/publish.sh openwhisk 3-loop nightly && ./tools/travis/publish.sh openwhisk 3-loopai nightly" on: branch: master repo: apache/openwhisk-runtime-python diff --git a/core/python2ActionLoop/Dockerfile b/core/python2ActionLoop/Dockerfile index 2d3e278..5d0d603 100644 --- a/core/python2ActionLoop/Dockerfile +++ b/core/python2ActionLoop/Dockerfile @@ -17,9 +17,10 @@ # build go proxy from source FROM golang:1.12 AS builder_source -#RUN env CGO_ENABLED=0 go get github.com/apache/openwhisk-runtime-go/main && mv /go/bin/main /bin/proxy -RUN git clone --branch dev \ - https://github.com/nimbella-corp/openwhisk-runtime-go /src ;\ +ARG GO_PROXY_GITHUB_USER=apache +ARG GO_PROXY_GITHUB_BRANCH=master +RUN git clone --branch ${GO_PROXY_GITHUB_BRANCH} \ + https://github.com/${GO_PROXY_GITHUB_USER}/openwhisk-runtime-go /src ;\ cd /src ; env GO111MODULE=on CGO_ENABLED=0 go build main/proxy.go && \ mv proxy /bin/proxy diff --git a/core/python3ActionLoop/Dockerfile b/core/python3ActionLoop/Dockerfile index dee8c5f..4be89e4 100644 --- a/core/python3ActionLoop/Dockerfile +++ b/core/python3ActionLoop/Dockerfile @@ -16,9 +16,10 @@ # # build go proxy from source FROM golang:1.12 AS builder_source -#RUN env CGO_ENABLED=0 go get github.com/apache/openwhisk-runtime-go/main && mv /go/bin/main /bin/proxy -RUN git clone --branch dev \ - https://github.com/nimbella-corp/openwhisk-runtime-go /src ;\ +ARG GO_PROXY_GITHUB_USER=apache +ARG GO_PROXY_GITHUB_BRANCH=master +RUN git clone --branch ${GO_PROXY_GITHUB_BRANCH} \ + https://github.com/${GO_PROXY_GITHUB_USER}/openwhisk-runtime-go /src ;\ cd /src ; env GO111MODULE=on CGO_ENABLED=0 go build main/proxy.go && \ mv proxy /bin/proxy diff --git a/core/python3AiActionLoop/Dockerfile b/core/python3AiActionLoop/Dockerfile index 3b422e6..97a7cd9 100644 --- a/core/python3AiActionLoop/Dockerfile +++ b/core/python3AiActionLoop/Dockerfile @@ -17,9 +17,10 @@ # build go proxy from source FROM golang:1.12 AS builder_source -#RUN env CGO_ENABLED=0 go get github.com/apache/openwhisk-runtime-go/main && mv /go/bin/main /bin/proxy -RUN git clone --branch dev \ - https://github.com/nimbella-corp/openwhisk-runtime-go /src ;\ +ARG GO_PROXY_GITHUB_USER=apache +ARG GO_PROXY_GITHUB_BRANCH=master +RUN git clone --branch ${GO_PROXY_GITHUB_BRANCH} \ + https://github.com/${GO_PROXY_GITHUB_USER}/openwhisk-runtime-go /src ;\ cd /src ; env GO111MODULE=on CGO_ENABLED=0 go build main/proxy.go && \ mv proxy /bin/proxy @@ -27,7 +28,7 @@ RUN git clone --branch dev \ FROM golang:1.12 AS builder_release ARG GO_PROXY_RELEASE_VERSION=1.12@1.15.0 RUN curl -sL \ - https://github.com/apache/openwhisk-runtime-go/archive/{$GO_PROXY_RELEASE_VERSION}.tar.gz\ + https://github.com/apache/openwhisk-runtime-go/archive/${GO_PROXY_RELEASE_VERSION}.tar.gz\ | tar xzf -\ && cd openwhisk-runtime-go-*/main\ && GO111MODULE=on go build -o /bin/proxy diff --git a/tests/build.gradle b/tests/build.gradle index e720728..01e8bde 100644 --- a/tests/build.gradle +++ b/tests/build.gradle @@ -44,6 +44,8 @@ tasks.withType(ScalaCompile) { } task testPython3(type: Test) { +// python2 is end-of-life and the runtime not built by default +exclude 'scala/runtime/actionContainers/Python2ActionLoopContainerTests' } task buildArtifacts(type:Exec) { diff --git a/tools/travis/publish.sh b/tools/travis/publish.sh index ad
[openwhisk-runtime-nodejs] branch master updated: Actionloop based runtime for Typescript (#160)
This is an automated email from the ASF dual-hosted git repository. msciabarra pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/openwhisk-runtime-nodejs.git The following commit(s) were added to refs/heads/master by this push: new 912ee40 Actionloop based runtime for Typescript (#160) 912ee40 is described below commit 912ee400d7be7ca4b428049418a1b5172e60ad32 Author: Michele Sciabarra AuthorDate: Tue Feb 25 07:49:02 2020 +0100 Actionloop based runtime for Typescript (#160) --- .gitignore | 3 + core/typescript37Action/Dockerfile | 59 core/typescript37Action/Makefile | 32 + core/typescript37Action/bin/compile| 153 + .../typescript37Action/build.gradle| 27 +--- core/typescript37Action/lib/launcher.ts| 101 ++ settings.gradle| 2 + tests/dat/docker/typescript37docker/Dockerfile | 20 +++ .../dat/docker/typescript37docker/build.gradle | 27 +--- .../NodeJsActionContainerTests.scala | 70 ++ .../actionContainers/NodeJsConcurrentTests.scala | 55 .../NodeJsNonConcurrentTests.scala | 60 .../actionContainers/Typescript37BasicTests.scala | 93 + .../actionContainers/Typescript37CommonTests.scala | 31 ++--- 14 files changed, 579 insertions(+), 154 deletions(-) diff --git a/.gitignore b/.gitignore index d5aef40..0f904f2 100644 --- a/.gitignore +++ b/.gitignore @@ -17,6 +17,9 @@ results !/ansible/environments/local !/ansible/environments/mac +# actionloop action compiler script +!core/typescript37Action/bin/compile + # Eclipse bin/ **/.project diff --git a/core/typescript37Action/Dockerfile b/core/typescript37Action/Dockerfile new file mode 100644 index 000..e7135b2 --- /dev/null +++ b/core/typescript37Action/Dockerfile @@ -0,0 +1,59 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You 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. +# +FROM golang:1.12 as builder +RUN env CGO_ENABLED=0 go get github.com/apache/openwhisk-runtime-go/main \ +&& mv /go/bin/main /bin/proxy +FROM node:12.1.0-stretch +ENV TYPESCRIPT_VERSION=3.7.4 +COPY --from=builder /bin/proxy /bin/proxy +RUN apt-get update && apt-get install -y \ +imagemagick \ +graphicsmagick \ +unzip \ +wget \ +&& rm -rf /var/lib/apt/lists/* &&\ +mkdir -p /app/action +RUN cd /app ;\ + npm install -g yarn ;\ + npm install -g typescript@${TYPESCRIPT_VERSION} ;\ + echo '{"private":true}' >package.json ;\ + npm install --save --no-package-lock --production \ + axios@0.19.0 \ + async@2.6.1 \ + aws-sdk@2.401.0 \ + bluebird@3.5.3 \ + body-parser@1.18.3 \ + btoa@1.2.1 \ + gm@1.23.1 \ + @google-cloud/datastore@4.4.1 \ + @google-cloud/storage@4.0.1 \ + nano@8.0.0 \ + redis@2.8.0 \ + tmp@0.0.31 \ + twilio@3.28.0 \ + uuid@3.0.0 \ + openwhisk@3.18.0 \ + && npm cache clean --force +WORKDIR /app +EXPOSE 8080 +COPY bin/compile /bin/compile +COPY lib/launcher.ts /lib/launcher.ts +ENV OW_COMPILER=/bin/compile +ENV OW_LOG_INIT_ERROR=1 +ENV OW_WAIT_FOR_ACK=1 +ENV OW_EXECUTION_ENV=openwhisk/typescript3.7 +ENTRYPOINT ["/bin/proxy"] diff --git a/core/typescript37Action/Makefile b/core/typescript37Action/Makefile new file mode 100644 index 000..373f831 --- /dev/null +++ b/core/typescript37Action/Makefile @@ -0,0 +1,32 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You 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 ex
[openwhisk] branch master updated: add standalone to dockerhub (#4801)
This is an automated email from the ASF dual-hosted git repository. msciabarra pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/openwhisk.git The following commit(s) were added to refs/heads/master by this push: new 51de9d7 add standalone to dockerhub (#4801) 51de9d7 is described below commit 51de9d70efe8aae3f6aa7bf0eedd236071aca74f Author: Michele Sciabarra AuthorDate: Fri Jan 17 18:20:59 2020 +0100 add standalone to dockerhub (#4801) Co-authored-by: Michele Sciabarra <30654959+sciabarra...@users.noreply.github.com> --- tools/jenkins/apache/dockerhub.groovy | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/jenkins/apache/dockerhub.groovy b/tools/jenkins/apache/dockerhub.groovy index 3206e37..e9eebd6 100644 --- a/tools/jenkins/apache/dockerhub.groovy +++ b/tools/jenkins/apache/dockerhub.groovy @@ -29,7 +29,7 @@ node('openwhisk1||openwhisk2||openwhisk3') { withCredentials([usernamePassword(credentialsId: 'openwhisk_dockerhub', passwordVariable: 'DOCKER_PASSWORD', usernameVariable: 'DOCKER_USER')]) { sh 'docker login -u ${DOCKER_USER} -p ${DOCKER_PASSWORD}' } - def PUSH_CMD = "./gradlew :core:controller:distDocker :core:invoker:distDocker :core:monitoring:user-events:distDocker :tools:ow-utils:distDocker :core:cosmos:cache-invalidator:distDocker -PdockerRegistry=docker.io -PdockerImagePrefix=openwhisk" + def PUSH_CMD = "./gradlew :core:controller:distDocker :core:invoker:distDocker :core:standalone:distDocker :core:monitoring:user-events:distDocker :tools:ow-utils:distDocker :core:cosmos:cache-invalidator:distDocker -PdockerRegistry=docker.io -PdockerImagePrefix=openwhisk" def gitCommit = sh(returnStdout: true, script: 'git rev-parse HEAD').trim() def shortCommit = gitCommit.take(7) sh "./gradlew clean"
[openwhisk] branch master updated: A docker image for the standalone openwhisk (#4782)
This is an automated email from the ASF dual-hosted git repository. msciabarra pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/openwhisk.git The following commit(s) were added to refs/heads/master by this push: new 165d957 A docker image for the standalone openwhisk (#4782) 165d957 is described below commit 165d9579764697d33919ce850c9613de2719b4cf Author: Michele Sciabarra <30654959+sciabarra...@users.noreply.github.com> AuthorDate: Tue Jan 14 08:33:43 2020 +0100 A docker image for the standalone openwhisk (#4782) * use system properties to set standalone host ip and name * show values * plaground support and dockerfile * fixes to the standalone docker image * making scancode happy making scalafmt happy * using stop, disabling launcher, publishing image, updated docs * licenses * adding cors support * fixed start.sh and docs * scancode * removing extra push * support for CONTAINER_EXTRA_ENV and JVM_EXTRA_ARGS * update readme * fixes - wait for the server ready * forgot file * rebuild * Update core/standalone/README.md Co-Authored-By: rodric rabbah * Update core/standalone/README.md Co-Authored-By: rodric rabbah * Update core/standalone/README.md Co-Authored-By: rodric rabbah Co-authored-by: rodric rabbah --- core/standalone/Dockerfile | 33 core/standalone/README.md | 35 + core/standalone/build.gradle | 6 +++ core/standalone/init | 27 + core/standalone/src/main/resources/standalone.conf | 16 .../openwhisk/standalone/PlaygroundLauncher.scala | 45 ++ .../openwhisk/standalone/PreFlightChecks.scala | 6 ++- .../standalone/StandaloneDockerSupport.scala | 33 .../openwhisk/standalone/StandaloneOpenWhisk.scala | 12 +- core/standalone/start.sh | 31 +++ core/standalone/stop | 18 + core/standalone/stop.sh| 18 + core/standalone/waitready | 22 +++ 13 files changed, 275 insertions(+), 27 deletions(-) diff --git a/core/standalone/Dockerfile b/core/standalone/Dockerfile new file mode 100644 index 000..6b01383 --- /dev/null +++ b/core/standalone/Dockerfile @@ -0,0 +1,33 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You 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. +# +FROM scala +ARG OPENWHISK_JAR +ENV DOCKER_VERSION=18.06.3-ce +ENV WSK_VERSION=1.0.0 +ADD init / +ADD stop waitready /bin/ +RUN chmod +x /bin/stop /bin/waitready ;\ + curl -sL \ + https://download.docker.com/linux/static/stable/x86_64/docker-${DOCKER_VERSION}.tgz \ + | tar xzvf - -C /usr/bin --strip 1 docker/docker ;\ + curl -sL \ + https://github.com/apache/openwhisk-cli/releases/download/${WSK_VERSION}/OpenWhisk_CLI-${WSK_VERSION}-linux-amd64.tgz \ + | tar xzvf - -C /usr/bin wsk +ADD ${OPENWHISK_JAR} /openwhisk-standalone.jar +WORKDIR / +EXPOSE 8080 +ENTRYPOINT ["/init"] diff --git a/core/standalone/README.md b/core/standalone/README.md index 4149508..ff19351 100644 --- a/core/standalone/README.md +++ b/core/standalone/README.md @@ -65,6 +65,12 @@ To pass argument to the run command use $ ./gradlew :core:standalone:bootRun --args='-m runtimes.json' ``` +You can also build a standalone docker image with: + +```bash +$ ./gradlew :core:standalone:distDocker +``` + ### Usage OpenWhisk standalone server support various launch options @@ -380,6 +386,35 @@ This shows an output like below indicating that KubernetesContainerFactory based } ``` +## Launching OpenWhisk standalone with Docker + +If you have docker and bash installed, you can launch the standalone openwhisk from the docker image with just: + +`bash <(curl -sL https://s.apache.org/openwhisk.sh)` + +If you do not want to execute arbitrary code straight from the net, you can look at [this script](start.sh), chec
[openwhisk-runtime-go] branch master updated: Fix bash test for api host. (#116)
This is an automated email from the ASF dual-hosted git repository. msciabarra pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/openwhisk-runtime-go.git The following commit(s) were added to refs/heads/master by this push: new 0cddebe Fix bash test for api host. (#116) 0cddebe is described below commit 0cddebeff3b92a628074c38ec7063ff34c1ada29 Author: rodric rabbah AuthorDate: Mon Dec 16 04:01:22 2019 -0500 Fix bash test for api host. (#116) --- .../src/test/scala/runtime/actionContainers/ActionLoopBasicTests.scala | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/src/test/scala/runtime/actionContainers/ActionLoopBasicTests.scala b/tests/src/test/scala/runtime/actionContainers/ActionLoopBasicTests.scala index 84a3bc5..e3edffe 100644 --- a/tests/src/test/scala/runtime/actionContainers/ActionLoopBasicTests.scala +++ b/tests/src/test/scala/runtime/actionContainers/ActionLoopBasicTests.scala @@ -65,11 +65,12 @@ class ActionLoopBasicTests extends BasicActionRunnerTests with WskActorSystem { |done """.stripMargin) + // the __OW_API_HOST should already be in the environment + // so it is not expected in/read from the input line override val testEnv = TestConfig( """#!/bin/bash |while read line |do - | __OW_API_HOST="$(echo "$line" | jq -r .api_host)" | __OW_API_KEY="$(echo "$line"| jq -r .api_key)" | __OW_NAMESPACE="$(echo "$line" | jq -r .namespace)" | __OW_ACTIVATION_ID="$(echo "$line" | jq -r .activation_id)"
[openwhisk-runtime-go] branch master updated: Export API host from parent process to child process. (#115)
This is an automated email from the ASF dual-hosted git repository. msciabarra pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/openwhisk-runtime-go.git The following commit(s) were added to refs/heads/master by this push: new 2dd688a Export API host from parent process to child process. (#115) 2dd688a is described below commit 2dd688a98c50550be19dbc9ca82ae489b81298ee Author: rodric rabbah AuthorDate: Sat Dec 14 12:38:33 2019 -0500 Export API host from parent process to child process. (#115) --- openwhisk/actionProxy.go | 1 + 1 file changed, 1 insertion(+) diff --git a/openwhisk/actionProxy.go b/openwhisk/actionProxy.go index e922e66..d9e7068 100644 --- a/openwhisk/actionProxy.go +++ b/openwhisk/actionProxy.go @@ -71,6 +71,7 @@ func NewActionProxy(baseDir string, compiler string, outFile *os.File, errFile * //SetEnv sets the environment func (ap *ActionProxy) SetEnv(env map[string]interface{}) { + ap.env["__OW_API_HOST"] = os.Getenv("__OW_API_HOST") for k, v := range env { s, ok := v.(string) if ok {
[openwhisk-runtime-go] branch master updated: Update for action version. (#113)
This is an automated email from the ASF dual-hosted git repository. msciabarra pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/openwhisk-runtime-go.git The following commit(s) were added to refs/heads/master by this push: new 3b629d8 Update for action version. (#113) 3b629d8 is described below commit 3b629d8f20934643c627c077ffe81c247d608576 Author: rodric rabbah AuthorDate: Thu Dec 12 05:25:10 2019 -0800 Update for action version. (#113) --- .../actionContainers/ActionLoopBasicGo12Tests.scala| 1 + .../runtime/actionContainers/ActionLoopBasicGoTests.scala | 1 + .../runtime/actionContainers/ActionLoopBasicTests.scala| 14 -- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/tests/src/test/scala/runtime/actionContainers/ActionLoopBasicGo12Tests.scala b/tests/src/test/scala/runtime/actionContainers/ActionLoopBasicGo12Tests.scala index d0b62c2..2973b59 100644 --- a/tests/src/test/scala/runtime/actionContainers/ActionLoopBasicGo12Tests.scala +++ b/tests/src/test/scala/runtime/actionContainers/ActionLoopBasicGo12Tests.scala @@ -94,6 +94,7 @@ class ActionLoopBasicGo12Tests |res["api_key"] = os.Getenv("__OW_API_KEY") |res["namespace"] = os.Getenv("__OW_NAMESPACE") |res["action_name"] = os.Getenv("__OW_ACTION_NAME") + |res["action_version"] = os.Getenv("__OW_ACTION_VERSION") |res["activation_id"] = os.Getenv("__OW_ACTIVATION_ID") |res["deadline"] = os.Getenv("__OW_DEADLINE") |return res diff --git a/tests/src/test/scala/runtime/actionContainers/ActionLoopBasicGoTests.scala b/tests/src/test/scala/runtime/actionContainers/ActionLoopBasicGoTests.scala index 948efa9..3b41567 100644 --- a/tests/src/test/scala/runtime/actionContainers/ActionLoopBasicGoTests.scala +++ b/tests/src/test/scala/runtime/actionContainers/ActionLoopBasicGoTests.scala @@ -94,6 +94,7 @@ class ActionLoopBasicGoTests |res["api_key"] = os.Getenv("__OW_API_KEY") |res["namespace"] = os.Getenv("__OW_NAMESPACE") |res["action_name"] = os.Getenv("__OW_ACTION_NAME") + |res["action_version"] = os.Getenv("__OW_ACTION_VERSION") |res["activation_id"] = os.Getenv("__OW_ACTIVATION_ID") |res["deadline"] = os.Getenv("__OW_DEADLINE") |return res diff --git a/tests/src/test/scala/runtime/actionContainers/ActionLoopBasicTests.scala b/tests/src/test/scala/runtime/actionContainers/ActionLoopBasicTests.scala index fe1f3aa..84a3bc5 100644 --- a/tests/src/test/scala/runtime/actionContainers/ActionLoopBasicTests.scala +++ b/tests/src/test/scala/runtime/actionContainers/ActionLoopBasicTests.scala @@ -69,18 +69,20 @@ class ActionLoopBasicTests extends BasicActionRunnerTests with WskActorSystem { """#!/bin/bash |while read line |do - | __OW_API_HOST="$(echo "$line" | jq -r .api_host)" - | __OW_API_KEY="$(echo "$line" | jq -r .api_key)" - | __OW_NAMESPACE="$(echo "$line" | jq -r .namespace)" - | __OW_ACTIVATION_ID="$(echo "$line" | jq -r .activation_id)" - | __OW_ACTION_NAME="$(echo "$line" | jq -r .action_name)" - | __OW_DEADLINE="$(echo "$line" | jq -r .deadline)" + | __OW_API_HOST="$(echo "$line" | jq -r .api_host)" + | __OW_API_KEY="$(echo "$line"| jq -r .api_key)" + | __OW_NAMESPACE="$(echo "$line" | jq -r .namespace)" + | __OW_ACTIVATION_ID="$(echo "$line" | jq -r .activation_id)" + | __OW_ACTION_NAME="$(echo "$line"| jq -r .action_name)" + | __OW_ACTION_VERSION="$(echo "$line" | jq -r .action_version)" + | __OW_DEADLINE="$(echo "$line" | jq -r .deadline)" | echo >&3 "{ \ | \"api_host\": \"$__OW_API_HOST\", \ | \"api_key\": \"$__OW_API_KEY\", \ | \"namespace\": \"$__OW_NAMESPACE\", \ | \"activation_id\": \"$__OW_ACTIVATION_ID\", \ | \"action_name\": \"$__OW_ACTION_NAME\", \ + | \"action_version\": \"$__OW_ACTION_VERSION\", \ | \"deadline\": \"$__OW_DEADLINE\" }" | done """.stripMargin)
[openwhisk-runtime-swift] branch master updated: Swift51 support (#107)
This is an automated email from the ASF dual-hosted git repository. msciabarra pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/openwhisk-runtime-swift.git The following commit(s) were added to refs/heads/master by this push: new 08ea221 Swift51 support (#107) 08ea221 is described below commit 08ea221ab76dd6c7bff4d52721ae0944b70f1af8 Author: Andrea Scuderi AuthorDate: Sat Nov 23 19:31:21 2019 + Swift51 support (#107) * support for swift 5.1 - wip * adding support for swift 5.1 * using the latest proxy * adding a test * adding the new 51 runtime * Update CI * implementing tests and binary compilation * making scancode happy * - Add Unit Test for SwiftRequest and SwiftyRequestCodable for swift 5 * fixed test compilation * use a single default runtime * force build * tests assming 4.2 is the default * Fix actionKind * Fix trailing space * Trailing whitespace * another whitespace * fixed test binaries * Update README * Add nightly build * reverted swift312 support --- .gitignore | 4 + .travis.yml| 5 + README.md | 110 +- ansible/environments/local/group_vars/all | 5 + core/swift51Action/Dockerfile | 49 ++ .../swift51Action/Package.swift| 43 +++--- core/swift51Action/_Whisk.swift| 167 + settings.gradle => core/swift51Action/build.gradle | 25 +-- settings.gradle => core/swift51Action/main.swift | 30 +--- core/swift51Action/swiftbuild.py | 119 +++ core/swift51Action/swiftbuild.py.launcher.swift| 133 .../swift51Action/swiftbuildandlink.sh | 15 +- settings.gradle| 2 + tests/build.gradle | 5 + .../dat/actions/HelloSwift5/Package.swift | 43 +++--- .../dat/actions/HelloSwift5/Sources/main.swift | 32 ++-- .../dat/actions/HelloSwift5Codable/Package.swift | 43 +++--- .../actions/HelloSwift5Codable/Sources/main.swift | 41 +++-- tests/dat/actions/Makefile | 16 +- tests/dat/actions/SwiftyRequest5/Package.resolved | 79 ++ .../dat/actions/SwiftyRequest5/Package.swift | 47 +++--- .../dat/actions/SwiftyRequest5/Sources/main.swift | 52 +++ .../actions/SwiftyRequestCodable5/Package.resolved | 79 ++ .../actions/SwiftyRequestCodable5/Package.swift| 47 +++--- .../SwiftyRequestCodable5/Sources/main.swift | 50 +++--- tests/dat/actions/sdk/swift5/createRule.swift | 36 + .../dat/actions/sdk/swift5/createTrigger.swift | 36 ++--- .../dat/actions/sdk/swift5/hello.swift | 32 ++-- tests/dat/actions/sdk/swift5/invoke.swift | 47 ++ .../dat/actions/sdk/swift5/invokeNonBlocking.swift | 42 ++ .../dat/actions/sdk/swift5/trigger.swift | 37 ++--- tests/dat/build.sh | 6 + tests/dat/build/swift311/HelloSwift3.zip | Bin 498321 -> 0 bytes tests/dat/build/swift4.1/HelloSwift4.zip | Bin 12049 -> 12053 bytes tests/dat/build/swift4.1/HelloSwift4Codable.zip| Bin 17234 -> 17237 bytes tests/dat/build/swift4.1/SwiftyRequest.zip | Bin 155592 -> 200346 bytes tests/dat/build/swift4.1/SwiftyRequestCodable.zip | Bin 158942 -> 203924 bytes tests/dat/build/swift5.1/HelloSwift5.zip | Bin 0 -> 12611 bytes tests/dat/build/swift5.1/HelloSwift5Codable.zip| Bin 0 -> 20600 bytes tests/dat/build/swift5.1/SwiftyRequest5.zip| Bin 0 -> 2427796 bytes tests/dat/build/swift5.1/SwiftyRequestCodable5.zip | Bin 0 -> 2433716 bytes .../Swift51ActionContainerTests.scala | 121 +++ .../Swift51CodableActionContainerTests.scala | 29 +--- .../test/scala/runtime/sdk/Swift51SDKTests.scala | 28 +--- tools/build/compile.sh | 5 +- tests/dat/build.sh => tools/build/compile5.sh | 20 +-- tools/travis/build.sh | 1 + tools/travis/publish.sh| 2 + 48 files changed, 1311 insertions(+), 372 deletions(-) diff --git a/.gitignore b/.gitignore index 100215f..557d0a1 100644 --- a/.gitignore +++ b/.gitignore @@ -72,6 +72,10 @@ ansible/roles/nginx/files/*cert.pem !tests/dat/build/swift4.1/SwiftyRequest.zip !tests/dat/build/swift4.1/SwiftyRequestCodable.zip !tests/dat/build/swift4.1/HelloSwift4Codable.zip +!tests/dat/build/swift5.1/HelloSwift5.zip +!tests/dat/build/swift5.1/HelloSwift5Codable.zip +!tests/dat/build/swift5.1/SwiftyRequest5.zip +!tests/dat/buil
[openwhisk-runtime-swift] branch master updated: travis - dist:xenial and language:java (#108)
This is an automated email from the ASF dual-hosted git repository. msciabarra pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/openwhisk-runtime-swift.git The following commit(s) were added to refs/heads/master by this push: new 8ec0ef6 travis - dist:xenial and language:java (#108) 8ec0ef6 is described below commit 8ec0ef6c4557f54925c882e282eaccc511c940c5 Author: David Grove AuthorDate: Sat Nov 23 03:50:13 2019 -0500 travis - dist:xenial and language:java (#108) --- .travis.yml | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 94c93f7..ae24d2d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -16,10 +16,9 @@ # sudo: required -group: deprecated-2017Q3 -language: scala -scala: - - 2.12.7 +dist: xenial +jdk: openjdk8 +language: java services: - docker
[openwhisk-runtime-go] branch master updated: reorder CHANGES.md to put most recent release at top (#107)
This is an automated email from the ASF dual-hosted git repository. msciabarra pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/openwhisk-runtime-go.git The following commit(s) were added to refs/heads/master by this push: new 11913df reorder CHANGES.md to put most recent release at top (#107) 11913df is described below commit 11913dff13b650b933b4697e7169b408cff26575 Author: David Grove AuthorDate: Thu Oct 3 10:38:01 2019 -0400 reorder CHANGES.md to put most recent release at top (#107) * reorder CHANGES.md to put most recent release at top * synchronize internal version number with external release number --- CHANGES.md | 18 +- README.md| 4 ++-- openwhisk/version.go | 2 +- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 66fc0c9..1167bd4 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -16,11 +16,10 @@ # limitations under the License. # --> -# ActionLoop v1.0.1 -- embedded file type detection -- now showing the commend -- librdkafka in golang image -- showing version numbuer with -debug +# 1.14.0 +- Removed the -incubation +- Now all runtimes use source release so no more actionloop-v2, renamed to actionloop-base +- upgraded to go 1.12.9 and 1.11.13 # Actionloop v2 Versioning @@ -36,7 +35,8 @@ ActionLoop for Scripting Languages - You can initalize multiple times when debugging - Removed gogradle plugin, now building directly with go -# Deincubation -- Removed the -incubation -- Now all runtimes use source release so no more actionloop-v2, renamed to actionloop-base -- upgraded to go 1.12.9 and 1.11.13 +# ActionLoop v1.0.1 +- embedded file type detection +- now showing the commend +- librdkafka in golang image +- showing version numbuer with -debug diff --git a/README.md b/README.md index ada9041..960d0a2 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,7 @@ [![License](https://img.shields.io/badge/license-Apache--2.0-blue.svg)](http://www.apache.org/licenses/LICENSE-2.0) [![Join Slack](https://img.shields.io/badge/join-slack-9B69A0.svg)](http://slack.openwhisk.org/) -This repository containst both the OpenWhisk runtime for Golang Actions, as well as a runtime for Generic executables. +This repository contains both the OpenWhisk runtime for Golang Actions, as well as a runtime for Generic executables. - If you are in a hurry, check the [examples](examples/EXAMPLES.md) - Writing Actions for the runtime in [Golang](docs/ACTION.md#golang) @@ -41,7 +41,7 @@ This repository containst both the OpenWhisk runtime for Golang Actions, as well # Change Log -[CHANGES.md](Here.) +[CHANGES.md](CHANGES.md) # License [Apache 2.0](LICENSE.txt) diff --git a/openwhisk/version.go b/openwhisk/version.go index 7b9a646..2bc050c 100644 --- a/openwhisk/version.go +++ b/openwhisk/version.go @@ -17,4 +17,4 @@ package openwhisk // Version number - internal -var Version = "2.1" +var Version = "1.14.0"
[openwhisk-runtime-go] branch master updated: remove incubator references in .travis.yml (#100)
This is an automated email from the ASF dual-hosted git repository. msciabarra pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/openwhisk-runtime-go.git The following commit(s) were added to refs/heads/master by this push: new d092eec remove incubator references in .travis.yml (#100) d092eec is described below commit d092eec0cb4e0162365976bfcc928ce54f5521c3 Author: David Grove AuthorDate: Thu Aug 22 12:38:14 2019 -0400 remove incubator references in .travis.yml (#100) --- .travis.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 83fbb52..c056115 100644 --- a/.travis.yml +++ b/.travis.yml @@ -36,19 +36,19 @@ deploy: on: tags: true all_branches: true - repo: apache/incubator-openwhisk-runtime-go + repo: apache/openwhisk-runtime-go - provider: script skip_cleanup: true script: "./tools/travis/publish.sh openwhisk actionloop nightly" on: branch: master - repo: apache/incubator-openwhisk-runtime-go + repo: apache/openwhisk-runtime-go - provider: script skip_cleanup: true script: "./tools/travis/publish.sh openwhisk 1.11 nightly && ./tools/travis/publish.sh openwhisk 1.12 nightly" on: branch: master - repo: apache/incubator-openwhisk-runtime-go + repo: apache/openwhisk-runtime-go env: global: - secure: GNKMZjEW1BKBb8NSiFB/Bogh0V5co5TefLLaj9oYJrKCP8rheFY4mWwINR74dYwSFIVmBhuuwZCm62zZwzb2TTivjQihOwU9SeTaUvJHlcLu6j1T/gTcMX5dkDOrdzqZaKoU5NpMbvad1fnDfEG9oU/VE7fARAxziZ2yBXOGkt2p2whkGXrs43gMyRKJv7ytUwpjvzhD48hJHgn0Eq6EwVIYxO5gJfGAhiA0ucH75c3jI4yEz7sw7SaoFxAQRL7VICaTH8JI+tKWU673HCclIRiPeZWQ23rI/f3MV8SNTKJm0GtnjM8LA9uC96qV6f5aXMn1EdaMGoCQbR9jBeqZG7pq8O2QHA/1eNNDw5sCISS05plCJ2yz/G4PUndnuToKm/sx6/qbdRA3QzTrNQfwTTcuUi+j4mYEFANgT774CeGdnajfNy4cZoeVEFmBTXdi5V1DuFLujSQrzRSHddHHUQXGUMaz4q [...]
[openwhisk-runtime-go] branch master updated: de-incubation (#99)
This is an automated email from the ASF dual-hosted git repository. msciabarra pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/openwhisk-runtime-go.git The following commit(s) were added to refs/heads/master by this push: new dd0b580 de-incubation (#99) dd0b580 is described below commit dd0b580fe7ad991b229164f2803577841dfb6bec Author: Michele Sciabarra <30654959+sciabarra...@users.noreply.github.com> AuthorDate: Sun Aug 4 15:16:42 2019 +0200 de-incubation (#99) --- CHANGES.md | 3 +++ CONTRIBUTING.md| 2 +- DISCLAIMER.txt | 1 - README.md | 5 + actionloop/build.gradle| 2 +- examples/bash-hello/Makefile | 2 +- examples/golang-hello-single/Makefile | 2 +- examples/golang-hello-vendor/Makefile | 2 +- examples/golang-main-package/Makefile | 2 +- examples/golang-main-single/Makefile | 2 +- examples/golang-main-standalone/Makefile | 2 +- examples/golang-main-vendor/Makefile | 2 +- go.mod | 2 +- main/proxy.go | 2 +- .../runtime/actionContainers/ActionLoopBasicTests.scala| 2 +- .../actionContainers/ActionLoopContainerTests.scala| 2 +- tools/scancode/ASF-Release.cfg | 14 +++--- tools/travis/build.sh | 2 +- tools/travis/scan.sh | 2 +- tools/travis/setup.sh | 4 ++-- 20 files changed, 28 insertions(+), 29 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index a2c8710..d52c7d9 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -36,3 +36,6 @@ ActionLoop for Scripting Languages - You can initalize multiple times when debugging - Removed gogradle plugin, now building directly with go +# Deincubation +- Removed the -incubation +- Now all runtimes use source release so no more actionloop-v2, renamed to actionloop-base diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 0f7f858..8e1076e 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -55,7 +55,7 @@ A good enhancement request comes with an explanation of what you are trying to d ### Discussion Please use the project's developer email list to engage our community: -[d...@openwhisk.incubator.apache.org](d...@openwhisk.incubator.apache.org) +[d...@openwhisk.apache.org](d...@openwhisk.apache.org) In addition, we provide a "dev" Slack team channel for conversations at: https://openwhisk-team.slack.com/messages/dev/ diff --git a/DISCLAIMER.txt b/DISCLAIMER.txt deleted file mode 100644 index f7a5c4e..000 --- a/DISCLAIMER.txt +++ /dev/null @@ -1 +0,0 @@ -Apache OpenWhisk Runtime Go is an effort undergoing incubation at The Apache Software Foundation (ASF), sponsored by the Apache Incubator. Incubation is required of all newly accepted projects until a further review indicates that the infrastructure, communications, and decision making process have stabilized in a manner consistent with other successful ASF projects. While incubation status is not necessarily a reflection of the completeness or stability of the code, it does indicate tha [...] diff --git a/README.md b/README.md index 88c634b..ada9041 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ --> # Apache OpenWhisk Runtimes for Go -[![Build Status](https://travis-ci.org/apache/incubator-openwhisk-runtime-go.svg?branch=master)](https://travis-ci.org/apache/incubator-openwhisk-runtime-go) +[![Build Status](https://travis-ci.org/apache/openwhisk-runtime-go.svg?branch=master)](https://travis-ci.org/apache/openwhisk-runtime-go) [![License](https://img.shields.io/badge/license-Apache--2.0-blue.svg)](http://www.apache.org/licenses/LICENSE-2.0) [![Join Slack](https://img.shields.io/badge/join-slack-9B69A0.svg)](http://slack.openwhisk.org/) @@ -46,6 +46,3 @@ This repository containst both the OpenWhisk runtime for Golang Actions, as well # License [Apache 2.0](LICENSE.txt) -# Disclaimer - -Apache OpenWhisk Runtime Go is an effort undergoing incubation at The Apache Software Foundation (ASF), sponsored by the Apache Incubator. Incubation is required of all newly accepted projects until a further review indicates that the infrastructure, communications, and decision making process have stabilized in a manner consistent with other successful ASF projects. While incubation status is not necessarily a reflection of the completeness or stability of the code, it does indicate tha [...] diff --git a/actionloop/build.gradle b/actionloop/build.gradle index
[incubator-openwhisk-runtime-swift] branch master updated: remove the pre-optimize latest images (#100)
This is an automated email from the ASF dual-hosted git repository. msciabarra pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-openwhisk-runtime-swift.git The following commit(s) were added to refs/heads/master by this push: new e8309a6 remove the pre-optimize latest images (#100) e8309a6 is described below commit e8309a6a026a1f2438776023f387d1b6b9c82a64 Author: Carlos Santana AuthorDate: Mon Jul 22 05:27:05 2019 -0400 remove the pre-optimize latest images (#100) * change from latest to nighly * use actionloop nightly --- core/swift42Action/Dockerfile | 8 tools/travis/build.sh | 12 ++-- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/core/swift42Action/Dockerfile b/core/swift42Action/Dockerfile index e3e018b..94961d6 100644 --- a/core/swift42Action/Dockerfile +++ b/core/swift42Action/Dockerfile @@ -14,7 +14,7 @@ # See the License for the specific language governing permissions and # limitations under the License. # -FROM openwhisk/actionloop as builder +FROM openwhisk/actionloop:nightly as builder FROM swift:4.2 @@ -39,9 +39,9 @@ COPY Package.swift /swiftAction/ COPY buildandrecord.py /swiftAction/ COPY main.swift /swiftAction/Sources/ RUN swift build -c release; \ -touch /swiftAction/Sources/main.swift; \ -rm /swiftAction/.build/release/Action; \ -/swiftAction/buildandrecord.py + touch /swiftAction/Sources/main.swift; \ + rm /swiftAction/.build/release/Action; \ + /swiftAction/buildandrecord.py ENV OW_COMPILER=/bin/compile diff --git a/tools/travis/build.sh b/tools/travis/build.sh index b8a18c4..8458314 100755 --- a/tools/travis/build.sh +++ b/tools/travis/build.sh @@ -37,12 +37,12 @@ scancode/scanCode.py --config scancode/ASF-Release.cfg $ROOTDIR cd $WHISKDIR #pull down images -docker pull openwhisk/controller -docker tag openwhisk/controller ${IMAGE_PREFIX}/controller -docker pull openwhisk/invoker -docker tag openwhisk/invoker ${IMAGE_PREFIX}/invoker -docker pull openwhisk/nodejs6action -docker tag openwhisk/nodejs6action nodejs6action +docker pull openwhisk/controller:nightly +docker tag openwhisk/controller:nightly ${IMAGE_PREFIX}/controller +docker pull openwhisk/invoker:nightly +docker tag openwhisk/invoker:nightly ${IMAGE_PREFIX}/invoker +docker pull openwhisk/nodejs6action:nightly +docker tag openwhisk/nodejs6action:nightly nodejs6action TERM=dumb ./gradlew install
[incubator-openwhisk-runtime-rust] branch master updated: actionloop source (#11)
This is an automated email from the ASF dual-hosted git repository. msciabarra pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-openwhisk-runtime-rust.git The following commit(s) were added to refs/heads/master by this push: new 1602ce6 actionloop source (#11) 1602ce6 is described below commit 1602ce643fedb6fcf3aac4db6f7b1aff386501f5 Author: Michele Sciabarra <30654959+sciabarra...@users.noreply.github.com> AuthorDate: Thu Jul 18 20:36:57 2019 +0200 actionloop source (#11) * actionloop source * fixed paths --- rust1.34/Dockerfile | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/rust1.34/Dockerfile b/rust1.34/Dockerfile index 8e03ab6..d9eae1d 100644 --- a/rust1.34/Dockerfile +++ b/rust1.34/Dockerfile @@ -14,7 +14,14 @@ # See the License for the specific language governing permissions and # limitations under the License. # -FROM openwhisk/actionloop-v2:4376fee as builder +FROM golang:1.11 as builder +ENV PROXY_SOURCE=https://github.com/apache/incubator-openwhisk-runtime-go/archive/golang1...@1.13.0-incubating.tar.gz +RUN curl -L "$PROXY_SOURCE" | tar xzf - \ + && mkdir -p src/github.com/apache \ + && mv incubator-openwhisk-runtime-go-golang1.11-1.13.0-incubating \ + src/github.com/apache/incubator-openwhisk-runtime-go \ + && cd src/github.com/apache/incubator-openwhisk-runtime-go/main \ + && CGO_ENABLED=0 go build -o /bin/proxy FROM rust:1.34 COPY --from=builder /bin/proxy /bin/proxy RUN mkdir -p /action
[incubator-openwhisk-runtime-php] branch master updated: Bump php runtimes to version 7.1.29, 7.2.19 and 7.3.5. (#59)
This is an automated email from the ASF dual-hosted git repository. msciabarra pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-openwhisk-runtime-php.git The following commit(s) were added to refs/heads/master by this push: new e8034ff Bump php runtimes to version 7.1.29, 7.2.19 and 7.3.5. (#59) e8034ff is described below commit e8034ff1f9d7c44196b2d932b0341ceebdb6353c Author: falkzoll AuthorDate: Tue May 21 12:43:53 2019 +0200 Bump php runtimes to version 7.1.29, 7.2.19 and 7.3.5. (#59) * The new versions contain bug fixes and security fixes. --- core/php7.1Action/CHANGELOG.md | 6 +- core/php7.1Action/Dockerfile | 2 +- core/php7.2Action/CHANGELOG.md | 6 +- core/php7.2Action/Dockerfile | 2 +- core/php7.3Action/CHANGELOG.md | 5 - core/php7.3Action/Dockerfile | 2 +- 6 files changed, 17 insertions(+), 6 deletions(-) diff --git a/core/php7.1Action/CHANGELOG.md b/core/php7.1Action/CHANGELOG.md index 19c1044..fb32ed1 100644 --- a/core/php7.1Action/CHANGELOG.md +++ b/core/php7.1Action/CHANGELOG.md @@ -17,7 +17,11 @@ # --> -## Apache 1.13.0-incubating (next release) +## Apache 1.14.0-incubating (next release) +Changes: + - Update version of PHP to 7.1.29 + +## Apache 1.13.0-incubating Changes: - Update version of PHP to 7.1.27 diff --git a/core/php7.1Action/Dockerfile b/core/php7.1Action/Dockerfile index 20a198b..bc29fc6 100644 --- a/core/php7.1Action/Dockerfile +++ b/core/php7.1Action/Dockerfile @@ -15,7 +15,7 @@ # limitations under the License. # -FROM php:7.1.27-alpine +FROM php:7.1.29-alpine RUN \ apk update && apk upgrade && \ diff --git a/core/php7.2Action/CHANGELOG.md b/core/php7.2Action/CHANGELOG.md index 083bbd1..202c105 100644 --- a/core/php7.2Action/CHANGELOG.md +++ b/core/php7.2Action/CHANGELOG.md @@ -17,7 +17,11 @@ # --> -## Apache 1.13.0-incubating (next release) +## Apache 1.14.0-incubating (next release) +Changes: + - Update version of PHP to 7.2.18 + +## Apache 1.13.0-incubating Changes: - Update version of PHP to 7.2.16 diff --git a/core/php7.2Action/Dockerfile b/core/php7.2Action/Dockerfile index 1edf14d..225592d 100644 --- a/core/php7.2Action/Dockerfile +++ b/core/php7.2Action/Dockerfile @@ -15,7 +15,7 @@ # limitations under the License. # -FROM php:7.2.16-alpine +FROM php:7.2.18-alpine RUN \ apk update && apk upgrade && \ diff --git a/core/php7.3Action/CHANGELOG.md b/core/php7.3Action/CHANGELOG.md index b7740cf..bef4c7e 100644 --- a/core/php7.3Action/CHANGELOG.md +++ b/core/php7.3Action/CHANGELOG.md @@ -16,8 +16,11 @@ # limitations under the License. # --> +## Apache 1.14.0-incubating (next release) +Changes: + - Update version of PHP to 7.3.5 -## Apache 1.13.0-incubating (next release) +## Apache 1.13.0-incubating Initial release - Added: PHP: 7.3.3 diff --git a/core/php7.3Action/Dockerfile b/core/php7.3Action/Dockerfile index 6131ba7..1088032 100644 --- a/core/php7.3Action/Dockerfile +++ b/core/php7.3Action/Dockerfile @@ -23,7 +23,7 @@ RUN curl -L "$PROXY_SOURCE" | tar xzf - \ src/github.com/apache/incubator-openwhisk-runtime-go \ && cd src/github.com/apache/incubator-openwhisk-runtime-go/main \ && CGO_ENABLED=0 go build -o /bin/proxy -FROM php:7.3.3-cli-stretch +FROM php:7.3.5-cli-stretch # install dependencies RUN \
[incubator-openwhisk-runtime-python] branch master updated: use actionloop sources (#59)
This is an automated email from the ASF dual-hosted git repository. msciabarra pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-openwhisk-runtime-python.git The following commit(s) were added to refs/heads/master by this push: new 6e9370a use actionloop sources (#59) 6e9370a is described below commit 6e9370a4cfb7a19b34b354df3ff1d92937a474c1 Author: Michele Sciabarra <30654959+sciabarra...@users.noreply.github.com> AuthorDate: Sun May 19 21:37:21 2019 +0200 use actionloop sources (#59) --- core/pythonActionLoop/Dockerfile | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/core/pythonActionLoop/Dockerfile b/core/pythonActionLoop/Dockerfile index b2daade..3664030 100644 --- a/core/pythonActionLoop/Dockerfile +++ b/core/pythonActionLoop/Dockerfile @@ -14,7 +14,14 @@ # See the License for the specific language governing permissions and # limitations under the License. # -FROM openwhisk/actionloop:latest as builder +FROM golang:1.11 as builder +ENV PROXY_SOURCE=https://github.com/apache/incubator-openwhisk-runtime-go/archive/golang1...@v1.13.0-incubating.tar.gz +RUN curl -L "$PROXY_SOURCE" | tar xzf - \ + && mkdir -p src/github.com/apache \ + && mv incubator-openwhisk-runtime-go-golang1.11-v1.13.0-incubating \ + src/github.com/apache/incubator-openwhisk-runtime-go \ + && cd src/github.com/apache/incubator-openwhisk-runtime-go/main \ + && CGO_ENABLED=0 go build -o /bin/proxy FROM python:3.7-stretch
[incubator-openwhisk-runtime-java] branch publish-java8actionloop created (now 78b82a1)
This is an automated email from the ASF dual-hosted git repository. msciabarra pushed a change to branch publish-java8actionloop in repository https://gitbox.apache.org/repos/asf/incubator-openwhisk-runtime-java.git. at 78b82a1 push java8 actionloop This branch includes the following new commits: new 78b82a1 push java8 actionloop The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference.
[incubator-openwhisk-runtime-java] 01/01: push java8 actionloop
This is an automated email from the ASF dual-hosted git repository. msciabarra pushed a commit to branch publish-java8actionloop in repository https://gitbox.apache.org/repos/asf/incubator-openwhisk-runtime-java.git commit 78b82a10dc59482442d2986162a9af563cdc1095 Author: Michele Sciabarra AuthorDate: Sun May 19 21:34:04 2019 +0200 push java8 actionloop --- .travis.yml | 5 + tools/travis/publish.sh | 2 ++ 2 files changed, 7 insertions(+) diff --git a/.travis.yml b/.travis.yml index 936b1ef..99aa983 100644 --- a/.travis.yml +++ b/.travis.yml @@ -37,6 +37,11 @@ deploy: on: branch: master repo: apache/incubator-openwhisk-runtime-java + - provider: script +script: "./tools/travis/publish.sh openwhisk 8a latest" +on: + branch: master + repo: apache/incubator-openwhisk-runtime-java env: global: - secure: D4kU9O6bs63Myb4jaEgw1O2Kuy6aTAUKEX1qZ0eYMDouLnPOPnZaFWmpISKTrJyz7hJH7yY8Cj7xl5qwsLB6JZZMtqT6yj5J/jkUJjyLKdQH81PrYy22rH99xS2t5A1dsC0A/Bf39R/qNc5tx1wCMVDF4O2rFsUtn+8vE+rn0nXsiPeWhhZagk/Hrq8YbwzDJHOGHfWe1nZIcU8MORzTriX7J2VAF0AcirPandMxff4FgzNLk432DN2GvgZIlNtZGT1DWLtJV/Sp3unD9abXr5xqNDIW+fHrMq8j/JdHC6+PFtZRFrl0Vr6X8c61PkB/ELGF2MyzNgBTnEaJixl1pianr91WK4y0oLUwpSJCz4yoQGVimAAtqMgNXjEyFMcpLClzS5TjMXKaUfi9mBn9GMCwLi3VAuVtMtH2IRW03PxIPyxkbj1j8Nrd0jh408MuMpuzyECgb+E5ffbd+0YD5XUNlTkYLFi4 [...] diff --git a/tools/travis/publish.sh b/tools/travis/publish.sh index 601d950..26fd15f 100755 --- a/tools/travis/publish.sh +++ b/tools/travis/publish.sh @@ -34,6 +34,8 @@ if [ ${RUNTIME_VERSION} == "8" ]; then RUNTIME="java8" elif [ ${RUNTIME_VERSION} == "10" ]; then RUNTIME="java10" +elif [ ${RUNTIME_VERSION} == "8a" ]; then + RUNTIME="java8actionloop" fi if [[ ! -z ${DOCKER_USER} ]] && [[ ! -z ${DOCKER_PASSWORD} ]]; then
[incubator-openwhisk-runtime-ruby] branch master updated: actionloop use source (#21)
This is an automated email from the ASF dual-hosted git repository. msciabarra pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-openwhisk-runtime-ruby.git The following commit(s) were added to refs/heads/master by this push: new ef40347 actionloop use source (#21) ef40347 is described below commit ef40347d774a824fce0f73474c22d407bf5b9e3d Author: Michele Sciabarra <30654959+sciabarra...@users.noreply.github.com> AuthorDate: Wed May 15 16:34:36 2019 +0200 actionloop use source (#21) --- core/ruby2.6ActionLoop/Dockerfile | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/core/ruby2.6ActionLoop/Dockerfile b/core/ruby2.6ActionLoop/Dockerfile index c1ab75f..814608e 100644 --- a/core/ruby2.6ActionLoop/Dockerfile +++ b/core/ruby2.6ActionLoop/Dockerfile @@ -14,7 +14,14 @@ # See the License for the specific language governing permissions and # limitations under the License. # -FROM openwhisk/actionloop-v2:latest as builder +FROM golang:1.11 as builder +ENV PROXY_SOURCE=https://github.com/apache/incubator-openwhisk-runtime-go/archive/golang1...@v1.13.0-incubating.tar.gz +RUN curl -L "$PROXY_SOURCE" | tar xzf - \ + && mkdir -p src/github.com/apache \ + && mv incubator-openwhisk-runtime-go-golang1.11-v1.13.0-incubating \ + src/github.com/apache/incubator-openwhisk-runtime-go \ + && cd src/github.com/apache/incubator-openwhisk-runtime-go/main \ + && CGO_ENABLED=0 go build -o /bin/proxy FROM ruby:2.6.2-alpine3.9 RUN mkdir -p /proxy/bin /proxy/lib /proxy/action WORKDIR /proxy
[incubator-openwhisk-runtime-java] branch master updated: Actionloop java (#84)
This is an automated email from the ASF dual-hosted git repository. msciabarra pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-openwhisk-runtime-java.git The following commit(s) were added to refs/heads/master by this push: new 3c7a7b9 Actionloop java (#84) 3c7a7b9 is described below commit 3c7a7b90a661157dfc322f51370bb115a70d4631 Author: Michele Sciabarra <30654959+sciabarra...@users.noreply.github.com> AuthorDate: Sun May 12 22:01:46 2019 +0200 Actionloop java (#84) --- .gitignore | 6 + .travis.yml| 6 +- .../openwhisk/runtime/java/action/JarLoader.java | 1 - core/java8actionloop/Dockerfile| 48 ++ core/java8actionloop/Makefile | 55 +++ core/java8actionloop/bin/compile | 129 +++ .../java8actionloop/build.gradle | 22 +-- core/java8actionloop/lib/src/Launcher.java | 177 + settings.gradle| 1 + .../JavaActionContainerTests.scala | 169 +++- .../JavaActionLoopContainerTests.scala | 29 ++-- .../JavaActionLoopSourceTests.scala| 134 tools/invoke.py| 135 13 files changed, 800 insertions(+), 112 deletions(-) diff --git a/.gitignore b/.gitignore index f65f024..1baf0a6 100644 --- a/.gitignore +++ b/.gitignore @@ -10,6 +10,11 @@ default.props results *.retry +# Java artifacts +*.class +*.jar +*.zip + # Environments /ansible/environments/* !/ansible/environments/distributed @@ -70,3 +75,4 @@ ansible/roles/nginx/files/*cert.pem !tests/dat/actions/python_virtualenv_dir.zip !tests/dat/actions/python_virtualenv_name.zip !tests/dat/actions/zippedaction.zip + diff --git a/.travis.yml b/.travis.yml index 685e8e8..936b1ef 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,7 +8,11 @@ scala: - 2.12.7 services: - docker - +# required to support multi-stage build +addons: + apt: + packages: + - docker-ce notifications: email: false webhooks: diff --git a/core/java8/proxy/src/main/java/org/apache/openwhisk/runtime/java/action/JarLoader.java b/core/java8/proxy/src/main/java/org/apache/openwhisk/runtime/java/action/JarLoader.java index 03f7c90..e17d0a9 100644 --- a/core/java8/proxy/src/main/java/org/apache/openwhisk/runtime/java/action/JarLoader.java +++ b/core/java8/proxy/src/main/java/org/apache/openwhisk/runtime/java/action/JarLoader.java @@ -68,7 +68,6 @@ public class JarLoader extends URLClassLoader { if (m.getReturnType() != JsonObject.class || !Modifier.isStatic(modifiers) || !Modifier.isPublic(modifiers)) { throw new NoSuchMethodException("main"); } - this.mainMethod = m; } diff --git a/core/java8actionloop/Dockerfile b/core/java8actionloop/Dockerfile new file mode 100644 index 000..53b4f35 --- /dev/null +++ b/core/java8actionloop/Dockerfile @@ -0,0 +1,48 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You 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. +# +FROM golang:1.12 as builder +RUN env CGO_ENABLED=0 go get github.com/apache/incubator-openwhisk-runtime-go/main + +FROM adoptopenjdk/openjdk8:x86_64-ubuntu-jdk8u212-b03 + +RUN rm -rf /var/lib/apt/lists/* && apt-get clean && apt-get update \ + && apt-get install -y --no-install-recommends locales python vim \ + && rm -rf /var/lib/apt/lists/* \ + && locale-gen en_US.UTF-8 + +ENV LANG="en_US.UTF-8" \ + LANGUAGE="en_US:en" \ + LC_ALL="en_US.UTF-8" \ + VERSION=8 \ + UPDATE=212 \ + BUILD=3 + +RUN locale-gen en_US.UTF-8 ;\ +mkdir -p /javaAction/action /usr/java/src /usr/java/lib + +WORKDIR /javaAction +COPY --from=builder /go/bin/main /bin/proxy + +ADD https://search.maven.org/remotecontent?filepath=com/google/code/gson/gson/2.8.5/gson-2.8.5.jar /usr/java/lib/gson-2.8.5.jar +ADD lib/src/Launcher.java /usr/java/src/Launcher.java +RUN cd /usr/java/src ;\ +javac -cp /usr/java/lib/gson-2.8
[incubator-openwhisk-runtime-php] branch master updated: use released sources to build actionloop proxy (#56)
This is an automated email from the ASF dual-hosted git repository. msciabarra pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-openwhisk-runtime-php.git The following commit(s) were added to refs/heads/master by this push: new cc1e0ac use released sources to build actionloop proxy (#56) cc1e0ac is described below commit cc1e0ac19ffa8afadb1e7f1dd1cfa8831cf2912c Author: Michele Sciabarra <30654959+sciabarra...@users.noreply.github.com> AuthorDate: Sun May 12 22:01:00 2019 +0200 use released sources to build actionloop proxy (#56) --- core/php7.3Action/Dockerfile | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/core/php7.3Action/Dockerfile b/core/php7.3Action/Dockerfile index 1b203b1..67fcd5d 100644 --- a/core/php7.3Action/Dockerfile +++ b/core/php7.3Action/Dockerfile @@ -15,8 +15,14 @@ # limitations under the License. # -FROM openwhisk/actionloop:42fd5e6 as builder - +FROM golang:1.11 as builder +ENV PROXY_SOURCE=https://github.com/apache/incubator-openwhisk-runtime-go/archive/golang1...@v1.13.0-incubating.tar.gz +RUN curl -L "$PROXY_SOURCE" | tar xzf - \ + && mkdir -p src/github.com/apache \ + && mv incubator-openwhisk-runtime-go-golang1.11-v1.13.0-incubating \ + src/github.com/apache/incubator-openwhisk-runtime-go \ + && cd src/github.com/apache/incubator-openwhisk-runtime-go/main \ + && CGO_ENABLED=0 go build -o /bin/proxy FROM php:7.3.3-cli-stretch # install dependencies
[incubator-openwhisk-runtime-go] branch master updated: Go12 jar support (#88)
This is an automated email from the ASF dual-hosted git repository. msciabarra pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-openwhisk-runtime-go.git The following commit(s) were added to refs/heads/master by this push: new 1cbb963 Go12 jar support (#88) 1cbb963 is described below commit 1cbb96383502ca6df45058d966927c0796c31fbd Author: Michele Sciabarra <30654959+sciabarra...@users.noreply.github.com> AuthorDate: Fri May 10 14:29:30 2019 +0200 Go12 jar support (#88) * supporting jars as is for java runtime * implementing go 1.12 * do not use goBuild any more * get some libs --- .gitignore | 2 + CHANGES.md | 5 + actionloop/build.gradle| 3 + build.gradle | 27 - common/gobuild.py | 3 +- go.mod | 5 + go.sum | 7 ++ golang1.11/build.gradle| 14 ++- golang1.12/Dockerfile | 21 {golang1.11 => golang1.12}/build.gradle| 17 ++- openwhisk/_test/build.sh | 4 + openwhisk/_test/jar/META-INF/MANIFEST.MF | 4 + openwhisk/_test/jar/hello.txt | 2 + openwhisk/compiler.go | 1 + openwhisk/extractor.go | 6 + openwhisk/extractor_test.go| 25 + openwhisk/filetype.go | 1 + openwhisk/initHandler.go | 3 +- openwhisk/runHandler.go| 2 +- openwhisk/util_test.go | 4 +- openwhisk/version.go | 2 +- openwhisk/zip.go | 30 - openwhisk/zip_test.go | 18 ++- settings.gradle| 1 + .../ActionLoopBasicGo12Tests.scala | 125 + ...ts.scala => ActionLoopGo12ContainerTests.scala} | 12 +- .../ActionLoopGoContainerTests.scala | 6 +- tools/travis/build.sh | 4 +- tools/travis/setup.sh | 2 + tools/travis/test.sh | 5 +- 30 files changed, 300 insertions(+), 61 deletions(-) diff --git a/.gitignore b/.gitignore index 7eacee2..6862d66 100644 --- a/.gitignore +++ b/.gitignore @@ -14,6 +14,7 @@ vendor/ common/proxy actionloop/proxy golang1.11/proxy +golang1.12/proxy # Go test transient files openwhisk/_test/exec @@ -22,6 +23,7 @@ openwhisk/_test/hi openwhisk/_test/hello_greeting openwhisk/_test/hello_message openwhisk/_test/*.zip +openwhisk/_test/*.jar openwhisk/_test/compile/ openwhisk/_test/output/ openwhisk/action/ diff --git a/CHANGES.md b/CHANGES.md index c9a557b..a2c8710 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -31,3 +31,8 @@ ActionLoop for Scripting Languages - any script starting with '#!' is recognized as executable - now the -compile will zip the entire directory of the `bin` directory after compilation - if you upload a folder `src/exec` the entire directory is moved to `bin`, including other uploaded files +- Support for Go 1.12.4 +- Support for jar not expanded for Java when set OW_SAVE_JAR +- You can initalize multiple times when debugging +- Removed gogradle plugin, now building directly with go + diff --git a/actionloop/build.gradle b/actionloop/build.gradle index 00b18da..5464137 100644 --- a/actionloop/build.gradle +++ b/actionloop/build.gradle @@ -23,6 +23,9 @@ distDocker.finalizedBy('cleanup') task staticBuildProxy(type: Exec) { environment CGO_ENABLED: "0" + environment GOOS: "linux" + environment GOARCH: "amd64" + commandLine 'go', 'build', '-o', 'proxy', '-a', '-ldflags', '-extldflags "-static"', diff --git a/build.gradle b/build.gradle index c4d7384..26f542d 100644 --- a/build.gradle +++ b/build.gradle @@ -24,35 +24,8 @@ buildscript { } } -plugins { -id 'com.github.blindpirate.gogradle' version '0.8.1' -} - -dependencies { -golang { -build 'github.com/sirupsen/logrus@v1.1.0' -test 'github.com/stretchr/testify@v1.2.1' -} -} - - subprojects { apply plugin: 'scalafmt' scalafmt.configFilePath = gradle.scalafmt.config } -golang { - packagePath = 'github.com/apache/incubator-openwhisk-runtime-go' - goVersion = '1.11.6' -} - -build.dependsOn vendor - -build { - targetPl
[incubator-openwhisk-deploy-kube] branch master updated: configure Jobs with backoffLimit instead of activeDeadlineSeconds (#457)
This is an automated email from the ASF dual-hosted git repository. msciabarra pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-openwhisk-deploy-kube.git The following commit(s) were added to refs/heads/master by this push: new caba286 configure Jobs with backoffLimit instead of activeDeadlineSeconds (#457) caba286 is described below commit caba286eeb8f316b35a2a9c0f3933c8aa957875f Author: David Grove AuthorDate: Tue Apr 30 16:05:35 2019 -0400 configure Jobs with backoffLimit instead of activeDeadlineSeconds (#457) We want jobs to run until either they've completed or they have failed multiple times (and thus we want to give up). Should make deployment more robust when it takes a very long time for the invoker to docker pull all the runtime images (the install-packages job will not start until there is at least one healthy invoker). --- helm/openwhisk/templates/couchdb-init-job.yaml | 2 +- helm/openwhisk/templates/install-packages-job.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/helm/openwhisk/templates/couchdb-init-job.yaml b/helm/openwhisk/templates/couchdb-init-job.yaml index ab8194b..7d7 100644 --- a/helm/openwhisk/templates/couchdb-init-job.yaml +++ b/helm/openwhisk/templates/couchdb-init-job.yaml @@ -10,7 +10,7 @@ metadata: name: {{ .Release.Name }}-init-couchdb {{ include "openwhisk.label_boilerplate" . | indent 4 }} spec: - activeDeadlineSeconds: 600 + backoffLimit: 3 template: metadata: name: {{ .Release.Name }}-init-couchdb diff --git a/helm/openwhisk/templates/install-packages-job.yaml b/helm/openwhisk/templates/install-packages-job.yaml index 003a32a..553ff88 100644 --- a/helm/openwhisk/templates/install-packages-job.yaml +++ b/helm/openwhisk/templates/install-packages-job.yaml @@ -9,7 +9,7 @@ metadata: name: {{ .Release.Name }}-install-packages {{ include "openwhisk.label_boilerplate" . | indent 4 }} spec: - activeDeadlineSeconds: 900 + backoffLimit: 3 template: metadata: name: {{ .Release.Name }}-install-packages
[incubator-openwhisk-deploy-kube] branch master updated: Add Helm chart support for replicated Kafka instances (#451)
This is an automated email from the ASF dual-hosted git repository. msciabarra pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-openwhisk-deploy-kube.git The following commit(s) were added to refs/heads/master by this push: new d48dd35 Add Helm chart support for replicated Kafka instances (#451) d48dd35 is described below commit d48dd359dc31ebfcdbf715030afe95ca7ab8592e Author: David Grove AuthorDate: Tue Apr 30 16:05:13 2019 -0400 Add Helm chart support for replicated Kafka instances (#451) Fixes #354. --- docs/configurationChoices.md | 16 ++--- helm/openwhisk/templates/_helpers.tpl| 20 +++- helm/openwhisk/templates/controller-pod.yaml | 4 +--- helm/openwhisk/templates/invoker-pod.yaml| 2 +- helm/openwhisk/templates/kafka-pod.yaml | 36 +--- helm/openwhisk/templates/kafka-pvc.yaml | 2 +- helm/openwhisk/templates/kafka-svc.yaml | 5 ++-- helm/openwhisk/values.yaml | 1 - 8 files changed, 50 insertions(+), 36 deletions(-) diff --git a/docs/configurationChoices.md b/docs/configurationChoices.md index 1ca7df5..b5dbcbd 100644 --- a/docs/configurationChoices.md +++ b/docs/configurationChoices.md @@ -36,14 +36,14 @@ controller: replicaCount: 2 ``` -NOTE: The Helm-based deployment does not yet support setting the replicaCount -to be greater than 1 for the following components: -- apigateway -- couchdb -- kafka -- kafkaprovider -- redis -We are actively working on reducing this list and would welcome PRs to help. +NOTE: setting the replicaCount to be greater than 1 for the following +components is not currently supported: +- apigateway and redis. Running only a single replica of these services is + unlikely to be a significant scalability bottleneck. +- couchdb. For production deployments of OpenWhisk on Kubernetes, we strongly recomend running + CouchDB externally to OpenWhisk as described below. An external CouchDB instance enables + better management of the database and decouples its lifecycle from that of the OpenWhisk deployment. +- The event providers: alarmprovider, cloudantprovider, and kafkaprovider. ### Using an external database diff --git a/helm/openwhisk/templates/_helpers.tpl b/helm/openwhisk/templates/_helpers.tpl index 9929801..2cd28ba 100644 --- a/helm/openwhisk/templates/_helpers.tpl +++ b/helm/openwhisk/templates/_helpers.tpl @@ -41,17 +41,12 @@ app: {{ template "openwhisk.fullname" . }} {{ .Values.db.auth.username }}:{{ .Values.db.auth.password }} {{- end -}} -{{/* hostname for kafka */}} -{{- define "openwhisk.kafka_host" -}} -{{ .Release.Name }}-kafka.{{ .Release.Namespace }}.svc.{{ .Values.k8s.domain }} -{{- end -}} - {{/* hostname for redis */}} {{- define "openwhisk.redis_host" -}} {{ .Release.Name }}-redis.{{ .Release.Namespace }}.svc.{{ .Values.k8s.domain }} {{- end -}} -{{/* client connection string for zookeeper cluster (server1:port server2:port ... serverN:port)*/}} +{{/* client connection string for zookeeper cluster (server1:port,server2:port, ... serverN:port)*/}} {{- define "openwhisk.zookeeper_connect" -}} {{- $zkname := printf "%s-zookeeper" .Release.Name }} {{- $zkport := .Values.zookeeper.port }} @@ -65,6 +60,19 @@ app: {{ template "openwhisk.fullname" . }} {{ $zkname }}-0.{{ $zkname }}.{{ $.Release.Namespace }}.svc.{{ .Values.k8s.domain }} {{- end -}} +{{/* client connection string for kafka cluster (server1:port,server2:port, ... serverN:port)*/}} +{{- define "openwhisk.kafka_connect" -}} +{{- $kname := printf "%s-kafka" .Release.Name }} +{{- $kport := .Values.kafka.port }} +{{- $kubeDomain := .Values.k8s.domain }} +{{- range $i, $e := until (int .Values.kafka.replicaCount) -}}{{ if ne $i 0 }},{{ end }}{{ $kname }}-{{ . }}.{{ $kname }}.{{ $.Release.Namespace }}.svc.{{ $kubeDomain }}:{{ $kport }}{{ end }} +{{- end -}} + +{{/* host name for server.0 in kafka cluster */}} +{{- define "openwhisk.kafka_zero_host" -}} +{{- $kname := printf "%s-kafka" .Release.Name }} +{{ $kname }}-0.{{ $kname }}.{{ $.Release.Namespace }}.svc.{{ .Values.k8s.domain }} +{{- end -}} {{/* Runtimes manifest */}} {{- define "openwhisk.runtimes_manifest" -}} diff --git a/helm/openwhisk/templates/controller-pod.yaml b/helm/openwhisk/templates/controller-pod.yaml index 56e5caf..95b134f 100644 --- a/helm/openwhisk/templates/controller-pod.yaml +++ b/helm/openwhisk/templates/controller-pod.yaml @@ -96,9 +96,7 @@ spec: # Kafka properties - name: "KAFKA_HOSTS" - value: "{{ include "openwhisk.kafka_host" . }}:{{ .Values.kafka.port }}" -- name: "KAFKA_HOST_PORT" - value: {{ .Values.kafka.port | quote }} + value: "{{ include "openwhisk.kafka_connect" . }}" {{
[incubator-openwhisk-devtools] branch master updated: updating starter kit (#247)
This is an automated email from the ASF dual-hosted git repository. msciabarra pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-openwhisk-devtools.git The following commit(s) were added to refs/heads/master by this push: new aab4ebe updating starter kit (#247) aab4ebe is described below commit aab4ebedf7fb951c6b97207c2c13632e9a35e91b Author: Michele Sciabarra <30654959+sciabarra...@users.noreply.github.com> AuthorDate: Thu Apr 25 06:56:27 2019 +0200 updating starter kit (#247) * updating starter kit * reformatted scala tests * license header in single test * scancode fixes * readme * licenses again --- README.md | 1 + actionloop-starter-kit/README.md | 4 +- actionloop-starter-kit/example/Makefile| 27 +-- actionloop-starter-kit/example/__main__.py | 1 + actionloop-starter-kit/example/hello.py| 2 + actionloop-starter-kit/python3.7/Dockerfile| 2 +- actionloop-starter-kit/python3.7/Makefile | 8 ++-- actionloop-starter-kit/python3.7/lib/launcher.py | 3 +- .../ActionLoopPythonBasicTests.scala | 23 - .../runtime/actionContainers/SingleTest.scala | 54 ++ 10 files changed, 89 insertions(+), 36 deletions(-) diff --git a/README.md b/README.md index 0f4a2eb..9d024b6 100644 --- a/README.md +++ b/README.md @@ -31,6 +31,7 @@ This repository is part of [Apache OpenWhisk](http://openwhisk.incubator.apache. * [node-local](node-local/README.md) allows testing individual OpenWhisk functions locally, using only node.js. This is ideal if you are writing node.js functions to run in OpenWhisk, but need to emulate some of OpenWhisk's behavior in creating `params` and expecting promises. * [maven-java](maven-java/README.md) allows testing OpenWhisk Java Actions. This shows how to package the function dependencies e.g. external jar. * [knative-build](knative-build/README.md) contains Knative Build Templates along with modified versions of their respective OpenWhisk Action Runtimes that can be used to Build and Serve Knative compatible applications on Kubernetes. +* [actionloop-starter-kit](actionloop-starter-kit/README.md) contains a starter kit to build a new runtime using the ActionLoop proxy used in Go, Swift, PHP, Python and Rust runtimes. ## Travis builds diff --git a/actionloop-starter-kit/README.md b/actionloop-starter-kit/README.md index 5503242..27a75e4 100644 --- a/actionloop-starter-kit/README.md +++ b/actionloop-starter-kit/README.md @@ -16,7 +16,9 @@ # limitations under the License. # --> -# ActionLoop Started Kit +# ActionLoop Starter Kit Use the content of this folder to build your own ActionLoop based runtime. + + diff --git a/actionloop-starter-kit/example/Makefile b/actionloop-starter-kit/example/Makefile index 67d9468..4d06833 100644 --- a/actionloop-starter-kit/example/Makefile +++ b/actionloop-starter-kit/example/Makefile @@ -1,26 +1,27 @@ -IMG=actionloop/actionloop-demo-python-v3.7:latest +IMG=actionloop-demo-python-v3.7:latest ACT=hello-demo-python +PREFIX=docker.io/openwhisk -src.zip: +src.zip: main.rb hello.py zip src.zip __main__.py hello.py bin.zip: src.zip docker run -i $(IMG) -compile main bin.zip -single: - wsk action update $(ACT) hello.py --docker $(IMG) --main hello - -src-zip: src.zip - wsk action update $(ACT) $< --docker $(IMG) - -bin-zip: bin.zip - wsk action update $(ACT) $< --docker $(IMG) - -test: +test-single: + wsk action update $(ACT) hello.py --docker $(PREFIX)/$(IMG) --main hello wsk action invoke $(ACT) -r wsk action invoke $(ACT) -p name Mike -r -.PHONE: single src-zip bin-zip +test-src-zip: src.zip + wsk action update $(ACT) $< --docker $(PREFIX)/$(IMG) + wsk action invoke $(ACT) -r + wsk action invoke $(ACT) -p name Mike -r +test-bin-zip: bin.zip + wsk action update $(ACT) $< --docker $(PREFIX)/$(IMG) + wsk action invoke $(ACT) -r + wsk action invoke $(ACT) -p name Mike -r +.PHONE: test-single test-src-zip test-bin-zip diff --git a/actionloop-starter-kit/example/__main__.py b/actionloop-starter-kit/example/__main__.py index c2c04cc..a7187c9 100644 --- a/actionloop-starter-kit/example/__main__.py +++ b/actionloop-starter-kit/example/__main__.py @@ -14,6 +14,7 @@ # See the License for the specific language governing permissions and # limitations under the License. # + import hello def main(args): diff --git a/actionloop-starter-kit/example/hello.py b/actionloop-starter-kit/example/hello.py index 9f41943..1ad9cc0 100644 --- a/actionloop-starter-kit/example/hello.py +++ b/actionloop-starter-kit/example/hello.py @@ -14,7 +14,9 @@ # See the License for the specific language governing permissions and # limitations under the Lic
[incubator-openwhisk-deploy-kube] branch master updated: propagate DB_PROTOCOL to ansible jobs (#454)
This is an automated email from the ASF dual-hosted git repository. msciabarra pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-openwhisk-deploy-kube.git The following commit(s) were added to refs/heads/master by this push: new 03b073f propagate DB_PROTOCOL to ansible jobs (#454) 03b073f is described below commit 03b073f727000a3dff6da931dade1e8a67d9110e Author: David Grove AuthorDate: Wed Apr 24 01:54:08 2019 -0400 propagate DB_PROTOCOL to ansible jobs (#454) Fixes #453. --- helm/openwhisk/configMapFiles/initCouchDB/initdb.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/helm/openwhisk/configMapFiles/initCouchDB/initdb.sh b/helm/openwhisk/configMapFiles/initCouchDB/initdb.sh index d6171e5..9755f24 100755 --- a/helm/openwhisk/configMapFiles/initCouchDB/initdb.sh +++ b/helm/openwhisk/configMapFiles/initCouchDB/initdb.sh @@ -25,6 +25,7 @@ pushd /openwhisk/ansible ansible-playbook -i environments/local setup.yml ansible-playbook -i environments/local couchdb.yml --tags ini \ -e db_prefix=$DB_PREFIX \ + -e db_protocol=$DB_PROTOCOL \ -e db_host=$DB_HOST \ -e db_username=$COUCHDB_USER \ -e db_password=$COUCHDB_PASSWORD \ @@ -51,6 +52,7 @@ curl --silent -X PUT -u "$COUCHDB_USER:$COUCHDB_PASSWORD" $DB_PROTOCOL://$DB_HOS pushd /openwhisk/ansible ansible-playbook -i environments/local initdb.yml \ -e db_prefix=$DB_PREFIX \ + -e db_protocol=$DB_PROTOCOL \ -e db_host=$DB_HOST \ -e db_username=$COUCHDB_USER \ -e db_password=$COUCHDB_PASSWORD \ @@ -59,6 +61,7 @@ pushd /openwhisk/ansible ansible-playbook -i environments/local wipe.yml \ -e db_prefix=$DB_PREFIX \ + -e db_protocol=$DB_PROTOCOL \ -e db_host=$DB_HOST \ -e db_username=$COUCHDB_USER \ -e db_password=$COUCHDB_PASSWORD \
[incubator-openwhisk-deploy-kube] branch master updated: tweak titles of k8s vendor doc files (#455)
This is an automated email from the ASF dual-hosted git repository. msciabarra pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-openwhisk-deploy-kube.git The following commit(s) were added to refs/heads/master by this push: new acbc44a tweak titles of k8s vendor doc files (#455) acbc44a is described below commit acbc44a302c6822bd437d0b558a06cd61360774b Author: David Grove AuthorDate: Wed Apr 24 01:52:33 2019 -0400 tweak titles of k8s vendor doc files (#455) --- docs/k8s-aws.md| 2 +- docs/k8s-dind-cluster.md | 2 +- docs/k8s-docker-for-mac.md | 2 +- docs/k8s-docker-for-windows.md | 2 +- docs/k8s-google.md | 2 +- docs/k8s-ibm-private.md| 2 +- docs/k8s-ibm-public.md | 2 +- docs/k8s-minikube.md | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/docs/k8s-aws.md b/docs/k8s-aws.md index de4cd79..4e0ffee 100644 --- a/docs/k8s-aws.md +++ b/docs/k8s-aws.md @@ -17,7 +17,7 @@ # --> -# Amazon EKS for OpenWhisk +# Deploying OpenWhisk on Amazon EKS ## Overview diff --git a/docs/k8s-dind-cluster.md b/docs/k8s-dind-cluster.md index 659b3df..0673123 100644 --- a/docs/k8s-dind-cluster.md +++ b/docs/k8s-dind-cluster.md @@ -18,7 +18,7 @@ --> -# Using kubeadm-dind-cluster for OpenWhisk +# Deploying OpenWhisk on kubeadm-dind-cluster ## Overview diff --git a/docs/k8s-docker-for-mac.md b/docs/k8s-docker-for-mac.md index 1b95f68..087ec5c 100644 --- a/docs/k8s-docker-for-mac.md +++ b/docs/k8s-docker-for-mac.md @@ -17,7 +17,7 @@ # --> -# Using Kubernetes in Docker for Mac for OpenWhisk +# Deploying OpenWhisk on Kubernetes in Docker for Mac ## Overview diff --git a/docs/k8s-docker-for-windows.md b/docs/k8s-docker-for-windows.md index aa04a4c..fd02bb3 100644 --- a/docs/k8s-docker-for-windows.md +++ b/docs/k8s-docker-for-windows.md @@ -17,7 +17,7 @@ # --> -# Using Kubernetes in Docker for Windows for OpenWhisk +# Deploying OpenWhisk on Kubernetes in Docker for Windows ## Overview diff --git a/docs/k8s-google.md b/docs/k8s-google.md index 7a68777..2484e1e 100644 --- a/docs/k8s-google.md +++ b/docs/k8s-google.md @@ -17,7 +17,7 @@ # --> -# Google GKE for OpenWhisk +# Deploying OpenWhisk on Google GKE ## Overview diff --git a/docs/k8s-ibm-private.md b/docs/k8s-ibm-private.md index b8b341d..21c12fc 100644 --- a/docs/k8s-ibm-private.md +++ b/docs/k8s-ibm-private.md @@ -17,7 +17,7 @@ # --> -# IBM IKS for OpenWhisk +# Deploying OpenWhisk on IBM Cloud Private (ICP) ## Overview diff --git a/docs/k8s-ibm-public.md b/docs/k8s-ibm-public.md index e1584a7..1f2ff72 100644 --- a/docs/k8s-ibm-public.md +++ b/docs/k8s-ibm-public.md @@ -17,7 +17,7 @@ # --> -# IBM IKS for OpenWhisk +# Deploying OpenWhisk on IBM Cloud Kubernetes Service (IKS) ## Overview diff --git a/docs/k8s-minikube.md b/docs/k8s-minikube.md index 85972c8..20decf4 100644 --- a/docs/k8s-minikube.md +++ b/docs/k8s-minikube.md @@ -17,7 +17,7 @@ # --> -# Using Minikube for OpenWhisk +# Deploying OpenWhisk on Minikube ## Overview
[incubator-openwhisk-runtime-ruby] branch master updated: actionloop ruby (#20)
This is an automated email from the ASF dual-hosted git repository. msciabarra pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-openwhisk-runtime-ruby.git The following commit(s) were added to refs/heads/master by this push: new 5d598f9 actionloop ruby (#20) 5d598f9 is described below commit 5d598f98ac5c77bd3c9b259c7921e9d7f4c60e3a Author: Michele Sciabarra <30654959+sciabarra...@users.noreply.github.com> AuthorDate: Sun Apr 14 23:42:31 2019 +0200 actionloop ruby (#20) * actionloop ruby * whitespace :( * whitespace, again :((( * update docker * different way to update docker * os-release * installing the right docker for trusty * missing sudo * missing bin/compile * formatting scala... * tests and licenses * reformat scala --- .travis.yml| 8 +- .../setup.sh => core/ruby2.6ActionLoop/Dockerfile | 28 +++ core/ruby2.6ActionLoop/bin/compile | 79 +++ .../ruby2.6ActionLoop/build.gradle | 21 + core/ruby2.6ActionLoop/lib/launcher.rb | 58 ++ settings.gradle| 1 + .../Ruby26ActionLoopContainerTests.scala | 91 ++ tools/travis/setup.sh | 9 +++ 8 files changed, 257 insertions(+), 38 deletions(-) diff --git a/.travis.yml b/.travis.yml index cdc2109..4909a5f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,6 +9,7 @@ scala: services: - docker before_install: +- "cat /etc/os-release" - "./tools/travis/setup.sh" install: true script: @@ -21,7 +22,12 @@ deploy: all_branches: true repo: apache/incubator-openwhisk-runtime-ruby - provider: script - script: "./tools/travis/publish.sh openwhisk ruby2.5Action latest" + script: "./tools/travis/publish.sh openwhisk ruby2.5Action latest" + on: +branch: master +repo: apache/incubator-openwhisk-runtime-ruby +- provider: script + script: "./tools/travis/publish.sh openwhisk ruby2.6ActionLoop latest" on: branch: master repo: apache/incubator-openwhisk-runtime-ruby diff --git a/tools/travis/setup.sh b/core/ruby2.6ActionLoop/Dockerfile old mode 100755 new mode 100644 similarity index 63% copy from tools/travis/setup.sh copy to core/ruby2.6ActionLoop/Dockerfile index 3424cdb..c1ab75f --- a/tools/travis/setup.sh +++ b/core/ruby2.6ActionLoop/Dockerfile @@ -1,4 +1,3 @@ -#!/bin/bash # # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with @@ -15,20 +14,13 @@ # See the License for the specific language governing permissions and # limitations under the License. # - -set -e - -# Build script for Travis-CI. - -SCRIPTDIR=$(cd $(dirname "$0") && pwd) -ROOTDIR="$SCRIPTDIR/../.." -HOMEDIR="$SCRIPTDIR/../../../" - -# clone OpenWhisk utilities repo. in order to run scanCode -cd $HOMEDIR -git clone https://github.com/apache/incubator-openwhisk-utilities.git - -# clone main openwhisk repo. for testing purposes -git clone --depth=1 https://github.com/apache/incubator-openwhisk.git openwhisk -cd openwhisk -./tools/travis/setup.sh +FROM openwhisk/actionloop-v2:latest as builder +FROM ruby:2.6.2-alpine3.9 +RUN mkdir -p /proxy/bin /proxy/lib /proxy/action +WORKDIR /proxy +COPY --from=builder bin/proxy /bin/proxy +ADD lib/launcher.rb /proxy/lib/launcher.rb +ADD bin/compile /proxy/bin/compile +RUN apk update && apk add python3 +ENV OW_COMPILER=/proxy/bin/compile +ENTRYPOINT ["/bin/proxy"] diff --git a/core/ruby2.6ActionLoop/bin/compile b/core/ruby2.6ActionLoop/bin/compile new file mode 100755 index 000..7ad0bf6 --- /dev/null +++ b/core/ruby2.6ActionLoop/bin/compile @@ -0,0 +1,79 @@ +#!/usr/bin/env python3 +"""Python Action Builder +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You 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. +# +""" + +from __future__ import print_function +import os, sys, codecs, shutil +from os.path import abspath, ex
[incubator-openwhisk-runtime-go] branch master updated: Will our heroes be able to build a static go executable with travis? (#84)
This is an automated email from the ASF dual-hosted git repository. msciabarra pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-openwhisk-runtime-go.git The following commit(s) were added to refs/heads/master by this push: new 4376fee Will our heroes be able to build a static go executable with travis? (#84) 4376fee is described below commit 4376fee901651749cb44367cd4ba47dd9a36cc13 Author: Michele Sciabarra <30654959+sciabarra...@users.noreply.github.com> AuthorDate: Wed Apr 10 15:11:03 2019 +0200 Will our heroes be able to build a static go executable with travis? (#84) * reverting again * desperate means call for desperate measures * fixed the whitespaces --- actionloop/build.gradle | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/actionloop/build.gradle b/actionloop/build.gradle index 4daba91..00b18da 100644 --- a/actionloop/build.gradle +++ b/actionloop/build.gradle @@ -18,12 +18,15 @@ ext.dockerImageName = 'actionloop-v2' apply from: '../gradle/docker.gradle' -distDocker.dependsOn 'copyProxy' +distDocker.dependsOn 'staticBuildProxy' distDocker.finalizedBy('cleanup') -task copyProxy(type: Copy) { -from '../common/proxy' -into '.' +task staticBuildProxy(type: Exec) { + environment CGO_ENABLED: "0" + commandLine 'go', 'build', + '-o', 'proxy', '-a', + '-ldflags', '-extldflags "-static"', + '../main/proxy.go' } task cleanup(type: Delete) {
[incubator-openwhisk-runtime-go] branch master updated: Reverting the wrong fix (#82)
This is an automated email from the ASF dual-hosted git repository. msciabarra pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-openwhisk-runtime-go.git The following commit(s) were added to refs/heads/master by this push: new db2ccaa Reverting the wrong fix (#82) db2ccaa is described below commit db2ccaa71c4de7123436c518973546aa0d2a2d17 Author: Michele Sciabarra <30654959+sciabarra...@users.noreply.github.com> AuthorDate: Wed Apr 10 08:37:56 2019 +0200 Reverting the wrong fix (#82) * fixes the push * reverted
[incubator-openwhisk-devtools] branch master updated: Actionloop sdk (#225)
This is an automated email from the ASF dual-hosted git repository. msciabarra pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-openwhisk-devtools.git The following commit(s) were added to refs/heads/master by this push: new a27454c Actionloop sdk (#225) a27454c is described below commit a27454cd845ef1b7b2ceda72d3c73723a74084dd Author: Michele Sciabarra <30654959+sciabarra...@users.noreply.github.com> AuthorDate: Wed Mar 27 12:42:33 2019 +0100 Actionloop sdk (#225) * example with tests * fixed scan errors --- actionloop-starter-kit/.gitattributes | 31 actionloop-starter-kit/.gitignore | 36 + actionloop-starter-kit/.scalafmt.conf | 9 ++ actionloop-starter-kit/.travis.yml | 47 ++ actionloop-starter-kit/README.md | 22 +++ actionloop-starter-kit/build.gradle| 31 actionloop-starter-kit/example/Makefile| 26 actionloop-starter-kit/example/__main__.py | 20 +++ actionloop-starter-kit/example/hello.py| 20 +++ actionloop-starter-kit/gradle/README.md| 64 actionloop-starter-kit/gradle/docker.gradle| 116 ++ .../gradle/wrapper/gradle-wrapper.jar | Bin 0 -> 54708 bytes .../gradle/wrapper/gradle-wrapper.properties | 8 + actionloop-starter-kit/gradlew | 172 + actionloop-starter-kit/gradlew.bat | 84 ++ actionloop-starter-kit/python3.7/Dockerfile| 25 +++ actionloop-starter-kit/python3.7/Makefile | 40 + actionloop-starter-kit/python3.7/bin/compile | 79 ++ actionloop-starter-kit/python3.7/build.gradle | 19 +++ actionloop-starter-kit/python3.7/lib/launcher.py | 49 ++ actionloop-starter-kit/settings.gradle | 36 + actionloop-starter-kit/tests/build.gradle | 44 ++ .../ActionLoopPythonBasicTests.scala | 94 +++ actionloop-starter-kit/tools/invoke.py | 135 actionloop-starter-kit/tools/travis/build.sh | 43 ++ actionloop-starter-kit/tools/travis/publish.sh | 64 actionloop-starter-kit/tools/travis/setup.sh | 34 actionloop-starter-kit/tools/travis/test.sh| 30 28 files changed, 1378 insertions(+) diff --git a/actionloop-starter-kit/.gitattributes b/actionloop-starter-kit/.gitattributes new file mode 100644 index 000..b19d1c0 --- /dev/null +++ b/actionloop-starter-kit/.gitattributes @@ -0,0 +1,31 @@ +# Auto detect text files and perform LF normalization. +# Resources: +# - https://www.kernel.org/pub/software/scm/git/docs/gitattributes.html +# - http://davidlaing.com/2012/09/19/customise-your-gitattributes-to-become-a-git-ninja/ +# - https://help.github.com/articles/dealing-with-line-endings/ +* text=auto + +*.gotext eol=lf +*.java text +*.jstext +*.mdtext +*.pytext eol=lf +*.scala text +*.shtext eol=lf +*.gradletext +*.xml text +*.bat text eol=crlf + +*.jar binary +*.png binary + +# python files not having the .py extension +tools/cli/wsk text eol=lf +tools/cli/wskadmin text eol=lf + +# bash files not having the .sh extension +tools/vagrant/simple/wsktext eol=lf +gradlew text eol=lf +core/javaAction/proxy/gradlew text eol=lf +tools/vagrant/hello text eol=lf +sdk/docker/client/actiontext eol=lf diff --git a/actionloop-starter-kit/.gitignore b/actionloop-starter-kit/.gitignore new file mode 100644 index 000..514b1e1 --- /dev/null +++ b/actionloop-starter-kit/.gitignore @@ -0,0 +1,36 @@ +action/ +results/ +logs/ +out/ +build/ +*.retry + +# Linux +*~ + +# Mac +.DS_Store + +# Gradle +.gradle +build/ +!/tools/build/ + +# Python +.ipynb_checkpoints/ +*.pyc + +# NodeJS +node_modules + +# Vagrant +.vagrant* + +# IntelliJ +.idea +*.class +*.iml +out/ + +# .zip files must be explicited whitelisted +*.zip diff --git a/actionloop-starter-kit/.scalafmt.conf b/actionloop-starter-kit/.scalafmt.conf new file mode 100644 index 000..7084efe --- /dev/null +++ b/actionloop-starter-kit/.scalafmt.conf @@ -0,0 +1,9 @@ +# Licensed to the Apache Software Foundation (ASF) under one or more contributor +# license agreements; and to You under the Apache License, Version 2.0. + +style = intellij +danglingParentheses = false +maxColumn = 120 +docstrings = JavaDoc +rewrite.rules = [SortImports] +project.git = true diff --git a/actionloop-starter-kit/.travis.yml b/actionloop-starter-kit/.travis.yml new file mode 100644 index 000..79b2212 --- /dev/null +++ b/actionloop-starter-kit/.travis.yml @@ -0,0 +1,47 @@ +# Licensed to the Apache Software Foundation (ASF) under on
[incubator-openwhisk-runtime-rust] branch master updated: Rdiaz82/test implementation (#7)
This is an automated email from the ASF dual-hosted git repository. msciabarra pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-openwhisk-runtime-rust.git The following commit(s) were added to refs/heads/master by this push: new b6d9599 Rdiaz82/test implementation (#7) b6d9599 is described below commit b6d95996f178f7b4541837a188bc33dcb100b735 Author: Roberto Diaz AuthorDate: Sun Mar 24 13:44:43 2019 + Rdiaz82/test implementation (#7) * modified the launcher to support a Hashmap as action result and some minor warnings removed * removed some compilation warnings * optimization in error path * test implementation * modified how to set env variables * minor changes * changes in tests * removed .travis.yml * fixed failing test --- .gitattributes | 31 .gitignore | 36 + .scalafmt.conf | 9 ++ build.gradle | 31 gradle/README.md | 64 gradle/docker.gradle | 116 ++ gradle/wrapper/gradle-wrapper.jar | Bin 0 -> 54708 bytes gradle/wrapper/gradle-wrapper.properties | 8 + gradlew| 172 + gradlew.bat| 84 ++ rust1.32/Dockerfile| 3 +- rust1.32/build.gradle | 19 +++ rust1.32/src/action_loop/src/main.rs | 6 +- settings.gradle| 36 + tests/build.gradle | 44 ++ .../ActionLoopRustBasicTests.scala | 137 tools/invoke.py| 135 rust1.32/Dockerfile => tools/travis/build.sh | 37 +++-- tools/travis/publish.sh| 64 rust1.32/Dockerfile => tools/travis/setup.sh | 28 ++-- rust1.32/Dockerfile => tools/travis/test.sh| 24 +-- 21 files changed, 1052 insertions(+), 32 deletions(-) diff --git a/.gitattributes b/.gitattributes new file mode 100755 index 000..b19d1c0 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,31 @@ +# Auto detect text files and perform LF normalization. +# Resources: +# - https://www.kernel.org/pub/software/scm/git/docs/gitattributes.html +# - http://davidlaing.com/2012/09/19/customise-your-gitattributes-to-become-a-git-ninja/ +# - https://help.github.com/articles/dealing-with-line-endings/ +* text=auto + +*.gotext eol=lf +*.java text +*.jstext +*.mdtext +*.pytext eol=lf +*.scala text +*.shtext eol=lf +*.gradletext +*.xml text +*.bat text eol=crlf + +*.jar binary +*.png binary + +# python files not having the .py extension +tools/cli/wsk text eol=lf +tools/cli/wskadmin text eol=lf + +# bash files not having the .sh extension +tools/vagrant/simple/wsktext eol=lf +gradlew text eol=lf +core/javaAction/proxy/gradlew text eol=lf +tools/vagrant/hello text eol=lf +sdk/docker/client/actiontext eol=lf diff --git a/.gitignore b/.gitignore new file mode 100755 index 000..514b1e1 --- /dev/null +++ b/.gitignore @@ -0,0 +1,36 @@ +action/ +results/ +logs/ +out/ +build/ +*.retry + +# Linux +*~ + +# Mac +.DS_Store + +# Gradle +.gradle +build/ +!/tools/build/ + +# Python +.ipynb_checkpoints/ +*.pyc + +# NodeJS +node_modules + +# Vagrant +.vagrant* + +# IntelliJ +.idea +*.class +*.iml +out/ + +# .zip files must be explicited whitelisted +*.zip diff --git a/.scalafmt.conf b/.scalafmt.conf new file mode 100755 index 000..7084efe --- /dev/null +++ b/.scalafmt.conf @@ -0,0 +1,9 @@ +# Licensed to the Apache Software Foundation (ASF) under one or more contributor +# license agreements; and to You under the Apache License, Version 2.0. + +style = intellij +danglingParentheses = false +maxColumn = 120 +docstrings = JavaDoc +rewrite.rules = [SortImports] +project.git = true diff --git a/build.gradle b/build.gradle new file mode 100755 index 000..26f542d --- /dev/null +++ b/build.gradle @@ -0,0 +1,31 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You 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.or
[incubator-openwhisk-runtime-go] branch master updated: rename actionProxy to actionloop in travis file (#75)
This is an automated email from the ASF dual-hosted git repository. msciabarra pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-openwhisk-runtime-go.git The following commit(s) were added to refs/heads/master by this push: new 7b7ad3a rename actionProxy to actionloop in travis file (#75) 7b7ad3a is described below commit 7b7ad3a75fd5ada2dd4d71083ea26a1250a87e1d Author: Carlos Santana AuthorDate: Mon Mar 18 12:49:05 2019 -0400 rename actionProxy to actionloop in travis file (#75) --- .travis.yml | 50 +- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/.travis.yml b/.travis.yml index e169de4..a5928fd 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,38 +4,38 @@ sudo: required language: go go: -- "1.11.5" + - "1.11.5" services: -- docker + - docker notifications: email: true before_install: -- "./tools/travis/setup.sh" + - "./tools/travis/setup.sh" install: true script: -- "./tools/travis/scan.sh && ./tools/travis/build.sh && ./tools/travis/test.sh" + - "./tools/travis/scan.sh && ./tools/travis/build.sh && ./tools/travis/test.sh" after_failure: cat .gogradle/reports/test/index.html deploy: -- provider: script - skip_cleanup: true - script: "./tools/travis/publish.sh openwhisk ${TRAVIS_TAG%@*} ${TRAVIS_TAG##*@}" - on: -tags: true -all_branches: true -repo: apache/incubator-openwhisk-runtime-go -- provider: script - skip_cleanup: true - script: "./tools/travis/publish.sh openwhisk actionProxyLoop latest" - on: -branch: master -repo: apache/incubator-openwhisk-runtime-go -- provider: script - skip_cleanup: true - script: "./tools/travis/publish.sh openwhisk golang1.11 latest" - on: -branch: master -repo: apache/incubator-openwhisk-runtime-go + - provider: script +skip_cleanup: true +script: "./tools/travis/publish.sh openwhisk ${TRAVIS_TAG%@*} ${TRAVIS_TAG##*@}" +on: + tags: true + all_branches: true + repo: apache/incubator-openwhisk-runtime-go + - provider: script +skip_cleanup: true +script: "./tools/travis/publish.sh openwhisk actionloop latest" +on: + branch: master + repo: apache/incubator-openwhisk-runtime-go + - provider: script +skip_cleanup: true +script: "./tools/travis/publish.sh openwhisk golang1.11 latest" +on: + branch: master + repo: apache/incubator-openwhisk-runtime-go env: global: - - secure: GNKMZjEW1BKBb8NSiFB/Bogh0V5co5TefLLaj9oYJrKCP8rheFY4mWwINR74dYwSFIVmBhuuwZCm62zZwzb2TTivjQihOwU9SeTaUvJHlcLu6j1T/gTcMX5dkDOrdzqZaKoU5NpMbvad1fnDfEG9oU/VE7fARAxziZ2yBXOGkt2p2whkGXrs43gMyRKJv7ytUwpjvzhD48hJHgn0Eq6EwVIYxO5gJfGAhiA0ucH75c3jI4yEz7sw7SaoFxAQRL7VICaTH8JI+tKWU673HCclIRiPeZWQ23rI/f3MV8SNTKJm0GtnjM8LA9uC96qV6f5aXMn1EdaMGoCQbR9jBeqZG7pq8O2QHA/1eNNDw5sCISS05plCJ2yz/G4PUndnuToKm/sx6/qbdRA3QzTrNQfwTTcuUi+j4mYEFANgT774CeGdnajfNy4cZoeVEFmBTXdi5V1DuFLujSQrzRSHddHHUQXGUMaz4qv5 [...] - - secure: sdSLUbg6ZkZiSO/gytXd83IpJ3TD2KeFWMP60VwadEPBDJf88Wju1S9xlHSan+gOgX5wU8S5Az1wfi1njGKZTmxNHgXa/LgCgJvmdoKPIHsJld5A38tvK3t1qeOzrM7UpzwdqqrEt+Xl6AlxCE82293IznOgCWaaLfBc5TawCThTLGZ2XSQYbZj4Uh12twCsKIUvnHV0Kr2wHRrSDGq6r2VSniHk8w66QMNOBu6V6zxYXKNhJpoRBU6X8vMGsn9GDNr6PG1GnO0oZGDQn/dJMxUK/QAgeskVHptX8Fytnzyri6vut0JPiMbT8AtolOxzjv/7KcqhO0YdxjVy+/3sTLpCRM0zfcx8q9RbufNiBTuERDrUYb8EKqHyX4QNJEVpf+oImNsKw/8ry991OdhrG9cyzXNT+0/oS5U7C/F7gS7nqb/kjBP+qJ+6AwdnOU1re5brv7BkH9Rj6d6tVLfSG35gRXAuwoou [...] +- secure: GNKMZjEW1BKBb8NSiFB/Bogh0V5co5TefLLaj9oYJrKCP8rheFY4mWwINR74dYwSFIVmBhuuwZCm62zZwzb2TTivjQihOwU9SeTaUvJHlcLu6j1T/gTcMX5dkDOrdzqZaKoU5NpMbvad1fnDfEG9oU/VE7fARAxziZ2yBXOGkt2p2whkGXrs43gMyRKJv7ytUwpjvzhD48hJHgn0Eq6EwVIYxO5gJfGAhiA0ucH75c3jI4yEz7sw7SaoFxAQRL7VICaTH8JI+tKWU673HCclIRiPeZWQ23rI/f3MV8SNTKJm0GtnjM8LA9uC96qV6f5aXMn1EdaMGoCQbR9jBeqZG7pq8O2QHA/1eNNDw5sCISS05plCJ2yz/G4PUndnuToKm/sx6/qbdRA3QzTrNQfwTTcuUi+j4mYEFANgT774CeGdnajfNy4cZoeVEFmBTXdi5V1DuFLujSQrzRSHddHHUQXGUMaz4q [...] +- secure: sdSLUbg6ZkZiSO/gytXd83IpJ3TD2KeFWMP60VwadEPBDJf88Wju1S9xlHSan+gOgX5wU8S5Az1wfi1njGKZTmxNHgXa/LgCgJvmdoKPIHsJld5A38tvK3t1qeOzrM7UpzwdqqrEt+Xl6AlxCE82293IznOgCWaaLfBc5TawCThTLGZ2XSQYbZj4Uh12twCsKIUvnHV0Kr2wHRrSDGq6r2VSniHk8w66QMNOBu6V6zxYXKNhJpoRBU6X8vMGsn9GDNr6PG1GnO0oZGDQn/dJMxUK/QAgeskVHptX8Fytnzyri6vut0JPiMbT8AtolOxzjv/7KcqhO0YdxjVy+/3sTLpCRM0zfcx8q9RbufNiBTuERDrUYb8EKqHyX4QNJEVpf+oImNsKw/8ry991OdhrG9cyzXNT+0/oS5U7C/F7gS7nqb/kjBP+qJ+6AwdnOU1re5brv7BkH9Rj6d6tVLfSG35gRXAuwo [...]
[incubator-openwhisk-runtime-rust] branch master updated: Modification in Main Action method signature and improved the error log (#2)
This is an automated email from the ASF dual-hosted git repository. msciabarra pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-openwhisk-runtime-rust.git The following commit(s) were added to refs/heads/master by this push: new 4427257 Modification in Main Action method signature and improved the error log (#2) 4427257 is described below commit 44272573ed9ee00315c879e2912d42e0334c6c15 Author: Roberto Diaz AuthorDate: Sun Mar 10 11:23:14 2019 + Modification in Main Action method signature and improved the error log (#2) * modified action signature and changed example action * format code * changed response error message for action loop * change error msg * refactored error messages --- rust1.32/src/action_loop/src/main.rs | 22 +++--- rust1.32/src/actions/Cargo.toml | 4 rust1.32/src/actions/src/lib.rs | 27 ++- 3 files changed, 41 insertions(+), 12 deletions(-) diff --git a/rust1.32/src/action_loop/src/main.rs b/rust1.32/src/action_loop/src/main.rs index 7d874c9..25144be 100644 --- a/rust1.32/src/action_loop/src/main.rs +++ b/rust1.32/src/action_loop/src/main.rs @@ -12,11 +12,16 @@ use std::{ #[derive(Debug, Clone, PartialEq, Deserialize)] struct Input { -value: HashMap, +value: Value, #[serde(flatten)] environment: HashMap, } +fn log_error(fd3: &mut File, error: Error) { +writeln!(fd3, "{{\"error\":\"{}\"}}\n", error).expect("Error writing on fd3"); +eprintln!("error: {}", error); +} + fn main() { let mut fd3 = unsafe { File::from_raw_fd(3) }; let stdin = stdin(); @@ -28,17 +33,20 @@ fn main() { for (key, val) in input.environment { env::set_var(format!("__OW_{}", key.to_uppercase()), val.to_string()); } -match serde_json::to_string(&actionMain(input.value)) { -Ok(result) => { -writeln!(&mut fd3, "{}", result).expect("Error writing on fd3"); -} +match actionMain(input.value) { +Ok(action_result) => match serde_json::to_string(&action_result) { +Ok(response) => { +writeln!(&mut fd3, "{}", response).expect("Error writing on fd3") +} +Err(err) => log_error(&mut fd3, err), +}, Err(err) => { -eprintln!("Error formatting result value json: {}", err); +log_error(&mut fd3, err); } } } Err(err) => { -eprintln!("Error parsing input: {}", err); +log_error(&mut fd3, err); } } stdout().flush().expect("Error flushing stdout"); diff --git a/rust1.32/src/actions/Cargo.toml b/rust1.32/src/actions/Cargo.toml index 315401c..c4bb533 100644 --- a/rust1.32/src/actions/Cargo.toml +++ b/rust1.32/src/actions/Cargo.toml @@ -2,7 +2,11 @@ name = "actions" version = "0.1.0" authors = ["Roberto Diaz "] +edition = "2018" [dependencies] serde_json = "1.0" +serde = "1.0" +serde_derive = "1.0" + diff --git a/rust1.32/src/actions/src/lib.rs b/rust1.32/src/actions/src/lib.rs index cbeafbd..732e23b 100644 --- a/rust1.32/src/actions/src/lib.rs +++ b/rust1.32/src/actions/src/lib.rs @@ -1,10 +1,27 @@ extern crate serde_json; -use std::collections::HashMap; -use serde_json::Value; +use serde_derive::{Deserialize, Serialize}; +use serde_json::{Error, Value}; +#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] +struct Input { +#[serde(default = "stranger")] +name: String, +} + +#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] +struct Output { +greeting: String, +} + +fn stranger() -> String { +"stranger".to_string() +} -pub fn main(mut input_data: HashMap) -> HashMap { - input_data.insert("added_key".to_string(),Value::String("test".to_string())); -input_data +pub fn main(args: Value) -> Result { +let input: Input = serde_json::from_value(args)?; +let output = Output { +greeting: format!("Hello, {}", input.name), +}; +serde_json::to_value(output) }
[incubator-openwhisk-runtime-rust] branch master updated: minifix to makefile
This is an automated email from the ASF dual-hosted git repository. msciabarra pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-openwhisk-runtime-rust.git The following commit(s) were added to refs/heads/master by this push: new 71e0d02 minifix to makefile 71e0d02 is described below commit 71e0d0213c44c3817d5428d51c8251ab5ff6487f Author: Michele Sciabarra AuthorDate: Fri Mar 8 17:23:39 2019 +0100 minifix to makefile --- rust1.32/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/rust1.32/Makefile b/rust1.32/Makefile index 7ee6d5f..64a81b8 100644 --- a/rust1.32/Makefile +++ b/rust1.32/Makefile @@ -7,8 +7,9 @@ build: docker build -t $(USER)/$(IMAGE) . devel: build - docker run -ti -p 8080:8080 --entrypoint=bash \ + docker run -ti -p 8080:8080 --entrypoint=bash \ -v $(PWD):/mnt -e OW_COMPILER=/mnt/compile \ + $(USER)/$(IMAGE) push: build docker login
[incubator-openwhisk-runtime-rust] 07/10: Use more of serde's superpowers
This is an automated email from the ASF dual-hosted git repository. msciabarra pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-openwhisk-runtime-rust.git commit 9d79c4b413b50d6b899e34b9b3ad03dd45560973 Author: Bruce Adams AuthorDate: Thu Mar 7 08:23:03 2019 -0500 Use more of serde's superpowers --- rust1.32/src/Cargo.lock | 48 rust1.32/src/action_loop/Cargo.toml | 4 ++- rust1.32/src/action_loop/src/main.rs | 54 +--- 3 files changed, 76 insertions(+), 30 deletions(-) diff --git a/rust1.32/src/Cargo.lock b/rust1.32/src/Cargo.lock index 2015f28..deb8f40 100644 --- a/rust1.32/src/Cargo.lock +++ b/rust1.32/src/Cargo.lock @@ -4,6 +4,8 @@ version = "0.1.0" dependencies = [ "actions 0.1.0", "libc 0.2.49 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 1.0.39 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -25,6 +27,22 @@ version = "0.2.49" source = "registry+https://github.com/rust-lang/crates.io-index"; [[package]] +name = "proc-macro2" +version = "0.4.27" +source = "registry+https://github.com/rust-lang/crates.io-index"; +dependencies = [ + "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "quote" +version = "0.6.11" +source = "registry+https://github.com/rust-lang/crates.io-index"; +dependencies = [ + "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] name = "ryu" version = "0.2.7" source = "registry+https://github.com/rust-lang/crates.io-index"; @@ -35,6 +53,16 @@ version = "1.0.89" source = "registry+https://github.com/rust-lang/crates.io-index"; [[package]] +name = "serde_derive" +version = "1.0.89" +source = "registry+https://github.com/rust-lang/crates.io-index"; +dependencies = [ + "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.27 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] name = "serde_json" version = "1.0.39" source = "registry+https://github.com/rust-lang/crates.io-index"; @@ -44,9 +72,29 @@ dependencies = [ "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "syn" +version = "0.15.27" +source = "registry+https://github.com/rust-lang/crates.io-index"; +dependencies = [ + "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)", + "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "unicode-xid" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index"; + [metadata] "checksum itoa 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "1306f3464951f30e30d12373d31c79fbd52d236e5e896fd92f96ec7babbbe60b" "checksum libc 0.2.49 (registry+https://github.com/rust-lang/crates.io-index)" = "413f3dfc802c5dc91dc570b05125b6cda9855edfaa9825c9849807876376e70e" +"checksum proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)" = "4d317f9caece796be1980837fd5cb3dfec5613ebdb04ad0956deea83ce168915" +"checksum quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)" = "cdd8e04bd9c52e0342b406469d494fcb033be4bdbe5c606016defbb1681411e1" "checksum ryu 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)" = "eb9e9b8cde282a9fe6a42dd4681319bfb63f121b8a8ee9439c6f4107e58a46f7" "checksum serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)" = "92514fb95f900c9b5126e32d020f5c6d40564c27a5ea6d1d7d9f157a96623560" +"checksum serde_derive 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)" = "bb6eabf4b5914e88e24eea240bb7c9f9a2cbc1bbbe8d961d381975ec3c6b806c" "checksum serde_json 1.0.39 (registry+https://github.com/rust-lang/crates.io-index)" = "5a23aa71d4a4d43fdbfaac00eff68ba8a06a51759a89ac3304323e800c4dd40d" +"checksum syn 0.15.27 (registry+https://github.com/rust-lang/crates.io-index)" = "525bd55255f03c816e5d7f615587bd13030c7103354fadb104993dcee6a788ec"
[incubator-openwhisk-runtime-rust] 01/10: first commit
This is an automated email from the ASF dual-hosted git repository. msciabarra pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-openwhisk-runtime-rust.git commit 36b49303032acb92a5446b1f9c33c1ace2a5389e Author: Michele Sciabarra AuthorDate: Thu Feb 28 16:54:31 2019 +0100 first commit --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md new file mode 100644 index 000..89ddcdf --- /dev/null +++ b/README.md @@ -0,0 +1 @@ +# incubator-openwhisk-runtime-rust
[incubator-openwhisk-runtime-rust] 05/10: hello demo working
This is an automated email from the ASF dual-hosted git repository. msciabarra pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-openwhisk-runtime-rust.git commit eaa26f0d7b08c8b1fd38a48da51bd90fce93a867 Author: Michele Sciabarra AuthorDate: Wed Mar 6 09:18:38 2019 +0100 hello demo working --- README.md| 15 ++- example/hello/src/lib.rs | 13 ++--- rust1.32/Makefile| 7 +-- 3 files changed, 29 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index ca09760..d4e48bc 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,16 @@ # incubator-openwhisk-runtime-rust -Work in Progress! Do not use... +Work in Progress! Do not use yet... + + +# Work Done + +- implemented the actionloop +- implemented the Docker image +- implemented the action compiler + +# Work to do + +- Add the gradle build +- Implement the mandatory scala tests +- Submit and add to the list of supported runtimes diff --git a/example/hello/src/lib.rs b/example/hello/src/lib.rs index b507a82..5f43e8d 100644 --- a/example/hello/src/lib.rs +++ b/example/hello/src/lib.rs @@ -3,7 +3,14 @@ extern crate serde_json; use std::collections::HashMap; use serde_json::Value; -pub fn main(mut input_data: HashMap) -> HashMap { -input_data.insert("hello".to_string(),Value::String("world".to_string())); -input_data +pub fn main(args: HashMap) -> HashMap { +let name_opt = args.get("name"); +let name = if name_opt.is_some() { +name_opt.unwrap().as_str().unwrap() +} else { +"stranger" +}; +let mut out = HashMap::new(); +out.insert("greeting".to_string(), Value::String(format!("Hello, {}", name))); +out } diff --git a/rust1.32/Makefile b/rust1.32/Makefile index 46598eb..7ee6d5f 100644 --- a/rust1.32/Makefile +++ b/rust1.32/Makefile @@ -1,4 +1,4 @@ -USER?=openwhisk +USER=docker.io/actionloop IMAGE=actionloop-rust-v1.32 .PHONY: build @@ -9,4 +9,7 @@ build: devel: build docker run -ti -p 8080:8080 --entrypoint=bash \ -v $(PWD):/mnt -e OW_COMPILER=/mnt/compile \ - $(USER)/$(IMAGE) + +push: build + docker login + docker push $(USER)/$(IMAGE)
[incubator-openwhisk-runtime-rust] 02/10: action compiler
This is an automated email from the ASF dual-hosted git repository. msciabarra pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-openwhisk-runtime-rust.git commit 340ca11d071edc5b5d3b109569dbf9d4f88154f8 Author: Michele Sciabarra AuthorDate: Fri Mar 1 10:45:53 2019 +0100 action compiler --- README.md| 2 + rust1.32/Dockerfile | 25 +++ rust1.32/Makefile| 12 + rust1.32/compile | 105 +++ rust1.32/compile.launcher.rs | 41 + 5 files changed, 185 insertions(+) diff --git a/README.md b/README.md index 89ddcdf..ca09760 100644 --- a/README.md +++ b/README.md @@ -1 +1,3 @@ # incubator-openwhisk-runtime-rust + +Work in Progress! Do not use... diff --git a/rust1.32/Dockerfile b/rust1.32/Dockerfile new file mode 100644 index 000..07a6bb9 --- /dev/null +++ b/rust1.32/Dockerfile @@ -0,0 +1,25 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You 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. +# +FROM actionloop/actionloop-v2:latest as builder +FROM rust:1.32 +COPY --from=builder /bin/proxy /bin/proxy +RUN mkdir -p /action +ADD compile /bin/compile +ADD compile.launcher.rs /bin/compile.launcher.rs +ENV OW_COMPILER=/bin/compile +WORKDIR /action +ENTRYPOINT ["/bin/proxy"] diff --git a/rust1.32/Makefile b/rust1.32/Makefile new file mode 100644 index 000..46598eb --- /dev/null +++ b/rust1.32/Makefile @@ -0,0 +1,12 @@ +USER?=openwhisk +IMAGE=actionloop-rust-v1.32 + +.PHONY: build + +build: + docker build -t $(USER)/$(IMAGE) . + +devel: build + docker run -ti -p 8080:8080 --entrypoint=bash \ + -v $(PWD):/mnt -e OW_COMPILER=/mnt/compile \ + $(USER)/$(IMAGE) diff --git a/rust1.32/compile b/rust1.32/compile new file mode 100755 index 000..0c3228d --- /dev/null +++ b/rust1.32/compile @@ -0,0 +1,105 @@ +#!/usr/bin/env python3 +"""Rust Action Builder +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You 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. +# +""" + +from __future__ import print_function +import os, sys, codecs, subprocess +from os.path import abspath, exists, dirname +import tempfile + +## utils +# write a file creating intermediate directories +def write_file(file, body): +os.makedirs(dirname(file), mode=0o755, exist_ok=True) +with open(file, mode="w", encoding="utf-8") as f: +f.write(body) + +# copy a file eventually replacing a substring +def copy_replace(src, dst, match=None, replacement=""): +with codecs.open(src, 'r', 'utf-8') as s: +body = s.read() +if match: +body = body.replace(match, replacement) +write_file(dst, body) + +## cargo +cargo_action = """[package] +name = "actions" +version = "0.1.0" + +[dependencies] +serde_json = "1.0" +""" + +cargo_actionloop = """[package] +name = "action_loop" +version = "0.1.0" +authors = ["Roberto Diaz "] + +[dependencies] +serde_json = "1.0" +libc = "0.2.49" +actions = { path = "../actions" } +""" + +cargo_workspace = """ +[workspace] + +members = [ +"action_loop", +"actions", +] +""" + +def build(): +pass + +def sources(main, src_dir, tgt_dir, launcher): +src_file = abspath("%
[incubator-openwhisk-runtime-rust] 10/10: Merge pull request #1 from bruceadams/proposal
This is an automated email from the ASF dual-hosted git repository. msciabarra pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-openwhisk-runtime-rust.git commit 3fd55cc58d5c0a7fd520459a9ceee25adecc1700 Merge: eaa26f0 d294fdc Author: Michele Sciabarra <30654959+sciabarra...@users.noreply.github.com> AuthorDate: Fri Mar 8 17:22:31 2019 +0100 Merge pull request #1 from bruceadams/proposal Proposed changes to action_loop rust1.32/src/Cargo.lock | 48 rust1.32/src/action_loop/Cargo.toml | 5 ++- rust1.32/src/action_loop/src/main.rs | 71 +--- 3 files changed, 86 insertions(+), 38 deletions(-)
[incubator-openwhisk-runtime-rust] 06/10: Format code, fix typos, quiet clippy
This is an automated email from the ASF dual-hosted git repository. msciabarra pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-openwhisk-runtime-rust.git commit fccd2ed18db465301462878e261f2e195ae1ba98 Author: Bruce Adams AuthorDate: Thu Mar 7 08:05:15 2019 -0500 Format code, fix typos, quiet clippy Ran these two commands: - cargo fmt - cargo clippy --- rust1.32/src/action_loop/src/main.rs | 37 1 file changed, 21 insertions(+), 16 deletions(-) diff --git a/rust1.32/src/action_loop/src/main.rs b/rust1.32/src/action_loop/src/main.rs index e4e143d..ea6da96 100644 --- a/rust1.32/src/action_loop/src/main.rs +++ b/rust1.32/src/action_loop/src/main.rs @@ -1,32 +1,33 @@ -extern crate serde_json; extern crate actions; extern crate libc; +extern crate serde_json; +use actions::main as actionMain; +use serde_json::{Error, Value}; +use std::collections::HashMap; use std::env; -use std::io::{self, Write, stdout, stderr}; use std::fs::File; +use std::io::{self, stderr, stdout, Write}; use std::os::unix::io::FromRawFd; -use std::collections::HashMap; -use serde_json::{Value, Error}; -use actions::main as actionMain; fn main() { -let mut fd3 = unsafe { File::from_raw_fd(3)}; +let mut fd3 = unsafe { File::from_raw_fd(3) }; loop { let mut buffer = String::new(); io::stdin().read_line(&mut buffer).unwrap(); -let parsed_input:Result,Error> = serde_json::from_str(&buffer); -let mut payload:HashMap = HashMap::new(); +let parsed_input: Result, Error> = serde_json::from_str(&buffer); +let mut payload: HashMap = HashMap::new(); match parsed_input { Ok(n) => { for (key, val) in n { if key == "value" { -let mut unparsed_payload:Result,Error> = serde_json::from_value(val); +let mut unparsed_payload: Result, Error> = +serde_json::from_value(val); match unparsed_payload { Ok(value) => payload = value, Err(err) => { eprintln!("Error parsing value json: {}", err); -continue +continue; } } } else { @@ -34,15 +35,19 @@ fn main() { } } } -Err(e) =>{ +Err(e) => { eprintln!("Error: {}", e); -continue +continue; } } - -match serde_json::to_string(&actionMain(payload)){ -Ok(result) => { write!(&mut fd3, "{}\n", result).expect("Error writting on fd3");} -Err(err) => { eprintln!("Error parsing resul value json: {}", err);} + +match serde_json::to_string(&actionMain(payload)) { +Ok(result) => { +writeln!(&mut fd3, "{}", result).expect("Error writing on fd3"); +} +Err(err) => { +eprintln!("Error formatting result value json: {}", err); +} } stdout().flush().expect("Error flushing stdout"); stderr().flush().expect("Error flushing stderr");
[incubator-openwhisk-runtime-rust] branch master updated (eaa26f0 -> 3fd55cc)
This is an automated email from the ASF dual-hosted git repository. msciabarra pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/incubator-openwhisk-runtime-rust.git. from eaa26f0 hello demo working new fccd2ed Format code, fix typos, quiet clippy new 9d79c4b Use more of serde's superpowers new 6617982 Switch to Rust 2018 new d294fdc Clarify main loop: lines of input new 3fd55cc Merge pull request #1 from bruceadams/proposal The 10 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: rust1.32/src/Cargo.lock | 48 rust1.32/src/action_loop/Cargo.toml | 5 ++- rust1.32/src/action_loop/src/main.rs | 71 +--- 3 files changed, 86 insertions(+), 38 deletions(-)
[incubator-openwhisk-runtime-rust] 03/10: reworked the source generation
This is an automated email from the ASF dual-hosted git repository. msciabarra pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-openwhisk-runtime-rust.git commit c3a89e1e40ea4f1e4b39f709ef74c7e54550c36f Author: Michele Sciabarra AuthorDate: Tue Mar 5 10:13:49 2019 +0100 reworked the source generation --- example/hello/.gitignore | 45 ++ example/hello/Cargo.toml | 8 example/hello/src/lib.rs | 9 rust1.32/Dockerfile| 3 +- rust1.32/compile | 55 +++--- rust1.32/src/Cargo.lock| 52 rust1.32/src/Cargo.toml| 6 +++ rust1.32/src/action_loop/Cargo.toml| 9 .../action_loop/src/main.rs} | 23 ++--- rust1.32/src/actions/.gitignore| 3 ++ rust1.32/src/actions/Cargo.toml| 8 rust1.32/src/actions/src/lib.rs| 10 12 files changed, 186 insertions(+), 45 deletions(-) diff --git a/example/hello/.gitignore b/example/hello/.gitignore new file mode 100644 index 000..72fc6b4 --- /dev/null +++ b/example/hello/.gitignore @@ -0,0 +1,45 @@ + +# Created by https://www.gitignore.io/api/osx,rust +# Edit at https://www.gitignore.io/?templates=osx,rust + +### OSX ### +# General +.DS_Store +.AppleDouble +.LSOverride + +# Icon must end with two \r +Icon + +# Thumbnails +._* + +# Files that might appear in the root of a volume +.DocumentRevisions-V100 +.fseventsd +.Spotlight-V100 +.TemporaryItems +.Trashes +.VolumeIcon.icns +.com.apple.timemachine.donotpresent + +# Directories potentially created on remote AFP share +.AppleDB +.AppleDesktop +Network Trash Folder +Temporary Items +.apdisk + +### Rust ### +# Generated by Cargo +# will have compiled files and executables +/target/ + +# Remove Cargo.lock from gitignore if creating an executable, leave it for libraries +# More information here https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html +Cargo.lock + +# These are backup files generated by rustfmt +**/*.rs.bk + +# End of https://www.gitignore.io/api/osx,rust \ No newline at end of file diff --git a/example/hello/Cargo.toml b/example/hello/Cargo.toml new file mode 100644 index 000..315401c --- /dev/null +++ b/example/hello/Cargo.toml @@ -0,0 +1,8 @@ +[package] +name = "actions" +version = "0.1.0" +authors = ["Roberto Diaz "] + +[dependencies] +serde_json = "1.0" + diff --git a/example/hello/src/lib.rs b/example/hello/src/lib.rs new file mode 100644 index 000..b507a82 --- /dev/null +++ b/example/hello/src/lib.rs @@ -0,0 +1,9 @@ +extern crate serde_json; + +use std::collections::HashMap; +use serde_json::Value; + +pub fn main(mut input_data: HashMap) -> HashMap { +input_data.insert("hello".to_string(),Value::String("world".to_string())); +input_data +} diff --git a/rust1.32/Dockerfile b/rust1.32/Dockerfile index 07a6bb9..411b44c 100644 --- a/rust1.32/Dockerfile +++ b/rust1.32/Dockerfile @@ -19,7 +19,8 @@ FROM rust:1.32 COPY --from=builder /bin/proxy /bin/proxy RUN mkdir -p /action ADD compile /bin/compile -ADD compile.launcher.rs /bin/compile.launcher.rs +ADD src /usr/src +RUN cd /usr/src ; cargo build ENV OW_COMPILER=/bin/compile WORKDIR /action ENTRYPOINT ["/bin/proxy"] diff --git a/rust1.32/compile b/rust1.32/compile index 0c3228d..343e76a 100755 --- a/rust1.32/compile +++ b/rust1.32/compile @@ -21,7 +21,8 @@ from __future__ import print_function import os, sys, codecs, subprocess from os.path import abspath, exists, dirname -import tempfile +import time +import shutil ## utils # write a file creating intermediate directories @@ -47,59 +48,39 @@ version = "0.1.0" serde_json = "1.0" """ -cargo_actionloop = """[package] -name = "action_loop" -version = "0.1.0" -authors = ["Roberto Diaz "] - -[dependencies] -serde_json = "1.0" -libc = "0.2.49" -actions = { path = "../actions" } -""" - -cargo_workspace = """ -[workspace] - -members = [ -"action_loop", -"actions", -] -""" - -def build(): +def build(tgt_dir): pass -def sources(main, src_dir, tgt_dir, launcher): -src_file = abspath("%s/exec" % src_dir) - +def sources(main, src_dir): +# move away the action dir and replace with the new +tmpname = str(int(time.time())) +shutil.move("/usr/src/actions", "/usr/src/src%s" % tmpname) +shutil.move(src_dir, "/usr/src/actions") + # move exec in the right place +src_file = "/usr/src/actions/exec" if exists(src_file)
[incubator-openwhisk-runtime-rust] 04/10: fixed compilation
This is an automated email from the ASF dual-hosted git repository. msciabarra pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-openwhisk-runtime-rust.git commit 253b03af8de724bd97e43d059d97a93a9cb74ea4 Author: Michele Sciabarra AuthorDate: Tue Mar 5 17:09:12 2019 +0100 fixed compilation --- rust1.32/compile | 26 +- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/rust1.32/compile b/rust1.32/compile index 343e76a..650904e 100755 --- a/rust1.32/compile +++ b/rust1.32/compile @@ -49,7 +49,31 @@ serde_json = "1.0" """ def build(tgt_dir): -pass + # support RELEASE + cmd = ["cargo", "build"] + bin_dir = "debug" + if "RELEASE" in os.environ: + cmd += "--release" + bin_dir = "release" + env = { + "CARGO_HOME": "/usr/local/cargo", + "PATH": "/usr/local/cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin", + "RUSTUP_HOME": "/usr/local/rustup" + } + p = subprocess.Popen(cmd, + stdout=subprocess.PIPE, + stderr=subprocess.PIPE, + cwd="/usr/src", env=env) + (o, e) = p.communicate() + if isinstance(o, bytes): o = o.decode('utf-8') + if isinstance(e, bytes): e = e.decode('utf-8') + if p.returncode != 0: +sys.stdout.write(o) +sys.stdout.write(e) + else: + shutil.move( + "/usr/src/target/%s/action_loop" % bin_dir, + "%s/exec" % tgt_dir) def sources(main, src_dir): # move away the action dir and replace with the new
[incubator-openwhisk-runtime-rust] 08/10: Switch to Rust 2018
This is an automated email from the ASF dual-hosted git repository. msciabarra pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-openwhisk-runtime-rust.git commit 66179828c57deb791fe28bb986cb85304469abe7 Author: Bruce Adams AuthorDate: Thu Mar 7 08:27:01 2019 -0500 Switch to Rust 2018 --- rust1.32/src/action_loop/Cargo.toml | 1 + rust1.32/src/action_loop/src/main.rs | 20 2 files changed, 9 insertions(+), 12 deletions(-) diff --git a/rust1.32/src/action_loop/Cargo.toml b/rust1.32/src/action_loop/Cargo.toml index 7093ea7..44c18b3 100644 --- a/rust1.32/src/action_loop/Cargo.toml +++ b/rust1.32/src/action_loop/Cargo.toml @@ -2,6 +2,7 @@ name = "action_loop" version = "0.1.0" authors = ["Roberto Diaz "] +edition = "2018" [dependencies] serde = "1.0" diff --git a/rust1.32/src/action_loop/src/main.rs b/rust1.32/src/action_loop/src/main.rs index 6bb9d5f..9329648 100644 --- a/rust1.32/src/action_loop/src/main.rs +++ b/rust1.32/src/action_loop/src/main.rs @@ -1,18 +1,14 @@ -extern crate actions; -extern crate libc; -extern crate serde; -extern crate serde_derive; -extern crate serde_json; - use actions::main as actionMain; -use serde_derive::Deserialize; +use serde_derive::Deserialize; use serde_json::{Error, Value}; -use std::collections::HashMap; -use std::env; -use std::fs::File; -use std::io::{stderr, stdin, stdout, Write}; -use std::os::unix::io::FromRawFd; +use std::{ +collections::HashMap, +env, +fs::File, +io::{stderr, stdin, stdout, Write}, +os::unix::io::FromRawFd, +}; #[derive(Debug, Clone, PartialEq, Deserialize)] struct Input {
[incubator-openwhisk-runtime-rust] 09/10: Clarify main loop: lines of input
This is an automated email from the ASF dual-hosted git repository. msciabarra pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-openwhisk-runtime-rust.git commit d294fdccb19315fa497308b8f2a8864359603dd0 Author: Bruce Adams AuthorDate: Thu Mar 7 08:30:03 2019 -0500 Clarify main loop: lines of input --- rust1.32/src/action_loop/src/main.rs | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/rust1.32/src/action_loop/src/main.rs b/rust1.32/src/action_loop/src/main.rs index 9329648..7d874c9 100644 --- a/rust1.32/src/action_loop/src/main.rs +++ b/rust1.32/src/action_loop/src/main.rs @@ -6,7 +6,7 @@ use std::{ collections::HashMap, env, fs::File, -io::{stderr, stdin, stdout, Write}, +io::{stderr, stdin, stdout, BufRead, Write}, os::unix::io::FromRawFd, }; @@ -19,9 +19,9 @@ struct Input { fn main() { let mut fd3 = unsafe { File::from_raw_fd(3) }; -loop { -let mut buffer = String::new(); -stdin().read_line(&mut buffer).unwrap(); +let stdin = stdin(); +for line in stdin.lock().lines() { +let buffer: String = line.expect("Error reading line"); let parsed_input: Result = serde_json::from_str(&buffer); match parsed_input { Ok(input) => {
[incubator-openwhisk-runtime-rust] 05/05: hello demo working
This is an automated email from the ASF dual-hosted git repository. msciabarra pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-openwhisk-runtime-rust.git commit eaa26f0d7b08c8b1fd38a48da51bd90fce93a867 Author: Michele Sciabarra AuthorDate: Wed Mar 6 09:18:38 2019 +0100 hello demo working --- README.md| 15 ++- example/hello/src/lib.rs | 13 ++--- rust1.32/Makefile| 7 +-- 3 files changed, 29 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index ca09760..d4e48bc 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,16 @@ # incubator-openwhisk-runtime-rust -Work in Progress! Do not use... +Work in Progress! Do not use yet... + + +# Work Done + +- implemented the actionloop +- implemented the Docker image +- implemented the action compiler + +# Work to do + +- Add the gradle build +- Implement the mandatory scala tests +- Submit and add to the list of supported runtimes diff --git a/example/hello/src/lib.rs b/example/hello/src/lib.rs index b507a82..5f43e8d 100644 --- a/example/hello/src/lib.rs +++ b/example/hello/src/lib.rs @@ -3,7 +3,14 @@ extern crate serde_json; use std::collections::HashMap; use serde_json::Value; -pub fn main(mut input_data: HashMap) -> HashMap { -input_data.insert("hello".to_string(),Value::String("world".to_string())); -input_data +pub fn main(args: HashMap) -> HashMap { +let name_opt = args.get("name"); +let name = if name_opt.is_some() { +name_opt.unwrap().as_str().unwrap() +} else { +"stranger" +}; +let mut out = HashMap::new(); +out.insert("greeting".to_string(), Value::String(format!("Hello, {}", name))); +out } diff --git a/rust1.32/Makefile b/rust1.32/Makefile index 46598eb..7ee6d5f 100644 --- a/rust1.32/Makefile +++ b/rust1.32/Makefile @@ -1,4 +1,4 @@ -USER?=openwhisk +USER=docker.io/actionloop IMAGE=actionloop-rust-v1.32 .PHONY: build @@ -9,4 +9,7 @@ build: devel: build docker run -ti -p 8080:8080 --entrypoint=bash \ -v $(PWD):/mnt -e OW_COMPILER=/mnt/compile \ - $(USER)/$(IMAGE) + +push: build + docker login + docker push $(USER)/$(IMAGE)
[incubator-openwhisk-runtime-rust] 02/05: action compiler
This is an automated email from the ASF dual-hosted git repository. msciabarra pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-openwhisk-runtime-rust.git commit 340ca11d071edc5b5d3b109569dbf9d4f88154f8 Author: Michele Sciabarra AuthorDate: Fri Mar 1 10:45:53 2019 +0100 action compiler --- README.md| 2 + rust1.32/Dockerfile | 25 +++ rust1.32/Makefile| 12 + rust1.32/compile | 105 +++ rust1.32/compile.launcher.rs | 41 + 5 files changed, 185 insertions(+) diff --git a/README.md b/README.md index 89ddcdf..ca09760 100644 --- a/README.md +++ b/README.md @@ -1 +1,3 @@ # incubator-openwhisk-runtime-rust + +Work in Progress! Do not use... diff --git a/rust1.32/Dockerfile b/rust1.32/Dockerfile new file mode 100644 index 000..07a6bb9 --- /dev/null +++ b/rust1.32/Dockerfile @@ -0,0 +1,25 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You 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. +# +FROM actionloop/actionloop-v2:latest as builder +FROM rust:1.32 +COPY --from=builder /bin/proxy /bin/proxy +RUN mkdir -p /action +ADD compile /bin/compile +ADD compile.launcher.rs /bin/compile.launcher.rs +ENV OW_COMPILER=/bin/compile +WORKDIR /action +ENTRYPOINT ["/bin/proxy"] diff --git a/rust1.32/Makefile b/rust1.32/Makefile new file mode 100644 index 000..46598eb --- /dev/null +++ b/rust1.32/Makefile @@ -0,0 +1,12 @@ +USER?=openwhisk +IMAGE=actionloop-rust-v1.32 + +.PHONY: build + +build: + docker build -t $(USER)/$(IMAGE) . + +devel: build + docker run -ti -p 8080:8080 --entrypoint=bash \ + -v $(PWD):/mnt -e OW_COMPILER=/mnt/compile \ + $(USER)/$(IMAGE) diff --git a/rust1.32/compile b/rust1.32/compile new file mode 100755 index 000..0c3228d --- /dev/null +++ b/rust1.32/compile @@ -0,0 +1,105 @@ +#!/usr/bin/env python3 +"""Rust Action Builder +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You 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. +# +""" + +from __future__ import print_function +import os, sys, codecs, subprocess +from os.path import abspath, exists, dirname +import tempfile + +## utils +# write a file creating intermediate directories +def write_file(file, body): +os.makedirs(dirname(file), mode=0o755, exist_ok=True) +with open(file, mode="w", encoding="utf-8") as f: +f.write(body) + +# copy a file eventually replacing a substring +def copy_replace(src, dst, match=None, replacement=""): +with codecs.open(src, 'r', 'utf-8') as s: +body = s.read() +if match: +body = body.replace(match, replacement) +write_file(dst, body) + +## cargo +cargo_action = """[package] +name = "actions" +version = "0.1.0" + +[dependencies] +serde_json = "1.0" +""" + +cargo_actionloop = """[package] +name = "action_loop" +version = "0.1.0" +authors = ["Roberto Diaz "] + +[dependencies] +serde_json = "1.0" +libc = "0.2.49" +actions = { path = "../actions" } +""" + +cargo_workspace = """ +[workspace] + +members = [ +"action_loop", +"actions", +] +""" + +def build(): +pass + +def sources(main, src_dir, tgt_dir, launcher): +src_file = abspath("%
[incubator-openwhisk-runtime-rust] branch master updated (36b4930 -> eaa26f0)
This is an automated email from the ASF dual-hosted git repository. msciabarra pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/incubator-openwhisk-runtime-rust.git. from 36b4930 first commit new 340ca11 action compiler new c3a89e1 reworked the source generation new 253b03a fixed compilation new eaa26f0 hello demo working The 5 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: README.md| 15 + example/hello/.gitignore | 45 ++ example/hello/Cargo.toml | 8 +++ example/hello/src/lib.rs | 16 + rust1.32/Dockerfile | 26 + rust1.32/Makefile| 15 + rust1.32/compile | 110 +++ rust1.32/src/Cargo.lock | 52 + rust1.32/src/Cargo.toml | 6 ++ rust1.32/src/action_loop/Cargo.toml | 9 +++ rust1.32/src/action_loop/src/main.rs | 50 rust1.32/src/actions/.gitignore | 3 + rust1.32/src/actions/Cargo.toml | 8 +++ rust1.32/src/actions/src/lib.rs | 10 14 files changed, 373 insertions(+) create mode 100644 example/hello/.gitignore create mode 100644 example/hello/Cargo.toml create mode 100644 example/hello/src/lib.rs create mode 100644 rust1.32/Dockerfile create mode 100644 rust1.32/Makefile create mode 100755 rust1.32/compile create mode 100644 rust1.32/src/Cargo.lock create mode 100644 rust1.32/src/Cargo.toml create mode 100644 rust1.32/src/action_loop/Cargo.toml create mode 100644 rust1.32/src/action_loop/src/main.rs create mode 100644 rust1.32/src/actions/.gitignore create mode 100644 rust1.32/src/actions/Cargo.toml create mode 100644 rust1.32/src/actions/src/lib.rs
[incubator-openwhisk-runtime-rust] 03/05: reworked the source generation
This is an automated email from the ASF dual-hosted git repository. msciabarra pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-openwhisk-runtime-rust.git commit c3a89e1e40ea4f1e4b39f709ef74c7e54550c36f Author: Michele Sciabarra AuthorDate: Tue Mar 5 10:13:49 2019 +0100 reworked the source generation --- example/hello/.gitignore | 45 ++ example/hello/Cargo.toml | 8 example/hello/src/lib.rs | 9 rust1.32/Dockerfile| 3 +- rust1.32/compile | 55 +++--- rust1.32/src/Cargo.lock| 52 rust1.32/src/Cargo.toml| 6 +++ rust1.32/src/action_loop/Cargo.toml| 9 .../action_loop/src/main.rs} | 23 ++--- rust1.32/src/actions/.gitignore| 3 ++ rust1.32/src/actions/Cargo.toml| 8 rust1.32/src/actions/src/lib.rs| 10 12 files changed, 186 insertions(+), 45 deletions(-) diff --git a/example/hello/.gitignore b/example/hello/.gitignore new file mode 100644 index 000..72fc6b4 --- /dev/null +++ b/example/hello/.gitignore @@ -0,0 +1,45 @@ + +# Created by https://www.gitignore.io/api/osx,rust +# Edit at https://www.gitignore.io/?templates=osx,rust + +### OSX ### +# General +.DS_Store +.AppleDouble +.LSOverride + +# Icon must end with two \r +Icon + +# Thumbnails +._* + +# Files that might appear in the root of a volume +.DocumentRevisions-V100 +.fseventsd +.Spotlight-V100 +.TemporaryItems +.Trashes +.VolumeIcon.icns +.com.apple.timemachine.donotpresent + +# Directories potentially created on remote AFP share +.AppleDB +.AppleDesktop +Network Trash Folder +Temporary Items +.apdisk + +### Rust ### +# Generated by Cargo +# will have compiled files and executables +/target/ + +# Remove Cargo.lock from gitignore if creating an executable, leave it for libraries +# More information here https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html +Cargo.lock + +# These are backup files generated by rustfmt +**/*.rs.bk + +# End of https://www.gitignore.io/api/osx,rust \ No newline at end of file diff --git a/example/hello/Cargo.toml b/example/hello/Cargo.toml new file mode 100644 index 000..315401c --- /dev/null +++ b/example/hello/Cargo.toml @@ -0,0 +1,8 @@ +[package] +name = "actions" +version = "0.1.0" +authors = ["Roberto Diaz "] + +[dependencies] +serde_json = "1.0" + diff --git a/example/hello/src/lib.rs b/example/hello/src/lib.rs new file mode 100644 index 000..b507a82 --- /dev/null +++ b/example/hello/src/lib.rs @@ -0,0 +1,9 @@ +extern crate serde_json; + +use std::collections::HashMap; +use serde_json::Value; + +pub fn main(mut input_data: HashMap) -> HashMap { +input_data.insert("hello".to_string(),Value::String("world".to_string())); +input_data +} diff --git a/rust1.32/Dockerfile b/rust1.32/Dockerfile index 07a6bb9..411b44c 100644 --- a/rust1.32/Dockerfile +++ b/rust1.32/Dockerfile @@ -19,7 +19,8 @@ FROM rust:1.32 COPY --from=builder /bin/proxy /bin/proxy RUN mkdir -p /action ADD compile /bin/compile -ADD compile.launcher.rs /bin/compile.launcher.rs +ADD src /usr/src +RUN cd /usr/src ; cargo build ENV OW_COMPILER=/bin/compile WORKDIR /action ENTRYPOINT ["/bin/proxy"] diff --git a/rust1.32/compile b/rust1.32/compile index 0c3228d..343e76a 100755 --- a/rust1.32/compile +++ b/rust1.32/compile @@ -21,7 +21,8 @@ from __future__ import print_function import os, sys, codecs, subprocess from os.path import abspath, exists, dirname -import tempfile +import time +import shutil ## utils # write a file creating intermediate directories @@ -47,59 +48,39 @@ version = "0.1.0" serde_json = "1.0" """ -cargo_actionloop = """[package] -name = "action_loop" -version = "0.1.0" -authors = ["Roberto Diaz "] - -[dependencies] -serde_json = "1.0" -libc = "0.2.49" -actions = { path = "../actions" } -""" - -cargo_workspace = """ -[workspace] - -members = [ -"action_loop", -"actions", -] -""" - -def build(): +def build(tgt_dir): pass -def sources(main, src_dir, tgt_dir, launcher): -src_file = abspath("%s/exec" % src_dir) - +def sources(main, src_dir): +# move away the action dir and replace with the new +tmpname = str(int(time.time())) +shutil.move("/usr/src/actions", "/usr/src/src%s" % tmpname) +shutil.move(src_dir, "/usr/src/actions") + # move exec in the right place +src_file = "/usr/src/actions/exec" if exists(src_file)
[incubator-openwhisk-runtime-rust] 04/05: fixed compilation
This is an automated email from the ASF dual-hosted git repository. msciabarra pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-openwhisk-runtime-rust.git commit 253b03af8de724bd97e43d059d97a93a9cb74ea4 Author: Michele Sciabarra AuthorDate: Tue Mar 5 17:09:12 2019 +0100 fixed compilation --- rust1.32/compile | 26 +- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/rust1.32/compile b/rust1.32/compile index 343e76a..650904e 100755 --- a/rust1.32/compile +++ b/rust1.32/compile @@ -49,7 +49,31 @@ serde_json = "1.0" """ def build(tgt_dir): -pass + # support RELEASE + cmd = ["cargo", "build"] + bin_dir = "debug" + if "RELEASE" in os.environ: + cmd += "--release" + bin_dir = "release" + env = { + "CARGO_HOME": "/usr/local/cargo", + "PATH": "/usr/local/cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin", + "RUSTUP_HOME": "/usr/local/rustup" + } + p = subprocess.Popen(cmd, + stdout=subprocess.PIPE, + stderr=subprocess.PIPE, + cwd="/usr/src", env=env) + (o, e) = p.communicate() + if isinstance(o, bytes): o = o.decode('utf-8') + if isinstance(e, bytes): e = e.decode('utf-8') + if p.returncode != 0: +sys.stdout.write(o) +sys.stdout.write(e) + else: + shutil.move( + "/usr/src/target/%s/action_loop" % bin_dir, + "%s/exec" % tgt_dir) def sources(main, src_dir): # move away the action dir and replace with the new
[incubator-openwhisk-runtime-rust] 01/05: first commit
This is an automated email from the ASF dual-hosted git repository. msciabarra pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-openwhisk-runtime-rust.git commit 36b49303032acb92a5446b1f9c33c1ace2a5389e Author: Michele Sciabarra AuthorDate: Thu Feb 28 16:54:31 2019 +0100 first commit --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md new file mode 100644 index 000..89ddcdf --- /dev/null +++ b/README.md @@ -0,0 +1 @@ +# incubator-openwhisk-runtime-rust
[incubator-openwhisk-runtime-rust] 01/01: first commit
This is an automated email from the ASF dual-hosted git repository. msciabarra pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-openwhisk-runtime-rust.git commit 36b49303032acb92a5446b1f9c33c1ace2a5389e Author: Michele Sciabarra AuthorDate: Thu Feb 28 16:54:31 2019 +0100 first commit --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md new file mode 100644 index 000..89ddcdf --- /dev/null +++ b/README.md @@ -0,0 +1 @@ +# incubator-openwhisk-runtime-rust
[incubator-openwhisk-runtime-rust] branch master created (now 36b4930)
This is an automated email from the ASF dual-hosted git repository. msciabarra pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/incubator-openwhisk-runtime-rust.git. at 36b4930 first commit This branch includes the following new commits: new 36b4930 first commit The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference.
[incubator-openwhisk-deploy-kube] branch master updated: liveness and readiness probes for zookeeper (#430)
This is an automated email from the ASF dual-hosted git repository. msciabarra pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-openwhisk-deploy-kube.git The following commit(s) were added to refs/heads/master by this push: new 14e76ca liveness and readiness probes for zookeeper (#430) 14e76ca is described below commit 14e76ca569117bb279172a1cefcf112f5b6f3573 Author: David Grove AuthorDate: Sat Feb 23 09:49:57 2019 -0500 liveness and readiness probes for zookeeper (#430) --- helm/openwhisk/templates/zookeeper-pod.yaml | 14 ++ 1 file changed, 14 insertions(+) diff --git a/helm/openwhisk/templates/zookeeper-pod.yaml b/helm/openwhisk/templates/zookeeper-pod.yaml index 746e137..6649cd0 100644 --- a/helm/openwhisk/templates/zookeeper-pod.yaml +++ b/helm/openwhisk/templates/zookeeper-pod.yaml @@ -55,6 +55,20 @@ spec: - name: leader-election containerPort: {{ .Values.zookeeper.leaderElectionPort }} +livenessProbe: + tcpSocket: +port: {{ .Values.zookeeper.port }} +initialDelaySeconds: 5 +periodSeconds: 10 +readinessProbe: + exec: +command: +- /bin/bash +- -c +- "echo ruok | nc -w 1 localhost:{{ .Values.zookeeper.port }} | grep imok" +initialDelaySeconds: 5 +periodSeconds: 10 + volumeMounts: - mountPath: /conf name: zk-config
[incubator-openwhisk-runtime-go] branch master updated: add support for confluent-go-kafka library adding librdkafka to the Go image (#71)
This is an automated email from the ASF dual-hosted git repository. msciabarra pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-openwhisk-runtime-go.git The following commit(s) were added to refs/heads/master by this push: new d787163 add support for confluent-go-kafka library adding librdkafka to the Go image (#71) d787163 is described below commit d78716340262d71d7c579ff47a00cce3c39f65f8 Author: Michele Sciabarra <30654959+sciabarra...@users.noreply.github.com> AuthorDate: Wed Feb 13 13:59:37 2019 +0100 add support for confluent-go-kafka library adding librdkafka to the Go image (#71) --- golang1.11/Dockerfile | 19 +-- 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/golang1.11/Dockerfile b/golang1.11/Dockerfile index 05415dc..6b68c38 100644 --- a/golang1.11/Dockerfile +++ b/golang1.11/Dockerfile @@ -1,10 +1,17 @@ FROM golang:1.11.4 -RUN apt-get update && apt-get install -y \ -curl \ -jq \ -git \ -realpath \ -&& rm -rf /var/lib/apt/lists/* +RUN echo "deb http://deb.debian.org/debian stretch-backports main contrib non-free" \ + >>/etc/apt/sources.list &&\ +apt-get update && apt-get install -y \ + curl \ + jq \ + git \ + realpath &&\ +apt-get -y install \ + librdkafka1=0.11.6-1~bpo9+1 \ + librdkafka++1=0.11.6-1~bpo9+1 && \ +apt-get -y install \ + librdkafka-dev=0.11.6-1~bpo9+1 && \ +rm -rf /var/lib/apt/lists/* RUN mkdir /action WORKDIR /action ADD proxy /bin/proxy
[incubator-openwhisk-deploy-kube] branch master updated: Enforce unique keys for whisk.system and guest namespaces (#419)
This is an automated email from the ASF dual-hosted git repository. msciabarra pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-openwhisk-deploy-kube.git The following commit(s) were added to refs/heads/master by this push: new 462cda8 Enforce unique keys for whisk.system and guest namespaces (#419) 462cda8 is described below commit 462cda8811ad093845977a672b8b460dd0630fce Author: David Grove AuthorDate: Wed Jan 23 15:32:32 2019 -0500 Enforce unique keys for whisk.system and guest namespaces (#419) Fixes #418 We require unique auth values for each subject. Check that the whisk.auth.guest and whisk.auth.system keys are unique during couchdb initialization and fail with a clear error message instead of allowing an unusable system to be deployed. Also add an explicit `rm` of the default keys right after the git clone of the openwhisk repository to make sure they can't be used by mistake in some subsequent script operation. --- helm/openwhisk/configMapFiles/initCouchDB/initdb.sh | 12 ++-- helm/openwhisk/configMapFiles/installPackages/myTask.sh | 1 + 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/helm/openwhisk/configMapFiles/initCouchDB/initdb.sh b/helm/openwhisk/configMapFiles/initCouchDB/initdb.sh index b42a1e9..d6171e5 100755 --- a/helm/openwhisk/configMapFiles/initCouchDB/initdb.sh +++ b/helm/openwhisk/configMapFiles/initCouchDB/initdb.sh @@ -7,11 +7,19 @@ pushd /openwhisk git checkout $OW_GIT_TAG_OPENWHISK popd -# Copy the secrets whisk.auth.guest and whisk.auth.system into the cloned tree -# overwriting the default values we cloned from git +# Install the secrets whisk.auth.guest and whisk.auth.system into the cloned tree +# after removing the defaults inherited from the checkout of openwhisk +rm -f /openwhisk/ansible/files/auth.guest /openwhisk/ansible/files/auth.whisk.system cp -f /etc/whisk-auth/guest /openwhisk/ansible/files/auth.guest cp -f /etc/whisk-auth/system /openwhisk/ansible/files/auth.whisk.system +# Sanity check: all subjects must have unique keys +if cmp -s /openwhisk/ansible/files/auth.guest /openwhisk/ansible/files/auth.whisk.system; then +echo "FATAL ERROR: unable to initialize the OpenWhisk subjects database." +echo "Cannot use identical keys for whisk.auth.system and whisk.auth.guest." +exit 1 +fi + # generate db_local.ini so the ansible jobs know how to access the database pushd /openwhisk/ansible ansible-playbook -i environments/local setup.yml diff --git a/helm/openwhisk/configMapFiles/installPackages/myTask.sh b/helm/openwhisk/configMapFiles/installPackages/myTask.sh index dcee18e..183b266 100644 --- a/helm/openwhisk/configMapFiles/installPackages/myTask.sh +++ b/helm/openwhisk/configMapFiles/installPackages/myTask.sh @@ -13,6 +13,7 @@ export PROVIDER_DB_URL=$PROVIDER_DB_PROTOCOL://$PROVIDER_DB_USERNAME:$PROVIDER_D git clone https://github.com/apache/incubator-openwhisk openwhisk pushd openwhisk git checkout $OW_GIT_TAG_OPENWHISK +rm -f /openwhisk/ansible/files/auth.guest /openwhisk/ansible/files/auth.whisk.system popd # Setup env for installRouteMgmt.sh
[incubator-openwhisk-runtime-swift] branch master updated: flush stdout stderr before sending result/signal over descriptor 3 (#91)
This is an automated email from the ASF dual-hosted git repository. msciabarra pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-openwhisk-runtime-swift.git The following commit(s) were added to refs/heads/master by this push: new 5bb0409 flush stdout stderr before sending result/signal over descriptor 3 (#91) 5bb0409 is described below commit 5bb040988330ab6288b595f198ea1a5a786409ac Author: Carlos Santana AuthorDate: Mon Jan 21 17:30:13 2019 -0500 flush stdout stderr before sending result/signal over descriptor 3 (#91) --- core/swift42Action/swiftbuild.py.launcher.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/swift42Action/swiftbuild.py.launcher.swift b/core/swift42Action/swiftbuild.py.launcher.swift index bf6b65d..a1a2cf0 100644 --- a/core/swift42Action/swiftbuild.py.launcher.swift +++ b/core/swift42Action/swiftbuild.py.launcher.swift @@ -37,9 +37,9 @@ func _whisk_print_result(jsonData: Data){ func _whisk_print_buffer(jsonString: String){ var buf : [UInt8] = Array(jsonString.utf8) buf.append(10) -write(3, buf, buf.count) fflush(stdout) fflush(stderr) +write(3, buf, buf.count) } // snippet of code "injected" (wrapper code for invoking traditional main)