Skip to content

Commit e17b6ed

Browse files
committed
Merge branch 'fix_request_repr' of github.com:OpenMined/PySyft into fix_request_repr
2 parents 5c8314c + f5cd811 commit e17b6ed

File tree

165 files changed

+2416
-15201
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

165 files changed

+2416
-15201
lines changed

.bumpversion.cfg

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,4 @@ first_value = 1
5050

5151
[bumpversion:file:packages/grid/helm/syft/values.yaml]
5252

53-
[bumpversion:file:packages/hagrid/hagrid/manifest_template.yml]
54-
55-
[bumpversion:file:packages/hagrid/hagrid/deps.py]
56-
5753
[bumpversion:file:packages/syftcli/manifest.yml]

.bumpversion_stable.cfg

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,3 @@ serialize =
1313
{major}.{minor}.{patch}
1414

1515
[bumpversion:file:packages/syft/src/syft/stable_version.py]
16-
17-
[bumpversion:file:packages/hagrid/hagrid/stable_version.py]
18-
19-
[bumpversion:file:packages/hagrid/hagrid/cache.py]

.dockerignore

Lines changed: 0 additions & 11 deletions
This file was deleted.

.github/file-filters.yml

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -27,17 +27,6 @@ backend:
2727
- packages/grid/backend/**/*.sh
2828
- packages/grid/backend/**/*.mako
2929

30-
hagrid:
31-
- .github/workflows/pr-tests-hagrid.yml
32-
- packages/hagrid/**/*.py
33-
- packages/hagrid/**/*.cfg
34-
- packages/hagrid/**/*.yml
35-
- packages/hagrid/**/*.dockerfile
36-
- packages/hagrid/**/*.toml
37-
- packages/hagrid/**/*.txt
38-
- packages/hagrid/**/*.ini
39-
- packages/hagrid/**/*.sh
40-
4130
syft:
4231
- .github/workflows/pr-tests-syft.yml
4332
- packages/syft/**/*.py

.github/workflows/cd-hagrid.yml

Lines changed: 0 additions & 108 deletions
This file was deleted.

.github/workflows/cd-post-release-tests.yml

Lines changed: 1 addition & 101 deletions
Original file line numberDiff line numberDiff line change
@@ -30,105 +30,6 @@ on:
3030
default: "REAL_PYPI"
3131

3232
jobs:
33-
notebook-test-hagrid:
34-
if: github.event.inputs.release_platform == 'REAL_PYPI'
35-
strategy:
36-
max-parallel: 99
37-
matrix:
38-
os: [ubuntu-latest]
39-
python-version: ["3.12"]
40-
41-
runs-on: ${{ matrix.os }}
42-
steps:
43-
- uses: actions/checkout@v4
44-
45-
# free 10GB of space
46-
- name: Remove unnecessary files
47-
if: matrix.os == 'ubuntu-latest'
48-
run: |
49-
sudo rm -rf /usr/share/dotnet
50-
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
51-
docker image prune --all --force
52-
docker builder prune --all --force
53-
docker system prune --all --force
54-
55-
- name: Set up Python ${{ matrix.python-version }}
56-
uses: actions/setup-python@v5
57-
58-
with:
59-
python-version: ${{ matrix.python-version }}
60-
61-
- name: Upgrade pip
62-
run: |
63-
python -m pip install --upgrade --user pip
64-
65-
- name: Get pip cache dir
66-
id: pip-cache
67-
shell: bash
68-
run: |
69-
echo "dir=$(pip cache dir)" >> $GITHUB_OUTPUT
70-
71-
- name: pip cache
72-
uses: actions/cache@v4
73-
with:
74-
path: ${{ steps.pip-cache.outputs.dir }}
75-
key: ${{ runner.os }}-pip-py${{ matrix.python-version }}-${{ hashFiles('setup.cfg') }}
76-
restore-keys: |
77-
${{ runner.os }}-pip-py${{ matrix.python-version }}-
78-
79-
- name: Install Hagrid, tox and uv
80-
run: |
81-
pip install -U hagrid
82-
pip install --upgrade pip uv==0.1.35 tox tox-uv==1.5.1
83-
84-
- name: Hagrid Version
85-
run: |
86-
hagrid version
87-
88-
- name: Remove existing containers
89-
continue-on-error: true
90-
shell: bash
91-
run: |
92-
docker rm $(docker ps -aq) --force || true
93-
docker volume prune -f || true
94-
docker buildx use default || true
95-
96-
- name: Launch Domain
97-
run: |
98-
hagrid launch test-domain-1 to docker:8081 --tag=${{ inputs.syft_version }} --low-side
99-
100-
- name: Run tests
101-
env:
102-
NODE_PORT: "8081"
103-
SYFT_VERSION: ${{ inputs.syft_version }}
104-
EXCLUDE_NOTEBOOKS: "not 11-container-images-k8s.ipynb"
105-
run: |
106-
tox -e e2e.test.notebook
107-
108-
#Run log collector python script
109-
- name: Run log collector
110-
timeout-minutes: 5
111-
if: failure()
112-
shell: bash
113-
run: |
114-
python ./scripts/container_log_collector.py
115-
116-
# Get Job name and url
117-
- name: Get job name and url
118-
id: job_name
119-
if: failure()
120-
shell: bash
121-
run: |
122-
echo "job_name=$(echo ${{ github.job }})" >> $GITHUB_OUTPUT
123-
echo "date=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT
124-
125-
- name: Upload logs to GitHub
126-
uses: actions/upload-artifact@master
127-
if: failure()
128-
with:
129-
name: ${{ matrix.os }}-${{ steps.job_name.outputs.job_name }}-logs-${{ steps.job_name.outputs.date }}
130-
path: ./logs/${{ steps.job_name.outputs.job_name}}/
131-
13233
syft-install-check:
13334
strategy:
13435
max-parallel: 99
@@ -290,9 +191,8 @@ jobs:
290191
pip install syft[data_science,dev]==${{ inputs.syft_version }}
291192
fi
292193
293-
- name: Install Hagrid, tox and uv
194+
- name: Install tox and uv
294195
run: |
295-
pip install -U hagrid
296196
pip install --upgrade pip uv==0.1.35 tox tox-uv==1.5.1 tox-current-env
297197
298198
- name: Run unit tests

