Skip to content

Conversation

@natthan-pigoux
Copy link

Running cwltool with dockerRequirements (with pull disabled) using a local Singularity/Apptainer sandbox image is not currently handle. cwltool is only searching for files (e.g. sif images) and not path as it should for sandbox images.

Here I provide:

  • a function using singularity inspect to verify that a path is a singularity image
  • searching for the sandbox image in the get_image method
  • a test which build an alpine sandbox image and use it in dockerPull

Some questions I have:

  • if the sandbox image is found I decided to skip the candidates search, I don't know if we wish that
  • I'm not sure the singularity inspect is strong enough to ensure the presence of the image

It is the first time I contribute here so I might have miss some things :)

closes #2165

@codecov
Copy link

codecov bot commented Oct 24, 2025

Codecov Report

❌ Patch coverage is 34.78261% with 15 lines in your changes missing coverage. Please review.
✅ Project coverage is 77.44%. Comparing base (766d58b) to head (ca94aa0).

Files with missing lines Patch % Lines
cwltool/singularity.py 34.78% 15 Missing ⚠️

❗ There is a different number of reports uploaded between BASE (766d58b) and HEAD (ca94aa0). Click for more details.

HEAD has 5 uploads less than BASE
Flag BASE (766d58b) HEAD (ca94aa0)
17 12
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2166      +/-   ##
==========================================
- Coverage   85.10%   77.44%   -7.66%     
==========================================
  Files          46       46              
  Lines        8358     8380      +22     
  Branches     1951     1955       +4     
==========================================
- Hits         7113     6490     -623     
- Misses        779     1370     +591     
- Partials      466      520      +54     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@mr-c
Copy link
Member

mr-c commented Oct 24, 2025

Thank you @natthan-pigoux ; can you run make cleanup and push again?

@natthan-pigoux
Copy link
Author

natthan-pigoux commented Oct 25, 2025

@mr-c , thank you to already have a look. I will be away next week, so I will probably not answer before 2nd November.

feat: handle local singularity sandbox image

fix: skip searching if singularity inspect found image

improve singularity inspect

test: add test for singularity sandbox image

remove unused normalization

add comment
@natthan-pigoux natthan-pigoux force-pushed the feat_handle_singularity_sandbox_images branch from cf7c0fa to 6bd825b Compare November 3, 2025 15:59
@natthan-pigoux natthan-pigoux force-pushed the feat_handle_singularity_sandbox_images branch from 08cd438 to c51d312 Compare November 4, 2025 15:12
@natthan-pigoux natthan-pigoux force-pushed the feat_handle_singularity_sandbox_images branch from 35a7346 to 6f96b54 Compare November 5, 2025 13:46
@natthan-pigoux
Copy link
Author

@mr-c , sorry I should have put this PR as Draft before ... but now it should be ready for review. The tests should cover quiet well the changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

singularity/apptainer sandbox images are not handled

2 participants