From 65f83a8fc0d3f6f58025012020a2fc0d62eee87f Mon Sep 17 00:00:00 2001 From: rasswanth-s <43314053+rasswanth-s@users.noreply.github.com> Date: Wed, 14 Feb 2024 18:04:53 +0530 Subject: [PATCH 01/23] trying macos arm64 runners --- .github/workflows/cd-post-release-tests.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/cd-post-release-tests.yml b/.github/workflows/cd-post-release-tests.yml index 6996b5a06df..aa08789d985 100644 --- a/.github/workflows/cd-post-release-tests.yml +++ b/.github/workflows/cd-post-release-tests.yml @@ -15,11 +15,16 @@ jobs: strategy: max-parallel: 99 matrix: - os: [ubuntu-latest, macos-latest, windows-latest] + os: [ubuntu-latest, macos-latest, windows-latest, macos-14] python-version: ["3.11", "3.10", "3.9"] runs-on: ${{ matrix.os }} steps: + - name: System Architecture + run: | + echo "System Architecture: $(uname -m)" + echo "System Version: $(uname -a)" + - uses: actions/checkout@v4 - name: Set up Python ${{ matrix.python-version }} From 7f808b704c0e04561bbdf8a6ad1b7d4cb5fc887e Mon Sep 17 00:00:00 2001 From: rasswanth-s <43314053+rasswanth-s@users.noreply.github.com> Date: Wed, 14 Feb 2024 18:18:38 +0530 Subject: [PATCH 02/23] commented out Mac Arm python version --- .github/workflows/cd-post-release-tests.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/cd-post-release-tests.yml b/.github/workflows/cd-post-release-tests.yml index aa08789d985..8555e37867d 100644 --- a/.github/workflows/cd-post-release-tests.yml +++ b/.github/workflows/cd-post-release-tests.yml @@ -15,7 +15,9 @@ jobs: strategy: max-parallel: 99 matrix: - os: [ubuntu-latest, macos-latest, windows-latest, macos-14] + os: [ubuntu-latest, macos-latest, windows-latest] + # Re-enable macos-14 when it's available when we remove python 3.9 from syft + # os: [ubuntu-latest, macos-latest, windows-latest, macos-14] python-version: ["3.11", "3.10", "3.9"] runs-on: ${{ matrix.os }} From 326b6fe8a6ea4fcb7dc39c1c5c5ca9b307e8c9a4 Mon Sep 17 00:00:00 2001 From: rasswanth-s <43314053+rasswanth-s@users.noreply.github.com> Date: Wed, 14 Feb 2024 18:34:00 +0530 Subject: [PATCH 03/23] test hagrid launch --- .github/workflows/cd-post-release-tests.yml | 71 +++++++++++++++++---- 1 file changed, 59 insertions(+), 12 deletions(-) diff --git a/.github/workflows/cd-post-release-tests.yml b/.github/workflows/cd-post-release-tests.yml index 8555e37867d..c6219955e34 100644 --- a/.github/workflows/cd-post-release-tests.yml +++ b/.github/workflows/cd-post-release-tests.yml @@ -11,22 +11,15 @@ on: type: string jobs: - syft-install-check: + notebook-test-hagrid: strategy: max-parallel: 99 matrix: - os: [ubuntu-latest, macos-latest, windows-latest] - # Re-enable macos-14 when it's available when we remove python 3.9 from syft - # os: [ubuntu-latest, macos-latest, windows-latest, macos-14] - python-version: ["3.11", "3.10", "3.9"] + os: [ubuntu-latest] + python-version: ["3.11"] runs-on: ${{ matrix.os }} steps: - - name: System Architecture - run: | - echo "System Architecture: $(uname -m)" - echo "System Version: $(uname -a)" - - uses: actions/checkout@v4 - name: Set up Python ${{ matrix.python-version }} @@ -57,6 +50,60 @@ jobs: run: | pip install syft==${{ github.event.inputs.syft_version }} - - name: Check Syft version + - name: Hagrid Version + run: | + hagrid version + + - name: Launch Domain run: | - python -c "import syft; print(syft.__version__)" + hagrid launch test-domain-1 to docker:8081 --tag=${{ github.event.inputs.syft_version }} + + # syft-install-check: + # strategy: + # max-parallel: 99 + # matrix: + # os: [ubuntu-latest, macos-latest, windows-latest] + # # Re-enable macos-14 when it's available when we remove python 3.9 from syft + # # os: [ubuntu-latest, macos-latest, windows-latest, macos-14] + # python-version: ["3.11", "3.10", "3.9"] + + # runs-on: ${{ matrix.os }} + # steps: + # - name: System Architecture + # run: | + # echo "System Architecture: $(uname -m)" + # echo "System Version: $(uname -a)" + + # - uses: actions/checkout@v4 + + # - name: Set up Python ${{ matrix.python-version }} + # uses: actions/setup-python@v5 + + # with: + # python-version: ${{ matrix.python-version }} + + # - name: Upgrade pip + # run: | + # python -m pip install --upgrade --user pip + + # - name: Get pip cache dir + # id: pip-cache + # shell: bash + # run: | + # echo "dir=$(pip cache dir)" >> $GITHUB_OUTPUT + + # - name: pip cache + # uses: actions/cache@v4 + # with: + # path: ${{ steps.pip-cache.outputs.dir }} + # key: ${{ runner.os }}-pip-py${{ matrix.python-version }}-${{ hashFiles('setup.cfg') }} + # restore-keys: | + # ${{ runner.os }}-pip-py${{ matrix.python-version }}- + + # - name: Install Syft + # run: | + # pip install syft==${{ github.event.inputs.syft_version }} + + # - name: Check Syft version + # run: | + # python -c "import syft; print(syft.__version__)" From 952c0837c2126bcb6f4281abb295a42dc731fefb Mon Sep 17 00:00:00 2001 From: rasswanth-s <43314053+rasswanth-s@users.noreply.github.com> Date: Wed, 14 Feb 2024 18:44:47 +0530 Subject: [PATCH 04/23] try automating hagrid tests --- .github/workflows/cd-post-release-tests.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/.github/workflows/cd-post-release-tests.yml b/.github/workflows/cd-post-release-tests.yml index c6219955e34..6437cb893a8 100644 --- a/.github/workflows/cd-post-release-tests.yml +++ b/.github/workflows/cd-post-release-tests.yml @@ -58,6 +58,21 @@ jobs: run: | hagrid launch test-domain-1 to docker:8081 --tag=${{ github.event.inputs.syft_version }} + - name: Install pytest and nbmake + run: | + pip install pytest nbmake + + # Ideally we should run it in a tox test, but for now we are just running it in the main environment + # as we have three different types of tests for notebooks + # tox -e stack.test.notebook + # tox -e syft.test.notebook + # tox -e stack.test.integration.k8s + - name: Run tests + env: + ORCHESTRA_DEPLOYMENT_TYPE: "container_stack" + run: | + python -c "pytest --nbmake -p no:randomly -vvvv -k 'not 11-container-images-k8s.ipynb' --nbmake-timeout=1000;" + # syft-install-check: # strategy: # max-parallel: 99 From 5bf9e56fa9b3f5a1dfba25cfb5bde36319db9a21 Mon Sep 17 00:00:00 2001 From: rasswanth-s <43314053+rasswanth-s@users.noreply.github.com> Date: Wed, 14 Feb 2024 18:48:41 +0530 Subject: [PATCH 05/23] include api/0.8 notebooks paths in workflow --- .github/workflows/cd-post-release-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cd-post-release-tests.yml b/.github/workflows/cd-post-release-tests.yml index 6437cb893a8..c81854adc75 100644 --- a/.github/workflows/cd-post-release-tests.yml +++ b/.github/workflows/cd-post-release-tests.yml @@ -71,7 +71,7 @@ jobs: env: ORCHESTRA_DEPLOYMENT_TYPE: "container_stack" run: | - python -c "pytest --nbmake -p no:randomly -vvvv -k 'not 11-container-images-k8s.ipynb' --nbmake-timeout=1000;" + python -c "pytest --nbmake notebooks/api/0.8 -p no:randomly -vvvv -k 'not 11-container-images-k8s.ipynb' --nbmake-timeout=1000;" # syft-install-check: # strategy: From fde6bcb980a7f58a7f00eaf31440d8aed879e8bd Mon Sep 17 00:00:00 2001 From: rasswanth-s <43314053+rasswanth-s@users.noreply.github.com> Date: Wed, 14 Feb 2024 18:50:41 +0530 Subject: [PATCH 06/23] modified to include absolute paths --- .github/workflows/cd-post-release-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cd-post-release-tests.yml b/.github/workflows/cd-post-release-tests.yml index c81854adc75..a7acdfc152a 100644 --- a/.github/workflows/cd-post-release-tests.yml +++ b/.github/workflows/cd-post-release-tests.yml @@ -60,7 +60,7 @@ jobs: - name: Install pytest and nbmake run: | - pip install pytest nbmake + pip install pytest nbmake pytest-randomly # Ideally we should run it in a tox test, but for now we are just running it in the main environment # as we have three different types of tests for notebooks From 0da797f8e35587898fb4a3d38531d15eec902142 Mon Sep 17 00:00:00 2001 From: rasswanth-s <43314053+rasswanth-s@users.noreply.github.com> Date: Wed, 14 Feb 2024 18:57:22 +0530 Subject: [PATCH 07/23] modified python command --- .github/workflows/cd-post-release-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cd-post-release-tests.yml b/.github/workflows/cd-post-release-tests.yml index a7acdfc152a..ff3267fcbd6 100644 --- a/.github/workflows/cd-post-release-tests.yml +++ b/.github/workflows/cd-post-release-tests.yml @@ -71,7 +71,7 @@ jobs: env: ORCHESTRA_DEPLOYMENT_TYPE: "container_stack" run: | - python -c "pytest --nbmake notebooks/api/0.8 -p no:randomly -vvvv -k 'not 11-container-images-k8s.ipynb' --nbmake-timeout=1000;" + pytest --nbmake notebooks/api/0.8 -p no:randomly -vvvv -k 'not 11-container-images-k8s.ipynb' --nbmake-timeout=1000 # syft-install-check: # strategy: From 26db52147fbab06ece1677b96629c11e2fd027ea Mon Sep 17 00:00:00 2001 From: rasswanth-s <43314053+rasswanth-s@users.noreply.github.com> Date: Wed, 14 Feb 2024 19:09:07 +0530 Subject: [PATCH 08/23] modified port --- .github/workflows/cd-post-release-tests.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/cd-post-release-tests.yml b/.github/workflows/cd-post-release-tests.yml index ff3267fcbd6..e0c6f2abde5 100644 --- a/.github/workflows/cd-post-release-tests.yml +++ b/.github/workflows/cd-post-release-tests.yml @@ -56,7 +56,7 @@ jobs: - name: Launch Domain run: | - hagrid launch test-domain-1 to docker:8081 --tag=${{ github.event.inputs.syft_version }} + hagrid launch test-domain-1 to docker:8081 --tag=${{ github.event.inputs.syft_version }} --low-side - name: Install pytest and nbmake run: | @@ -70,6 +70,7 @@ jobs: - name: Run tests env: ORCHESTRA_DEPLOYMENT_TYPE: "container_stack" + NODE_PORT: "8081" run: | pytest --nbmake notebooks/api/0.8 -p no:randomly -vvvv -k 'not 11-container-images-k8s.ipynb' --nbmake-timeout=1000 From 59d7c192ff83b8d638c5f0c372df5e8209f4d2bb Mon Sep 17 00:00:00 2001 From: rasswanth-s <43314053+rasswanth-s@users.noreply.github.com> Date: Wed, 14 Feb 2024 19:25:56 +0530 Subject: [PATCH 09/23] Added syft installation with data science packages --- .github/workflows/cd-post-release-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cd-post-release-tests.yml b/.github/workflows/cd-post-release-tests.yml index e0c6f2abde5..4e8541906ae 100644 --- a/.github/workflows/cd-post-release-tests.yml +++ b/.github/workflows/cd-post-release-tests.yml @@ -48,7 +48,7 @@ jobs: - name: Install Syft run: | - pip install syft==${{ github.event.inputs.syft_version }} + pip install syft[data_science]==${{ github.event.inputs.syft_version }} - name: Hagrid Version run: | From 93ae47a9ccb5ab5290660e4035e3e124bb9b22d2 Mon Sep 17 00:00:00 2001 From: rasswanth-s <43314053+rasswanth-s@users.noreply.github.com> Date: Wed, 14 Feb 2024 19:32:46 +0530 Subject: [PATCH 10/23] modified orchestra deployment to k8s --- .github/workflows/cd-post-release-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cd-post-release-tests.yml b/.github/workflows/cd-post-release-tests.yml index 4e8541906ae..c16b31ca00f 100644 --- a/.github/workflows/cd-post-release-tests.yml +++ b/.github/workflows/cd-post-release-tests.yml @@ -69,7 +69,7 @@ jobs: # tox -e stack.test.integration.k8s - name: Run tests env: - ORCHESTRA_DEPLOYMENT_TYPE: "container_stack" + ORCHESTRA_DEPLOYMENT_TYPE: "k8s" NODE_PORT: "8081" run: | pytest --nbmake notebooks/api/0.8 -p no:randomly -vvvv -k 'not 11-container-images-k8s.ipynb' --nbmake-timeout=1000 From 4d262b1b18d2ca76caf988f1628329991691117d Mon Sep 17 00:00:00 2001 From: rasswanth-s <43314053+rasswanth-s@users.noreply.github.com> Date: Thu, 15 Feb 2024 14:23:38 +0530 Subject: [PATCH 11/23] Added e2e.test.notebook to tox --- tox.ini | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/tox.ini b/tox.ini index cb254f79ffc..d093947431d 100644 --- a/tox.ini +++ b/tox.ini @@ -33,6 +33,7 @@ envlist = syftcli.publish syftcli.build backend.test.basecpu + e2e.test.notebook skipsdist = True @@ -1085,3 +1086,33 @@ commands = bash -c 'for pkg in perl make curl wget; do docker run --rm cpu-worker:custom-cmd apk -e info "$pkg"; done' bash -c 'docker run --rm cpu-worker:custom-cmd bash -c "cd cowsay-3.7.0 && curl https://api.github.com/zen -s | ./cowsay"' bash -c 'docker rmi cpu-worker:custom-cmd' + + +# There are other adjacent notebook tests like +# stack.test.notebook, syft.test.notebook, etc. +# They could be modularized and reused. +# The below is the notebook test suite for point at external servers +[testenv:e2e.test.notebook] +description = E2E Notebook tests +changedir = {toxinidir}/notebooks +allowlist_externals = + bash + python + xargs + echo +setenv = + ORCHESTRA_DEPLOYMENT_TYPE = {env:ORCHESTRA_DEPLOYMENT_TYPE:k8s} + NODE_PORT = {env:NODE_PORT:8080} + NODE_URL = {env:NODE_URL:http://localhost} + EXCLUDE_NOTEBOOKS = {env:EXCLUDE_NOTEBOOKS:} +commands = + # Schema for EXLUDE_NOTEBOOKS is + # for excluding + # notebook1.ipynb, notebook2.ipynb + # EXCLUDE_NOTEBOOKS=not notebook1.ipynb and not notebook2.ipynb + bash -c "pip install pytest pytest-randomly nbmake" + + bash -c "echo Running with ORCHESTRA_DEPLOYMENT_TYPE=$ORCHESTRA_DEPLOYMENT_TYPE NODE_PORT=$NODE_PORT NODE_URL=$NODE_URL; \ + echo Excluding notebooks: $EXCLUDE_NOTEBOOKS; date" + + pytest api/0.8 --nbmake -p no:randomly -vvvv --co --nbmake-timeout=1000 -k '{env:EXCLUDE_NOTEBOOKS:}' \ No newline at end of file From ac971fce4d8bf554661b584f00007ab30224de62 Mon Sep 17 00:00:00 2001 From: rasswanth-s <43314053+rasswanth-s@users.noreply.github.com> Date: Thu, 15 Feb 2024 14:26:12 +0530 Subject: [PATCH 12/23] added syft version to tox e2e.test.notebook --- tox.ini | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/tox.ini b/tox.ini index d093947431d..cee556d354c 100644 --- a/tox.ini +++ b/tox.ini @@ -1097,20 +1097,25 @@ description = E2E Notebook tests changedir = {toxinidir}/notebooks allowlist_externals = bash - python - xargs - echo setenv = ORCHESTRA_DEPLOYMENT_TYPE = {env:ORCHESTRA_DEPLOYMENT_TYPE:k8s} NODE_PORT = {env:NODE_PORT:8080} NODE_URL = {env:NODE_URL:http://localhost} EXCLUDE_NOTEBOOKS = {env:EXCLUDE_NOTEBOOKS:} + SYFT_VERSION = {env:SYFT_VERSION:latest} commands = # Schema for EXLUDE_NOTEBOOKS is # for excluding # notebook1.ipynb, notebook2.ipynb # EXCLUDE_NOTEBOOKS=not notebook1.ipynb and not notebook2.ipynb bash -c "pip install pytest pytest-randomly nbmake" + #If the syft version is latest install the latest version of syft + # else install the version of syft specified + bash -c "if [[ $SYFT_VERSION == 'latest' ]]; then \ + pip install syft; \ + else \ + pip install syft==$SYFT_VERSION; \ + fi" bash -c "echo Running with ORCHESTRA_DEPLOYMENT_TYPE=$ORCHESTRA_DEPLOYMENT_TYPE NODE_PORT=$NODE_PORT NODE_URL=$NODE_URL; \ echo Excluding notebooks: $EXCLUDE_NOTEBOOKS; date" From 499633e3766fce177d3407845f50996041df9e1d Mon Sep 17 00:00:00 2001 From: rasswanth-s <43314053+rasswanth-s@users.noreply.github.com> Date: Thu, 15 Feb 2024 14:29:55 +0530 Subject: [PATCH 13/23] added syft version to tox e2e.test.notebook without printing version output --- tox.ini | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tox.ini b/tox.ini index cee556d354c..d3fc93b2aaf 100644 --- a/tox.ini +++ b/tox.ini @@ -1104,6 +1104,10 @@ setenv = EXCLUDE_NOTEBOOKS = {env:EXCLUDE_NOTEBOOKS:} SYFT_VERSION = {env:SYFT_VERSION:latest} commands = + bash -c "echo Running with ORCHESTRA_DEPLOYMENT_TYPE=$ORCHESTRA_DEPLOYMENT_TYPE NODE_PORT=$NODE_PORT NODE_URL=$NODE_URL \ + Excluding notebooks: $EXCLUDE_NOTEBOOKS SYFT_VERSION=$SYFT_VERSION; date" + + # Schema for EXLUDE_NOTEBOOKS is # for excluding # notebook1.ipynb, notebook2.ipynb @@ -1117,7 +1121,6 @@ commands = pip install syft==$SYFT_VERSION; \ fi" - bash -c "echo Running with ORCHESTRA_DEPLOYMENT_TYPE=$ORCHESTRA_DEPLOYMENT_TYPE NODE_PORT=$NODE_PORT NODE_URL=$NODE_URL; \ - echo Excluding notebooks: $EXCLUDE_NOTEBOOKS; date" + pytest api/0.8 --nbmake -p no:randomly -vvvv --co --nbmake-timeout=1000 -k '{env:EXCLUDE_NOTEBOOKS:}' \ No newline at end of file From 4d2f317389a1ff3e6f02485482ed6a851a33d3aa Mon Sep 17 00:00:00 2001 From: rasswanth-s <43314053+rasswanth-s@users.noreply.github.com> Date: Thu, 15 Feb 2024 14:30:13 +0530 Subject: [PATCH 14/23] lint --- tox.ini | 1 - 1 file changed, 1 deletion(-) diff --git a/tox.ini b/tox.ini index d3fc93b2aaf..79115dfdcfb 100644 --- a/tox.ini +++ b/tox.ini @@ -1122,5 +1122,4 @@ commands = fi" - pytest api/0.8 --nbmake -p no:randomly -vvvv --co --nbmake-timeout=1000 -k '{env:EXCLUDE_NOTEBOOKS:}' \ No newline at end of file From 864496c772bca86e6534fbbddee36de48a449303 Mon Sep 17 00:00:00 2001 From: rasswanth-s <43314053+rasswanth-s@users.noreply.github.com> Date: Thu, 15 Feb 2024 14:46:31 +0530 Subject: [PATCH 15/23] fix e2e.test.notebook --- .github/workflows/cd-post-release-tests.yml | 8 +++++--- tox.ini | 4 ++-- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/cd-post-release-tests.yml b/.github/workflows/cd-post-release-tests.yml index c16b31ca00f..6fa19f85adc 100644 --- a/.github/workflows/cd-post-release-tests.yml +++ b/.github/workflows/cd-post-release-tests.yml @@ -46,9 +46,10 @@ jobs: restore-keys: | ${{ runner.os }}-pip-py${{ matrix.python-version }}- - - name: Install Syft + - name: Install Hagrid run: | - pip install syft[data_science]==${{ github.event.inputs.syft_version }} + pip install -U hagrid + pip install tox - name: Hagrid Version run: | @@ -69,8 +70,9 @@ jobs: # tox -e stack.test.integration.k8s - name: Run tests env: - ORCHESTRA_DEPLOYMENT_TYPE: "k8s" NODE_PORT: "8081" + SYFT_VERSION: ${{ github.event.inputs.syft_version }} + EXCLUDE_NOTEBOOKS: "note 11-container-images-k8s.ipynb" run: | pytest --nbmake notebooks/api/0.8 -p no:randomly -vvvv -k 'not 11-container-images-k8s.ipynb' --nbmake-timeout=1000 diff --git a/tox.ini b/tox.ini index 79115dfdcfb..a88d4229872 100644 --- a/tox.ini +++ b/tox.ini @@ -1116,9 +1116,9 @@ commands = #If the syft version is latest install the latest version of syft # else install the version of syft specified bash -c "if [[ $SYFT_VERSION == 'latest' ]]; then \ - pip install syft; \ + pip install syft[data_science]; \ else \ - pip install syft==$SYFT_VERSION; \ + pip install syft[data_science]==$SYFT_VERSION; \ fi" From 6543512de34d825c86e4f715848b2f95448664e3 Mon Sep 17 00:00:00 2001 From: rasswanth-s <43314053+rasswanth-s@users.noreply.github.com> Date: Thu, 15 Feb 2024 14:54:39 +0530 Subject: [PATCH 16/23] modified tox test --- .github/workflows/cd-post-release-tests.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cd-post-release-tests.yml b/.github/workflows/cd-post-release-tests.yml index 6fa19f85adc..145861aefa6 100644 --- a/.github/workflows/cd-post-release-tests.yml +++ b/.github/workflows/cd-post-release-tests.yml @@ -46,7 +46,7 @@ jobs: restore-keys: | ${{ runner.os }}-pip-py${{ matrix.python-version }}- - - name: Install Hagrid + - name: Install Hagrid and tox run: | pip install -U hagrid pip install tox @@ -74,7 +74,7 @@ jobs: SYFT_VERSION: ${{ github.event.inputs.syft_version }} EXCLUDE_NOTEBOOKS: "note 11-container-images-k8s.ipynb" run: | - pytest --nbmake notebooks/api/0.8 -p no:randomly -vvvv -k 'not 11-container-images-k8s.ipynb' --nbmake-timeout=1000 + tox -e e2e.test.notebook # syft-install-check: # strategy: From 64ca18f4c48e6e631a9bcc97d1b56fabd24678b3 Mon Sep 17 00:00:00 2001 From: rasswanth-s <43314053+rasswanth-s@users.noreply.github.com> Date: Thu, 15 Feb 2024 15:02:11 +0530 Subject: [PATCH 17/23] fix minor spelling --- .github/workflows/cd-post-release-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cd-post-release-tests.yml b/.github/workflows/cd-post-release-tests.yml index 145861aefa6..2694960c85e 100644 --- a/.github/workflows/cd-post-release-tests.yml +++ b/.github/workflows/cd-post-release-tests.yml @@ -72,7 +72,7 @@ jobs: env: NODE_PORT: "8081" SYFT_VERSION: ${{ github.event.inputs.syft_version }} - EXCLUDE_NOTEBOOKS: "note 11-container-images-k8s.ipynb" + EXCLUDE_NOTEBOOKS: "not 11-container-images-k8s.ipynb" run: | tox -e e2e.test.notebook From d70b2bfa1878e1b8f56c55ae8cb583f6ed02fef1 Mon Sep 17 00:00:00 2001 From: rasswanth-s <43314053+rasswanth-s@users.noreply.github.com> Date: Thu, 15 Feb 2024 15:28:19 +0530 Subject: [PATCH 18/23] skip collection --- tox.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index a88d4229872..e0d74ff7768 100644 --- a/tox.ini +++ b/tox.ini @@ -1122,4 +1122,4 @@ commands = fi" - pytest api/0.8 --nbmake -p no:randomly -vvvv --co --nbmake-timeout=1000 -k '{env:EXCLUDE_NOTEBOOKS:}' \ No newline at end of file + pytest api/0.8 --nbmake -p no:randomly -vvvv --nbmake-timeout=1000 -k '{env:EXCLUDE_NOTEBOOKS:}' \ No newline at end of file From aee0a8cde5ea9f4b882d0841867df34bc25523c7 Mon Sep 17 00:00:00 2001 From: rasswanth-s <43314053+rasswanth-s@users.noreply.github.com> Date: Thu, 15 Feb 2024 16:37:46 +0530 Subject: [PATCH 19/23] removed redundant install steps --- .github/workflows/cd-post-release-tests.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/workflows/cd-post-release-tests.yml b/.github/workflows/cd-post-release-tests.yml index 2694960c85e..67ffe83ea97 100644 --- a/.github/workflows/cd-post-release-tests.yml +++ b/.github/workflows/cd-post-release-tests.yml @@ -59,10 +59,6 @@ jobs: run: | hagrid launch test-domain-1 to docker:8081 --tag=${{ github.event.inputs.syft_version }} --low-side - - name: Install pytest and nbmake - run: | - pip install pytest nbmake pytest-randomly - # Ideally we should run it in a tox test, but for now we are just running it in the main environment # as we have three different types of tests for notebooks # tox -e stack.test.notebook From b025faa28593d8ebda6d364830af87d6cb765be0 Mon Sep 17 00:00:00 2001 From: rasswanth-s <43314053+rasswanth-s@users.noreply.github.com> Date: Thu, 15 Feb 2024 16:42:24 +0530 Subject: [PATCH 20/23] re-enabled syft install tests --- .github/workflows/cd-post-release-tests.yml | 98 ++++++++++----------- 1 file changed, 49 insertions(+), 49 deletions(-) diff --git a/.github/workflows/cd-post-release-tests.yml b/.github/workflows/cd-post-release-tests.yml index 67ffe83ea97..3ec6f8a04aa 100644 --- a/.github/workflows/cd-post-release-tests.yml +++ b/.github/workflows/cd-post-release-tests.yml @@ -72,52 +72,52 @@ jobs: run: | tox -e e2e.test.notebook - # syft-install-check: - # strategy: - # max-parallel: 99 - # matrix: - # os: [ubuntu-latest, macos-latest, windows-latest] - # # Re-enable macos-14 when it's available when we remove python 3.9 from syft - # # os: [ubuntu-latest, macos-latest, windows-latest, macos-14] - # python-version: ["3.11", "3.10", "3.9"] - - # runs-on: ${{ matrix.os }} - # steps: - # - name: System Architecture - # run: | - # echo "System Architecture: $(uname -m)" - # echo "System Version: $(uname -a)" - - # - uses: actions/checkout@v4 - - # - name: Set up Python ${{ matrix.python-version }} - # uses: actions/setup-python@v5 - - # with: - # python-version: ${{ matrix.python-version }} - - # - name: Upgrade pip - # run: | - # python -m pip install --upgrade --user pip - - # - name: Get pip cache dir - # id: pip-cache - # shell: bash - # run: | - # echo "dir=$(pip cache dir)" >> $GITHUB_OUTPUT - - # - name: pip cache - # uses: actions/cache@v4 - # with: - # path: ${{ steps.pip-cache.outputs.dir }} - # key: ${{ runner.os }}-pip-py${{ matrix.python-version }}-${{ hashFiles('setup.cfg') }} - # restore-keys: | - # ${{ runner.os }}-pip-py${{ matrix.python-version }}- - - # - name: Install Syft - # run: | - # pip install syft==${{ github.event.inputs.syft_version }} - - # - name: Check Syft version - # run: | - # python -c "import syft; print(syft.__version__)" + syft-install-check: + strategy: + max-parallel: 99 + matrix: + os: [ubuntu-latest, macos-latest, windows-latest] + # Re-enable macos-14 when it's available when we remove python 3.9 from syft + # os: [ubuntu-latest, macos-latest, windows-latest, macos-14] + python-version: ["3.11", "3.10", "3.9"] + + runs-on: ${{ matrix.os }} + steps: + - name: System Architecture + run: | + echo "System Architecture: $(uname -m)" + echo "System Version: $(uname -a)" + + - uses: actions/checkout@v4 + + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v5 + + with: + python-version: ${{ matrix.python-version }} + + - name: Upgrade pip + run: | + python -m pip install --upgrade --user pip + + - name: Get pip cache dir + id: pip-cache + shell: bash + run: | + echo "dir=$(pip cache dir)" >> $GITHUB_OUTPUT + + - name: pip cache + uses: actions/cache@v4 + with: + path: ${{ steps.pip-cache.outputs.dir }} + key: ${{ runner.os }}-pip-py${{ matrix.python-version }}-${{ hashFiles('setup.cfg') }} + restore-keys: | + ${{ runner.os }}-pip-py${{ matrix.python-version }}- + + - name: Install Syft + run: | + pip install syft==${{ github.event.inputs.syft_version }} + + - name: Check Syft version + run: | + python -c "import syft; print(syft.__version__)" From cb5cca831b63966bba142d6ad40daf49058223e0 Mon Sep 17 00:00:00 2001 From: rasswanth-s <43314053+rasswanth-s@users.noreply.github.com> Date: Thu, 15 Feb 2024 16:49:25 +0530 Subject: [PATCH 21/23] Added post release tests to cd-syft release pipeline --- .github/workflows/cd-syft.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/cd-syft.yml b/.github/workflows/cd-syft.yml index d815fa0f981..1cda2771bc3 100644 --- a/.github/workflows/cd-syft.yml +++ b/.github/workflows/cd-syft.yml @@ -514,3 +514,9 @@ jobs: add: "helm/" push: "origin gh-pages" cwd: "./ghpages/" + + # Can we remove the always flag from the below job? + call-cd-post-release-tests: + needs: [deploy-syft] + if: always() && github.repository == 'OpenMined/PySyft' && needs.deploy-syft.result == 'success' # don't run on forks + uses: OpenMined/PySyft/.github/workflows/cd-post-release-tests.yml From 3e45a2123f30d04cc5897e34b22cefd6d218864f Mon Sep 17 00:00:00 2001 From: rasswanth-s <43314053+rasswanth-s@users.noreply.github.com> Date: Thu, 15 Feb 2024 16:50:52 +0530 Subject: [PATCH 22/23] removed unsued comments --- .github/workflows/cd-post-release-tests.yml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.github/workflows/cd-post-release-tests.yml b/.github/workflows/cd-post-release-tests.yml index 3ec6f8a04aa..a6031d87cec 100644 --- a/.github/workflows/cd-post-release-tests.yml +++ b/.github/workflows/cd-post-release-tests.yml @@ -59,11 +59,6 @@ jobs: run: | hagrid launch test-domain-1 to docker:8081 --tag=${{ github.event.inputs.syft_version }} --low-side - # Ideally we should run it in a tox test, but for now we are just running it in the main environment - # as we have three different types of tests for notebooks - # tox -e stack.test.notebook - # tox -e syft.test.notebook - # tox -e stack.test.integration.k8s - name: Run tests env: NODE_PORT: "8081" From e34f8c4409466a123a611f452f1c3bfe96442666 Mon Sep 17 00:00:00 2001 From: rasswanth-s <43314053+rasswanth-s@users.noreply.github.com> Date: Thu, 15 Feb 2024 16:59:57 +0530 Subject: [PATCH 23/23] fix the version branch to dev --- .github/workflows/cd-syft.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cd-syft.yml b/.github/workflows/cd-syft.yml index 1cda2771bc3..0eb72df049b 100644 --- a/.github/workflows/cd-syft.yml +++ b/.github/workflows/cd-syft.yml @@ -519,4 +519,4 @@ jobs: call-cd-post-release-tests: needs: [deploy-syft] if: always() && github.repository == 'OpenMined/PySyft' && needs.deploy-syft.result == 'success' # don't run on forks - uses: OpenMined/PySyft/.github/workflows/cd-post-release-tests.yml + uses: OpenMined/PySyft/.github/workflows/cd-post-release-tests.yml@dev