.github/workflows/cd-syft.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -396,7 +396,6 @@ jobs:
396396
bump2version prenum --allow-dirty --no-commit
397397
ls **/VERSION | xargs -I {} python {}
398398
cat packages/grid/devspace.yaml | grep '0\.'
399-
python packages/hagrid/scripts/update_manifest.py $(python packages/grid/VERSION)
400399
401400
- name: Generate Release Metadata
402401
id: release_checks
@@ -460,7 +459,7 @@ jobs:
460459
author_name: ${{ secrets.OM_BOT_NAME }}
461460
author_email: ${{ secrets.OM_BOT_EMAIL }}
462461
message: "[syft]bump version"
463-
add: "['.bumpversion.cfg', 'VERSION', 'packages/grid/VERSION','packages/syft/PYPI.md', 'packages/grid/devspace.yaml', 'packages/syft/src/syft/VERSION', 'packages/syft/setup.cfg', 'packages/grid/frontend/package.json', 'packages/syft/src/syft/__init__.py', 'packages/hagrid/hagrid/manifest_template.yml', 'packages/grid/helm/syft/Chart.yaml','packages/grid/helm/repo', 'packages/hagrid/hagrid/deps.py', 'packages/grid/podman/podman-kube/podman-syft-kube.yaml' ,'packages/grid/podman/podman-kube/podman-syft-kube-config.yaml', 'packages/syftcli/manifest.yml', 'packages/syft/src/syft/protocol/protocol_version.json', 'packages/syft/src/syft/protocol/releases/', 'packages/grid/backend/grid/images/worker_cpu.dockerfile','packages/grid/helm/syft/values.yaml','packages/grid/helm/syft']"
462+
add: "['.bumpversion.cfg', 'VERSION', 'packages/grid/VERSION','packages/syft/PYPI.md', 'packages/grid/devspace.yaml', 'packages/syft/src/syft/VERSION', 'packages/syft/setup.cfg', 'packages/grid/frontend/package.json', 'packages/syft/src/syft/__init__.py', 'packages/grid/helm/syft/Chart.yaml','packages/grid/helm/repo', 'packages/grid/podman/podman-kube/podman-syft-kube.yaml' ,'packages/grid/podman/podman-kube/podman-syft-kube-config.yaml', 'packages/syftcli/manifest.yml', 'packages/syft/src/syft/protocol/protocol_version.json', 'packages/syft/src/syft/protocol/releases/', 'packages/grid/backend/grid/images/worker_cpu.dockerfile','packages/grid/helm/syft/values.yaml','packages/grid/helm/syft']"
464463

