[GitHub] [openwhisk] msciabarra commented on a diff in pull request #5361: GitHub action

2022-12-14 Thread GitBox


msciabarra commented on code in PR #5361:
URL: https://github.com/apache/openwhisk/pull/5361#discussion_r1049281941


##
tools/github/runDummyKOTests.sh:
##
@@ -0,0 +1,26 @@
+#!/usr/bin/env bash

Review Comment:
   yes to test a failing build...



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

To unsubscribe, e-mail: issues-unsubscr...@openwhisk.apache.org

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



[GitHub] [openwhisk] msciabarra commented on a diff in pull request #5361: GitHub action

2022-12-14 Thread GitBox


msciabarra commented on code in PR #5361:
URL: https://github.com/apache/openwhisk/pull/5361#discussion_r1049281580


##
tools/github/setup.sh:
##
@@ -0,0 +1,79 @@
+#!/bin/bash
+#
+# 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.
+#
+
+#if [[ $TEST_SUITE =~ Dummy ]]
+#then echo skipping setup ; exit 0
+#fi
+
+# retries a command for five times and exits with the non-zero exit if even 
after
+# the retries the command did not succeed.
+function retry() {
+  local exitcode=0
+  for i in {1..5};
+  do
+exitcode=0
+"$@" && break || exitcode=$? && echo "$i. attempt failed. Will retry 
$((5-i)) more times!" && sleep 1;
+  done
+  if [ $exitcode -ne 0 ]; then
+exit $exitcode
+  fi
+}
+
+# setup docker to listen in port 4243
+sudo systemctl stop docker
+sudo sed -i -e 's!/usr/bin/dockerd -H fd://!/usr/bin/dockerd -H 
tcp://0.0.0.0:4243 -H fd://!' /lib/systemd/system/docker.service

Review Comment:
   At least in the 1.0.0 branch one test fails... Let me see if we can get rid 
of this on the master



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

To unsubscribe, e-mail: issues-unsubscr...@openwhisk.apache.org

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



[GitHub] [openwhisk] msciabarra commented on a diff in pull request #5361: GitHub action

2022-12-14 Thread GitBox


msciabarra commented on code in PR #5361:
URL: https://github.com/apache/openwhisk/pull/5361#discussion_r1049279967


##
tools/github/setup.sh:
##
@@ -0,0 +1,79 @@
+#!/bin/bash
+#
+# 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.
+#
+
+#if [[ $TEST_SUITE =~ Dummy ]]

Review Comment:
   no, if you do not want to defeat the goal of the dummy test to avoid to run 
a fast build withou waiting an hour...



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

To unsubscribe, e-mail: issues-unsubscr...@openwhisk.apache.org

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



[GitHub] [openwhisk] msciabarra commented on a diff in pull request #5361: GitHub action

2022-12-14 Thread GitBox


msciabarra commented on code in PR #5361:
URL: https://github.com/apache/openwhisk/pull/5361#discussion_r1049279581


##
tools/github/runDummyTests.sh:
##
@@ -0,0 +1,26 @@
+#!/usr/bin/env bash

Review Comment:
   to test the build without having to run a full test... it is handy to debug 
secrets and so on



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

To unsubscribe, e-mail: issues-unsubscr...@openwhisk.apache.org

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



[GitHub] [openwhisk] msciabarra commented on a diff in pull request #5361: GitHub action

2022-12-14 Thread GitBox


msciabarra commented on code in PR #5361:
URL: https://github.com/apache/openwhisk/pull/5361#discussion_r1049279054


