Repository navigation
fix: resolve open Dependabot alerts and drop Python 3.10 #1941
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -33,7 +33,8 @@ jobs: | |
| echo Before Cleanup... | ||
| df -h | ||
| sudo rm -rf "$AGENT_TOOLSDIRECTORY" | ||
| rm -rf /opt/hostedtoolcache | ||
| # keep the interpreter installed by setup-python; drop the rest of the tool cache to free disk | ||
| find /opt/hostedtoolcache -mindepth 1 -maxdepth 1 ! -name Python -exec rm -rf {} + | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Remove the redundant cache traversal. The preceding command removes Remove this traversal. This job does not select or use a host Python interpreter.
|
||
| rm -rf /usr/share/dotnet/ | ||
| cd /opt | ||
| find . -maxdepth 1 -mindepth 1 '!' -path ./containerd '!' -path ./actionarchivecache '!' -path ./runner '!' -path ./runner-cache -exec rm -rf '{}' ';' | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -27,7 +27,7 @@ project_urls = | |
| Source Code=https://github.com/Project-MONAI/MONAILabel | ||
|
|
||
| [options] | ||
| python_requires = >= 3.10 | ||
| python_requires = >= 3.11 | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Update the final Docker image's Python version. The default
|
||
| # for compiling and develop setup only | ||
| # no need to specify the versions so that we could | ||
| # compile for multiple targeted versions. | ||
|
|
@@ -57,11 +57,11 @@ install_requires = | |
| SimpleITK | ||
| pyOpenSSL>=26.0.0 | ||
| huggingface_hub | ||
| girder-client>=3.2.3 | ||
| girder-client>=3.2.9 | ||
| ninja>=1.11.1.1 | ||
| einops>=0.7.0 | ||
| pyyaml>=6.0.1 | ||
| filelock>=3.11.0 | ||
| filelock>=4.2.1 | ||
| passlib>=1.7.4 | ||
| pyjwt>=2.8.0 | ||
| bcrypt>=4.1.2 | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove the cache deletion in the clean up step before the Build step's
find.The
clean upstep deletes$AGENT_TOOLSDIRECTORY, which is/opt/hostedtoolcache, before theBuildstep runs. The step also removes the Python 3.11 installed bysetup-python. At line 43,find /opt/hostedtoolcachethen targets a missing directory. GNUfindexits with status 1, and the defaultbash -eshell stops the job. The Docker build and publish steps do not run.The base workflow did not fail here because its
rm -rfaccepts a missing path. This change introduced the failure.Remove the whole-cache deletion. The selective
findat line 43 then keeps the Python interpreter fromsetup-pythonand still frees the other cache entries.Suggested fix
- name: clean up run: | sudo rm -rf /usr/share/dotnet - sudo rm -rf "$AGENT_TOOLSDIRECTORY"zizmor (1.31.1)
[warning] 22-54: overly broad permissions (excessive-permissions): default permissions used due to no permissions: block
(excessive-permissions)