From e27b2d1d10a3d24815085231c309ef1c4e979531 Mon Sep 17 00:00:00 2001 From: stanbrub Date: Thu, 26 Sep 2024 13:17:40 -0600 Subject: [PATCH 1/6] Expiry date left off days in some cases --- .github/workflows/adhoc-auto-remote-benchmarks.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/adhoc-auto-remote-benchmarks.yml b/.github/workflows/adhoc-auto-remote-benchmarks.yml index 9d6568fc..af22209c 100644 --- a/.github/workflows/adhoc-auto-remote-benchmarks.yml +++ b/.github/workflows/adhoc-auto-remote-benchmarks.yml @@ -93,7 +93,7 @@ jobs: - name: Deploy Bare Metal id: deploy-metal run: | - ${SD}/adhoc.sh deploy-metal ${METAL_API_KEY} ${METAL_PROJECT_ID} ${METAL_PLAN} ${METAL_ACTOR} ${METAL_EXPIRE} + ${SD}/adhoc.sh deploy-metal "${METAL_API_KEY}" "${METAL_PROJECT_ID}" "${METAL_PLAN}" "${METAL_ACTOR}" "${METAL_EXPIRE}" cat adhoc-deploy-metal.out >> "$GITHUB_OUTPUT" - name: Archive Setup Logs From 474b7a91f78192c6576ea1157150c354ba25ed89 Mon Sep 17 00:00:00 2001 From: stanbrub Date: Fri, 27 Sep 2024 17:08:56 -0600 Subject: [PATCH 2/6] Make device ip workflow secret --- .github/workflows/remote-benchmarks.yml | 23 +++++++---------------- 1 file changed, 7 insertions(+), 16 deletions(-) diff --git a/.github/workflows/remote-benchmarks.yml b/.github/workflows/remote-benchmarks.yml index 3b6ca4ff..1a7bb4e3 100644 --- a/.github/workflows/remote-benchmarks.yml +++ b/.github/workflows/remote-benchmarks.yml @@ -7,37 +7,28 @@ name: Benchmark Test on Docker Deephaven on: workflow_call: + secrets: + test_device_addr: + required: true inputs: run_type: required: true - type: string docker_image: - required: true - type: string + required: true run_label: required: true - type: string test_package: required: true - type: string test_class_regex: required: true - type: string test_iterations: required: true - type: string scale_row_count: required: true - type: string distribution: required: true - type: string - test_device_addr: - required: true - type: string config_options: required: true - type: string jobs: setup-benchmarks: @@ -46,7 +37,7 @@ jobs: matrix-iterations: ${{ steps.matrix-iterations.outputs.matrix-iterations }} env: SD: .github/scripts - HOST: "${{ inputs.test_device_addr == '' && secrets.BENCHMARK_HOST || inputs.test_device_addr }}" + HOST: "${{ secrets.test_device_addr == '' && secrets.BENCHMARK_HOST || secrets.test_device_addr }}" USER: ${{secrets.BENCHMARK_USER}} REPO: ${{github.repository}} BRANCH: ${{github.ref_name}} @@ -104,7 +95,7 @@ jobs: tag: ${{ fromJson(needs.setup-benchmarks.outputs.matrix-iterations) }} env: SD: .github/scripts - HOST: "${{ inputs.test_device_addr == '' && secrets.BENCHMARK_HOST || inputs.test_device_addr }}" + HOST: "${{ secrets.test_device_addr == '' && secrets.BENCHMARK_HOST || secrets.test_device_addr }}" USER: ${{secrets.BENCHMARK_USER}} RUN_TYPE: ${{inputs.run_type}} TEST_PKG: ${{inputs.test_package}} @@ -129,7 +120,7 @@ jobs: runs-on: ubuntu-22.04 env: SD: .github/scripts - HOST: "${{ inputs.test_device_addr == '' && secrets.BENCHMARK_HOST || inputs.test_device_addr }}" + HOST: "${{ secrets.test_device_addr == '' && secrets.BENCHMARK_HOST || secrets.test_device_addr }}" USER: ${{secrets.BENCHMARK_USER}} RUN_TYPE: ${{inputs.run_type}} DOCKER_IMG: ${{inputs.docker_image}} From aeec7c4ef50216770190d508841a31a988cd25d9 Mon Sep 17 00:00:00 2001 From: stanbrub Date: Fri, 27 Sep 2024 17:18:39 -0600 Subject: [PATCH 3/6] add inputs type back in --- .github/workflows/remote-benchmarks.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/workflows/remote-benchmarks.yml b/.github/workflows/remote-benchmarks.yml index 1a7bb4e3..34bdd865 100644 --- a/.github/workflows/remote-benchmarks.yml +++ b/.github/workflows/remote-benchmarks.yml @@ -13,22 +13,31 @@ on: inputs: run_type: required: true + type: string docker_image: required: true + type: string run_label: required: true + type: string test_package: required: true + type: string test_class_regex: required: true + type: string test_iterations: required: true + type: string scale_row_count: required: true + type: string distribution: required: true + type: string config_options: required: true + type: string jobs: setup-benchmarks: From a82f0d18a035e29ff3befb21fa7239e5cb61e0cd Mon Sep 17 00:00:00 2001 From: stanbrub Date: Fri, 27 Sep 2024 17:27:48 -0600 Subject: [PATCH 4/6] Added secrets inputs --- .github/workflows/adhoc-auto-remote-benchmarks.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/adhoc-auto-remote-benchmarks.yml b/.github/workflows/adhoc-auto-remote-benchmarks.yml index af22209c..043a47b8 100644 --- a/.github/workflows/adhoc-auto-remote-benchmarks.yml +++ b/.github/workflows/adhoc-auto-remote-benchmarks.yml @@ -116,9 +116,9 @@ jobs: test_iterations: ${{ needs.setup-benchmark-system.outputs.test_iterations }} scale_row_count: ${{ needs.setup-benchmark-system.outputs.test_row_count }} distribution: ${{ inputs.distribution }} - test_device_addr: ${{ needs.setup-benchmark-system.outputs.metal_ip_addr }} config_options: "" - secrets: inherit + secrets: + test_device_addr: ${{ needs.setup-benchmark-system.outputs.metal_ip_addr }} process-adhoc-benchmarks-2: needs: [setup-benchmark-system, process-adhoc-benchmarks-1] @@ -132,9 +132,9 @@ jobs: test_iterations: ${{ needs.setup-benchmark-system.outputs.test_iterations }} scale_row_count: ${{ needs.setup-benchmark-system.outputs.test_row_count }} distribution: ${{ inputs.distribution }} - test_device_addr: ${{ needs.setup-benchmark-system.outputs.metal_ip_addr }} config_options: "" - secrets: inherit + secrets: + test_device_addr: ${{ needs.setup-benchmark-system.outputs.metal_ip_addr }} teardown-benchmark-system: if: ${{ always() && needs.setup-benchmark-system.outputs.metal_device_id }} From 8988370c7ce59398ff4ca84745c518066f0c39ce Mon Sep 17 00:00:00 2001 From: stanbrub Date: Fri, 27 Sep 2024 17:53:08 -0600 Subject: [PATCH 5/6] inherit secrets --- .github/workflows/remote-benchmarks.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/remote-benchmarks.yml b/.github/workflows/remote-benchmarks.yml index 34bdd865..b9cab74a 100644 --- a/.github/workflows/remote-benchmarks.yml +++ b/.github/workflows/remote-benchmarks.yml @@ -7,9 +7,7 @@ name: Benchmark Test on Docker Deephaven on: workflow_call: - secrets: - test_device_addr: - required: true + secrets: inherit inputs: run_type: required: true From 5c6ea3c0befee80d992d9facc037abebada174db Mon Sep 17 00:00:00 2001 From: stanbrub Date: Fri, 27 Sep 2024 19:58:29 -0600 Subject: [PATCH 6/6] Reverted secret nonsense. Added copyrights --- .github/scripts/adhoc.sh | 2 ++ .../scripts/build-server-distribution-remote.sh | 2 ++ .github/scripts/dh-jetty-start.sh | 2 ++ .github/scripts/dh-jetty-stop.sh | 2 ++ .github/scripts/fetch-results-local.sh | 2 ++ .github/scripts/manage-deephaven-remote.sh | 2 ++ .github/scripts/matrix_array.sh | 2 ++ .github/scripts/run-benchmarks-remote.sh | 2 ++ .github/scripts/run-publish-local.sh | 2 ++ .github/scripts/run-ssh-local.sh | 2 ++ .github/scripts/setup-ssh-local.sh | 2 ++ .github/scripts/setup-test-server-remote.sh | 4 +++- .github/scripts/uninstall-docker.sh | 1 + .../workflows/adhoc-auto-remote-benchmarks.yml | 10 ++++++---- .../workflows/adhoc-exist-remote-benchmarks.yml | 2 ++ .github/workflows/compare-remote-benchmarks.yml | 2 ++ .github/workflows/mvn-integration-test.yml | 2 ++ .github/workflows/mvn-package.yml | 2 ++ .github/workflows/nightly-remote-benchmarks.yml | 2 ++ .github/workflows/release-remote-benchmarks.yml | 2 ++ .github/workflows/remote-benchmarks.yml | 16 ++++++++++------ 21 files changed, 54 insertions(+), 11 deletions(-) diff --git a/.github/scripts/adhoc.sh b/.github/scripts/adhoc.sh index 03c49f9a..6e60aaf0 100755 --- a/.github/scripts/adhoc.sh +++ b/.github/scripts/adhoc.sh @@ -3,6 +3,8 @@ set -o errexit set -o pipefail +# Copyright (c) 2023-2024 Deephaven Data Labs and Patent Pending + # Provides what is needed to set up an adhoc benchmark run, including bare metal and labels # ex. adhoc.sh make-labels "where" "0.36.0" "user123:branch-name-123" # ex. adhoc.sh metal-deploy api-key project-id c3.small.x86 server-name "2 days" diff --git a/.github/scripts/build-server-distribution-remote.sh b/.github/scripts/build-server-distribution-remote.sh index 497647c0..e21d9398 100755 --- a/.github/scripts/build-server-distribution-remote.sh +++ b/.github/scripts/build-server-distribution-remote.sh @@ -3,6 +3,8 @@ set -o errexit set -o pipefail +# Copyright (c) 2023-2024 Deephaven Data Labs and Patent Pending + # Assemble the Deephaven server artifacts on the remote side if needed # The supplied argument can be an image name or :: # Ensure that the artifacts and Deephaven version are available in standard directories diff --git a/.github/scripts/dh-jetty-start.sh b/.github/scripts/dh-jetty-start.sh index 2976f186..b9021181 100755 --- a/.github/scripts/dh-jetty-start.sh +++ b/.github/scripts/dh-jetty-start.sh @@ -3,6 +3,8 @@ set -o errexit set -o pipefail +# Copyright (c) 2023-2024 Deephaven Data Labs and Patent Pending + # Build and start the python native Deephaven Community Server MY_ID=DH_JETTY_BY_STAN diff --git a/.github/scripts/dh-jetty-stop.sh b/.github/scripts/dh-jetty-stop.sh index 1a9d6339..caadb963 100755 --- a/.github/scripts/dh-jetty-stop.sh +++ b/.github/scripts/dh-jetty-stop.sh @@ -4,6 +4,8 @@ # set -o pipefail # set -o nounset +# Copyright (c) 2023-2024 Deephaven Data Labs and Patent Pending + # Stop the native python Deephaven Community Server MY_ID=DH_JETTY_BY_STAN diff --git a/.github/scripts/fetch-results-local.sh b/.github/scripts/fetch-results-local.sh index 98f10c60..cae3ce0c 100755 --- a/.github/scripts/fetch-results-local.sh +++ b/.github/scripts/fetch-results-local.sh @@ -4,6 +4,8 @@ set -o errexit set -o pipefail set -o nounset +# Copyright (c) 2023-2024 Deephaven Data Labs and Patent Pending + # Fetches Benchmark results and logs from the remote test server and # compresses the runs before upload. Writes an output file with the # SET_LABEL that was used for the set directory name diff --git a/.github/scripts/manage-deephaven-remote.sh b/.github/scripts/manage-deephaven-remote.sh index 4e04906d..06c0d475 100755 --- a/.github/scripts/manage-deephaven-remote.sh +++ b/.github/scripts/manage-deephaven-remote.sh @@ -3,6 +3,8 @@ set -o errexit set -o pipefail +# Copyright (c) 2023-2024 Deephaven Data Labs and Patent Pending + # Start or Stop a Deephaven image based on the given directive and image/branch name # The directives argument can be start or stop # The supplied image argument can be an image name or :: diff --git a/.github/scripts/matrix_array.sh b/.github/scripts/matrix_array.sh index d58f8a16..3fade347 100755 --- a/.github/scripts/matrix_array.sh +++ b/.github/scripts/matrix_array.sh @@ -3,6 +3,8 @@ set -o errexit set -o pipefail +# Copyright (c) 2023-2024 Deephaven Data Labs and Patent Pending + # For a given descriptor, return the appropriate array that can be read by a Github # workflow with fromJSON(array) # ex. matrix_array.sh matrix-arr adhoc 5 diff --git a/.github/scripts/run-benchmarks-remote.sh b/.github/scripts/run-benchmarks-remote.sh index 9f51a1c0..fbe9d242 100755 --- a/.github/scripts/run-benchmarks-remote.sh +++ b/.github/scripts/run-benchmarks-remote.sh @@ -4,6 +4,8 @@ set -o errexit set -o pipefail set -o nounset +# Copyright (c) 2023-2024 Deephaven Data Labs and Patent Pending + # Run benchmarks on the remote side doing one iteration according to the following contract: # - If TAG_NAME is "Any", run all tests # - If TAG_NAME starts with "!", run all tests except the named tag diff --git a/.github/scripts/run-publish-local.sh b/.github/scripts/run-publish-local.sh index e3f2fbc2..d98d37a3 100755 --- a/.github/scripts/run-publish-local.sh +++ b/.github/scripts/run-publish-local.sh @@ -4,6 +4,8 @@ set -o errexit set -o pipefail set -o nounset +# Copyright (c) 2023-2024 Deephaven Data Labs and Patent Pending + # Run queries that publish a secret slack channel. Queries operation exclusively # the deephaven-benchmark GCloud bucket diff --git a/.github/scripts/run-ssh-local.sh b/.github/scripts/run-ssh-local.sh index 103792c7..e82fe24d 100755 --- a/.github/scripts/run-ssh-local.sh +++ b/.github/scripts/run-ssh-local.sh @@ -4,6 +4,8 @@ set -o errexit set -o pipefail set -o nounset +# Copyright (c) 2023-2024 Deephaven Data Labs and Patent Pending + # Executes a local script on a remote server while storing output relative to the # local working directory. Also, this script wraps arguments provided for the # remote scripts in single-quotes to avoid syntax errors. diff --git a/.github/scripts/setup-ssh-local.sh b/.github/scripts/setup-ssh-local.sh index 64408671..d5abb504 100644 --- a/.github/scripts/setup-ssh-local.sh +++ b/.github/scripts/setup-ssh-local.sh @@ -4,6 +4,8 @@ set -o errexit set -o pipefail set -o nounset +# Copyright (c) 2023-2024 Deephaven Data Labs and Patent Pending + # Setup SSH for connection between github node and remote host HOST=$1 diff --git a/.github/scripts/setup-test-server-remote.sh b/.github/scripts/setup-test-server-remote.sh index e511c806..04995d68 100755 --- a/.github/scripts/setup-test-server-remote.sh +++ b/.github/scripts/setup-test-server-remote.sh @@ -4,7 +4,9 @@ set -o errexit set -o pipefail set -o nounset -# Runs the remote side of test server setup +# Copyright (c) 2023-2024 Deephaven Data Labs and Patent Pending + +# Runs the remote test server setup where the benchmarks will be run if [ ! -d "/root" ]; then echo "$0: Missing the Benchmark install directory" diff --git a/.github/scripts/uninstall-docker.sh b/.github/scripts/uninstall-docker.sh index 6c217156..3e3c64e5 100755 --- a/.github/scripts/uninstall-docker.sh +++ b/.github/scripts/uninstall-docker.sh @@ -1,3 +1,4 @@ +# Copyright (c) 2023-2024 Deephaven Data Labs and Patent Pending apt-get purge docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin docker-ce-rootless-extras rm -rf /var/lib/docker diff --git a/.github/workflows/adhoc-auto-remote-benchmarks.yml b/.github/workflows/adhoc-auto-remote-benchmarks.yml index 043a47b8..b9a46a5c 100644 --- a/.github/workflows/adhoc-auto-remote-benchmarks.yml +++ b/.github/workflows/adhoc-auto-remote-benchmarks.yml @@ -1,3 +1,5 @@ +# Copyright (c) 2023-2024 Deephaven Data Labs and Patent Pending + # Provision a server and run benchmarks on that system, cleaning up after # - Deploys a new server on the fly # - Calls the reusable worflow remote-benchmarks.yml to run and upload benchmarks @@ -116,9 +118,9 @@ jobs: test_iterations: ${{ needs.setup-benchmark-system.outputs.test_iterations }} scale_row_count: ${{ needs.setup-benchmark-system.outputs.test_row_count }} distribution: ${{ inputs.distribution }} - config_options: "" - secrets: test_device_addr: ${{ needs.setup-benchmark-system.outputs.metal_ip_addr }} + config_options: "" + secrets: inherit process-adhoc-benchmarks-2: needs: [setup-benchmark-system, process-adhoc-benchmarks-1] @@ -132,9 +134,9 @@ jobs: test_iterations: ${{ needs.setup-benchmark-system.outputs.test_iterations }} scale_row_count: ${{ needs.setup-benchmark-system.outputs.test_row_count }} distribution: ${{ inputs.distribution }} - config_options: "" - secrets: test_device_addr: ${{ needs.setup-benchmark-system.outputs.metal_ip_addr }} + config_options: "" + secrets: inherit teardown-benchmark-system: if: ${{ always() && needs.setup-benchmark-system.outputs.metal_device_id }} diff --git a/.github/workflows/adhoc-exist-remote-benchmarks.yml b/.github/workflows/adhoc-exist-remote-benchmarks.yml index 22ebb5f0..168e1b2e 100644 --- a/.github/workflows/adhoc-exist-remote-benchmarks.yml +++ b/.github/workflows/adhoc-exist-remote-benchmarks.yml @@ -1,3 +1,5 @@ +# Copyright (c) 2023-2024 Deephaven Data Labs and Patent Pending + # Run benchmarks on an already provisioned system # - Calls the reusable worflow remote-benchmarks.yml to run and upload benchmarks # - Runs the given options with the given image/branch diff --git a/.github/workflows/compare-remote-benchmarks.yml b/.github/workflows/compare-remote-benchmarks.yml index 3f7c30fe..7b8306d3 100644 --- a/.github/workflows/compare-remote-benchmarks.yml +++ b/.github/workflows/compare-remote-benchmarks.yml @@ -1,3 +1,5 @@ +# Copyright (c) 2023-2024 Deephaven Data Labs and Patent Pending + # Run comparison (competitive) benchmarks on a remote system # according to the release defined in resources/release-benchmark-docker-compose.yml # in resources/release-benchmark-docker-compose.yml diff --git a/.github/workflows/mvn-integration-test.yml b/.github/workflows/mvn-integration-test.yml index 1903f1b6..22233bf5 100644 --- a/.github/workflows/mvn-integration-test.yml +++ b/.github/workflows/mvn-integration-test.yml @@ -1,3 +1,5 @@ +# Copyright (c) 2023-2024 Deephaven Data Labs and Patent Pending + # Run Integration Tests against a Docker install on Github name: Integration Test on Docker Deephaven diff --git a/.github/workflows/mvn-package.yml b/.github/workflows/mvn-package.yml index 0220ea28..089729f5 100644 --- a/.github/workflows/mvn-package.yml +++ b/.github/workflows/mvn-package.yml @@ -1,3 +1,5 @@ +# Copyright (c) 2023-2024 Deephaven Data Labs and Patent Pending + # Build, Run Unit tests, and make the Benchmark artifacts; jar and test-jar name: Unit Test and Package diff --git a/.github/workflows/nightly-remote-benchmarks.yml b/.github/workflows/nightly-remote-benchmarks.yml index c3710fd8..2178418b 100644 --- a/.github/workflows/nightly-remote-benchmarks.yml +++ b/.github/workflows/nightly-remote-benchmarks.yml @@ -1,3 +1,5 @@ +# Copyright (c) 2023-2024 Deephaven Data Labs and Patent Pending + # Run benchmarks on a remote system for the nightly (edge) build # - Calls the reusable worflow remote-benchmarks.yml diff --git a/.github/workflows/release-remote-benchmarks.yml b/.github/workflows/release-remote-benchmarks.yml index 74a355f3..72f04502 100644 --- a/.github/workflows/release-remote-benchmarks.yml +++ b/.github/workflows/release-remote-benchmarks.yml @@ -1,3 +1,5 @@ +# Copyright (c) 2023-2024 Deephaven Data Labs and Patent Pending + # Run benchmarks on a remote system according to the release defined # in resources/release-benchmark-docker-compose.yml # - Calls the reusable worflow remote-benchmarks.yml diff --git a/.github/workflows/remote-benchmarks.yml b/.github/workflows/remote-benchmarks.yml index b9cab74a..2aa2e83a 100644 --- a/.github/workflows/remote-benchmarks.yml +++ b/.github/workflows/remote-benchmarks.yml @@ -1,3 +1,5 @@ +# Copyright (c) 2023-2024 Deephaven Data Labs and Patent Pending + # Run benchmarks on a remote system for the release the project is using # - This workflow is reusable with run_type set to release or nightly # - Scripts ending in "-local" run on the github runner @@ -7,14 +9,13 @@ name: Benchmark Test on Docker Deephaven on: workflow_call: - secrets: inherit inputs: run_type: required: true type: string docker_image: - required: true - type: string + required: true + type: string run_label: required: true type: string @@ -33,6 +34,9 @@ on: distribution: required: true type: string + test_device_addr: + required: true + type: string config_options: required: true type: string @@ -44,7 +48,7 @@ jobs: matrix-iterations: ${{ steps.matrix-iterations.outputs.matrix-iterations }} env: SD: .github/scripts - HOST: "${{ secrets.test_device_addr == '' && secrets.BENCHMARK_HOST || secrets.test_device_addr }}" + HOST: "${{ inputs.test_device_addr == '' && secrets.BENCHMARK_HOST || inputs.test_device_addr }}" USER: ${{secrets.BENCHMARK_USER}} REPO: ${{github.repository}} BRANCH: ${{github.ref_name}} @@ -102,7 +106,7 @@ jobs: tag: ${{ fromJson(needs.setup-benchmarks.outputs.matrix-iterations) }} env: SD: .github/scripts - HOST: "${{ secrets.test_device_addr == '' && secrets.BENCHMARK_HOST || secrets.test_device_addr }}" + HOST: "${{ inputs.test_device_addr == '' && secrets.BENCHMARK_HOST || inputs.test_device_addr }}" USER: ${{secrets.BENCHMARK_USER}} RUN_TYPE: ${{inputs.run_type}} TEST_PKG: ${{inputs.test_package}} @@ -127,7 +131,7 @@ jobs: runs-on: ubuntu-22.04 env: SD: .github/scripts - HOST: "${{ secrets.test_device_addr == '' && secrets.BENCHMARK_HOST || secrets.test_device_addr }}" + HOST: "${{ inputs.test_device_addr == '' && secrets.BENCHMARK_HOST || inputs.test_device_addr }}" USER: ${{secrets.BENCHMARK_USER}} RUN_TYPE: ${{inputs.run_type}} DOCKER_IMG: ${{inputs.docker_image}}