##
.github/workflows/README.md:
##
@@ -0,0 +1,56 @@
+# How to use those workflows
+
+There are a few [GitHub 
secrets](https://docs.github.com/en/actions/security-guides/encrypted-secrets) 
to configure to fully leverage the build.
+
+You can use and set the followings secrets also in your fork.
+
+## Ngrok Debugging
+
+You can debug a GitHub Action build using [NGROK](https://ngrok.com/).
+
+It is disabled for automated build triggered by push and pull_requests.
+
+You can trigger a workflow run manually  enabling ngrok debugging.
+
+It will open an ssh connection to the VM and keep it up and running for one 
hour.
+The connection url is showns in the log for debugAction.sh
+
+You can then connect to the build vm, and debug it.
+You need to use a password of your choice to access it.
+
+You can continue the build with `touch /tmp/continue`.
+You can abort the build with `touch /tmp/abort`.
+
+To enable this option you have to register to Ngrok, using the fee account and 
get the NGROK Token.
+
+Then set the following secrets:
+
+- `NGROK_TOKEN` to the ngrok token.
+- `NGROK_PASSWORD` to a password of choice to access the build with the ssh 
command generated.
+
+## Log Upload
+
+The build uploads the logs to an s3 bucket allowing to inspect them with a 
browser.
+
+You need to create the bucket with the following commands:
+
+```
+AWS_BUCKET=
+AWS_REGION=
+aws s3 mb s3://$AWS_BUCKET --region $AWS_REGION
+aws s3 website s3://$AWS_BUCKET/ --index-document index.html
+aws s3api put-bucket-acl --acl public-read --bucket $AWS_BUCKET
+```
+
+To enable upload to the created bucket you need to set the following secrets:
+
+- `AWS_BUCKET`: name of your bucket in s3 (just the name, without `s3://`); 
create it before.
+- `AWS_ACCESS_KEY_ID`: your aws access key.
+- `AWS_SECRET_ACCESS_KEY`: your aws secret key.
+- `AWS_REGION`: important: the region where your bucket is.
+
+## Slack notification
+
+If you want to get notified of what happens on slack, create an [Incoming Web 
Hook](https://api.slack.com/messaging/webhooks) and then set the following 
secret:
+
+- `SLACK_WEBHOOK`: the incoming webhook url provided by slack.

Review Comment:
   You can use it with the current OpenWhisk slack. I do not know who has 
access to the slack configuration. All you need to do is to create an app and 
retrieve the incoming webhook. And you can use the exiting dev channel on 
OpenWhisk slack



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

To unsubscribe, e-mail: issues-unsubscr...@openwhisk.apache.org

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



[GitHub] [openwhisk] msciabarra commented on a diff in pull request #5361: GitHub action

2022-12-14 Thread GitBox


msciabarra commented on code in PR #5361:
URL: https://github.com/apache/openwhisk/pull/5361#discussion_r1049270136


##
.github/workflows/0-on-demand.yaml:
##
@@ -0,0 +1,94 @@
+# 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
+- Performance
+## Uncomment those to debug the build
+- Dummy
+#- DummyKO
+
+env:
+  # openwhisk env
+  TEST_SUITE: ${{ inputs.test_suite }}
+  ANSIBLE_CMD: "ansible-playbook -i environments/local -e 
docker_image_prefix=testing"
+  GRADLE_PROJS_SKIP: ""
+
+  # (optional) slack incoming wehbook for notifications
+  SLACK_WEBHOOK: ${{secrets.SLACK_WEBHOOK}}
+
+  # (optional) s3 log upload
+  AWS_BUCKET: ${{ secrets.AWS_BUCKET }}

Review Comment:
   Yes you can put your own AWS_BUCKET where you want. The bucket can be made 
public as I did here: 
https://nuvolaris-logs.s3.eu-central-1.amazonaws.com/index.html.
   Instructions are in the README.
   Actually, since there is already a bucket configured for some tests, it will 
be used!
   Maybe this is not what the owner of the bucket wants.
   We need to get a bucket from Amazon or from some other cloud provider, I am 
sure there are donations somewhere of resources that we can use...



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

To unsubscribe, e-mail: issues-unsubscr...@openwhisk.apache.org

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



[GitHub] [openwhisk] msciabarra commented on a diff in pull request #5361: GitHub action

2022-12-14 Thread GitBox


msciabarra commented on code in PR #5361:
URL: https://github.com/apache/openwhisk/pull/5361#discussion_r1049267204


##
.github/workflows/0-on-demand.yaml:
##
@@ -0,0 +1,94 @@
+# 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:

Review Comment:
   The NGROK support is now only in the "on demand" task that must be manually 
activated.
   So you trigger it when you want. Works in your fork, so you have to add the 
token only for your it. When it is enabled in the actions a menu to trigger 
manually appears, and you have to check the box and select the test you want to 
run as below.
   
   ![Screenshot 2022-12-15 at 06 40 
26](https://user-images.githubusercontent.com/1595312/207790563-c5d85b79-13c6-4273-8f8e-6203dedff050.png)
   



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

To unsubscribe, e-mail: issues-unsubscr...@openwhisk.apache.org

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



[GitHub] [openwhisk] style95 commented on a diff in pull request #5361: GitHub action

2022-12-14 Thread GitBox


style95 commented on code in PR #5361:
URL: https://github.com/apache/openwhisk/pull/5361#discussion_r1049127546


##
.github/workflows/0-on-demand.yaml:
##
@@ -0,0 +1,94 @@
+# 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
+- Performance
+## Uncomment those to debug the build
+- Dummy
+#- DummyKO
+
+env:
+  # openwhisk env
+  TEST_SUITE: ${{ inputs.test_suite }}
+  ANSIBLE_CMD: "ansible-playbook -i environments/local -e 
docker_image_prefix=testing"
+  GRADLE_PROJS_SKIP: ""
+
+  # (optional) slack incoming wehbook for notifications
+  SLACK_WEBHOOK: ${{secrets.SLACK_WEBHOOK}}
+
+  # (optional) s3 log upload
+  AWS_BUCKET: ${{ secrets.AWS_BUCKET }}

Review Comment:
   Same for NGROK, so now contributors are in charge of uploading logs to their 
own environment to figure out the failed tests of a PR.
   For periodic tests against the upstream master branch, those who have 
permission can configure proper secrets for the upstream repo.
   
   It needs to be discussed where to place such logs.
   



##
tools/github/runDummyTests.sh:
##
@@ -0,0 +1,26 @@
+#!/usr/bin/env bash

Review Comment:
   What is the purpose of this?
   Seems it's being used here.
   
https://github.com/apache/openwhisk/pull/5361/files#diff-fc5257f5200a46b6baab3ca657b694cc84dc77e3a5f9d71062b25fce994c02b4R70



##
tools/github/setup.sh:
##
@@ -0,0 +1,79 @@
+#!/bin/bash
+#
+# 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.
+#
+
+#if [[ $TEST_SUITE =~ Dummy ]]

Review Comment:
   This might need to be deleted?



##
tools/github/runDummyKOTests.sh:
##
@@ -0,0 +1,26 @@
+#!/usr/bin/env bash

Review Comment:
   Is this being used?



##
.github/workflows/README.md:
##
@@ -0,0 +1,56 @@
+# How to use those workflows
+
+There are a few [GitHub 
secrets](https://docs.github.com/en/actions/security-guides/encrypted-secrets) 
to configure to fully leverage the build.
+
+You can use and set the followings secrets also in your fork.
+
+## Ngrok Debugging
+
+You can debug a GitHub Action build using [NGROK](https://ngrok.com/).
+
+It is disabled for automated build triggered by push and pull_requests.
+
+You can trigger a workflow run manually  enabling ngrok debugging.
+
+It will open an ssh connection to the VM and keep it up and running for one 
hour.
+The connection url is showns in the log for debugAction.sh
+
+You can then connect to the build vm, and debug it.
+You need to use a password of your choice to access it.
+
+You can continue the build with `touch /tmp/continue`.
+You can abort the build with `touch /tmp/abort`.
+
+To enable this option you have to register to Ngrok, using the fee account and 
get the NGROK Token.
+
+Then set the following secrets:
+
+- `NGROK_TOKEN` to the ngrok token.
+- `NGROK_PASSWORD` to a password of choice to access the build with the ssh 
command generated.
+
+## Log Upload
+
+The build uploads the logs to an s3 bucket allowing to inspect them with a 
browser.
+
+You need to create the bucket with the following commands:

[GitHub] [openwhisk] bdoyle0182 closed pull request #5361: GitHub action

2022-12-14 Thread GitBox


bdoyle0182 closed pull request #5361: GitHub action
URL: https://github.com/apache/openwhisk/pull/5361


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

To unsubscribe, e-mail: issues-unsubscr...@openwhisk.apache.org

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



[GitHub] [openwhisk] msciabarra commented on pull request #5361: GitHub action

2022-12-14 Thread GitBox


msciabarra commented on PR #5361:
URL: https://github.com/apache/openwhisk/pull/5361#issuecomment-1351876274

   Sorry my mistake. Please merge now. I tested the build against my fork and 
it works.


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

To unsubscribe, e-mail: issues-unsubscr...@openwhisk.apache.org

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



[GitHub] [openwhisk] msciabarra commented on pull request #5361: GitHub action

2022-12-14 Thread GitBox


msciabarra commented on PR #5361:
URL: https://github.com/apache/openwhisk/pull/5361#issuecomment-1351868853

   Yes, I confirm the master is NOT broken. Indeed I was able to run all the 
master tests against my fork. At this point I think it is safe to merge.
   ![Uploading Screenshot 2022-12-14 at 17.59.47.png…]()
   


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

To unsubscribe, e-mail: issues-unsubscr...@openwhisk.apache.org

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



[GitHub] [openwhisk] msciabarra closed pull request #5361: GitHub action

2022-12-14 Thread GitBox


msciabarra closed pull request #5361: GitHub action
URL: https://github.com/apache/openwhisk/pull/5361


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

To unsubscribe, e-mail: issues-unsubscr...@openwhisk.apache.org

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



[GitHub] [openwhisk] bdoyle0182 commented on pull request #5361: GitHub action

2022-12-14 Thread GitBox


bdoyle0182 commented on PR #5361:
URL: https://github.com/apache/openwhisk/pull/5361#issuecomment-1351783515

   To Dom's comment on aligning with master past 1.0.0 and the email sent to 
the dev list, I don't think master is broken. The CI tests should all pass, I 
think there was some flakiness with travis / the scheduler tests that would 
require you to re-kick the travis job to get them to pass; but master should be 
in a fine state.
   
   Thank you so much for the effort on this before the holidays.


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

To unsubscribe, e-mail: issues-unsubscr...@openwhisk.apache.org

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



[GitHub] [openwhisk] qi0523 closed issue #5362: Using Production Traces to Test Openwhisk

2022-12-14 Thread GitBox


qi0523 closed issue #5362: Using Production Traces to Test Openwhisk
URL: https://github.com/apache/openwhisk/issues/5362


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

To unsubscribe, e-mail: issues-unsubscr...@openwhisk.apache.org

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