465464
- name: Changes to commit to Syft Repo during stable release
466465
if: needs.merge-docker-images.outputs.release_tag == 'latest'
@@ -539,7 +538,6 @@ jobs:
539538
files: |
540539
./packages/syftcli/manifest.yml
541540
./build/syftcli-config/*
542-
./packages/hagrid/hagrid/manifest_template.yml
543541
tag_name: v${{ steps.release_checks.outputs.github_release_version }}
544542

545543
# Checkout to gh-pages and update helm repo

.github/workflows/container-scan.yml

Lines changed: 36 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -274,30 +274,30 @@ jobs:
274274
runs-on: ubuntu-latest
275275
steps:
276276
- uses: actions/checkout@v4
277-
- name: Set up Snyk CLI to check for security issues
278-
# Snyk can be used to break the build when it detects security issues.
279-
# In this case we want to upload the SAST issues to GitHub Code Scanning
280-
uses: snyk/actions/setup@master
281-
env:
282-
# This is where you will need to introduce the Snyk API token created with your Snyk account
283-
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
284-
285-
- name: Snyk auth
286-
shell: bash
287-
run: snyk config set api=$SNYK_TOKEN
288-
env:
289-
# This is where you will need to introduce the Snyk API token created with your Snyk account
290-
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
291-
292277
- name: Snyk Container test
278+
uses: snyk/actions/docker@master
293279
continue-on-error: true
294-
shell: bash
295-
run: snyk container test mongo:7.0.0 --sarif --sarif-file-output=snyk-code.sarif
296280
env:
297281
# This is where you will need to introduce the Snyk API token created with your Snyk account
298282
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
283+
with:
284+
image: mongo:7.0.0
285+
args: --sarif-file-output=snyk-code.sarif
286+
287+
# Replace any "undefined" security severity values with 0. The undefined value is used in the case
288+
# of license-related findings, which do not do not indicate a security vulnerability.
289+
# See https://github.com/github/codeql-action/issues/2187 for more context.
290+
- name: Post-process sarif output
291+
run: |
292+
sed -i 's/"security-severity": "undefined"/"security-severity": "0"/g' snyk-code.sarif
293+
294+
# Replace any "null" security severity values with 0. The undefined value is used in the case
295+
# the NVD CVSS Score is not available.
296+
# See https://github.com/Erikvl87/docker-languagetool/issues/90 and https://github.com/github/codeql-action/issues/2187 for more context.
297+
- name: Post-process sarif output for security severities set to "null"
298+
run: |
299+
sed -i 's/"security-severity": "null"/"security-severity": "0"/g' snyk-code.sarif
299300
300-
# Push the Snyk Code results into GitHub Code Scanning tab
301301
- name: Upload result to GitHub Code Scanning
302302
uses: github/codeql-action/upload-sarif@v3
303303
with:
@@ -352,29 +352,29 @@ jobs:
352352
actions: read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status
353353
runs-on: ubuntu-latest
354354
steps:
355-
- uses: actions/checkout@v4
356-
- name: Set up Snyk CLI to check for security issues
357-
# Snyk can be used to break the build when it detects security issues.
358-
# In this case we want to upload the SAST issues to GitHub Code Scanning
359-
uses: snyk/actions/setup@master
360-
env:
361-
# This is where you will need to introduce the Snyk API token created with your Snyk account
362-
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
363-
364-
- name: Snyk auth
365-
shell: bash
366-
run: snyk config set api=$SNYK_TOKEN
367-
env:
368-
# This is where you will need to introduce the Snyk API token created with your Snyk account
369-
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
370-
371355
- name: Snyk Container test
356+
uses: snyk/actions/docker@master
372357
continue-on-error: true
373-
shell: bash
374-
run: snyk container test traefik:v2.11.0 --sarif --sarif-file-output=snyk-code.sarif
375358
env:
376359
# This is where you will need to introduce the Snyk API token created with your Snyk account
377360
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
361+
with:
362+
image: traefik:v2.11.0
363+
args: --sarif-file-output=snyk-code.sarif
364+
365+
# Replace any "undefined" security severity values with 0. The undefined value is used in the case
366+
# of license-related findings, which do not do not indicate a security vulnerability.
367+
# See https://github.com/github/codeql-action/issues/2187 for more context.
368+
- name: Post-process sarif output
369+
run: |
370+
sed -i 's/"security-severity": "undefined"/"security-severity": "0"/g' snyk-code.sarif
371+
372+
# Replace any "null" security severity values with 0. The undefined value is used in the case
373+
# the NVD CVSS Score is not available.
374+
# See https://github.com/Erikvl87/docker-languagetool/issues/90 and https://github.com/github/codeql-action/issues/2187 for more context.
375+
- name: Post-process sarif output for security severities set to "null"
376+
run: |
377+
sed -i 's/"security-severity": "null"/"security-severity": "0"/g' snyk-code.sarif
378378
379379
# Push the Snyk Code results into GitHub Code Scanning tab
380380
- name: Upload result to GitHub Code Scanning

0 commit comments

Comments
 (0)