Skip to content

Write cached Singularity image resolution back to dockerImageId - #2317

Open
Sanjays2402 wants to merge 2 commits into
common-workflow-language:mainfrom
Sanjays2402:fix/singularity-cached-image-id
Open

Write cached Singularity image resolution back to dockerImageId#2317
Sanjays2402 wants to merge 2 commits into
common-workflow-language:mainfrom
Sanjays2402:fix/singularity-cached-image-id

Conversation

@Sanjays2402

Copy link
Copy Markdown
Contributor

Closes #2283

When get_image() hits the _IMAGES cache it wrote the resolved image to dockerRequirement["dockerImage_id"], but nothing ever reads that field — get_from_requirements() and the sandbox path both read dockerImageId, so the cached resolution was discarded and the unresolved id was used. Writes it back to dockerImageId, matching the cache update at the end of the same method.

Regression test seeds _IMAGES with a resolved path and asserts the requirement is updated; it fails on master and passes with the change.

When get_image() found the requested image id in the process-wide
_IMAGES cache, it stored the resolved path under "dockerImage_id",
a field that is never read anywhere. get_from_requirements() and the
sandbox path both read "dockerImageId", so the cached resolution was
silently discarded and the unresolved id was used instead.

Write the resolved value back to "dockerImageId", matching the other
cache interaction at the end of get_image().

Adds a regression test that seeds _IMAGES with a resolved path and
asserts the requirement's dockerImageId is updated.
@codecov

codecov Bot commented Aug 1, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 85.23%. Comparing base (0a30d8d) to head (c752815).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2317      +/-   ##
==========================================
+ Coverage   85.21%   85.23%   +0.02%     
==========================================
  Files          46       46              
  Lines        8621     8621              
  Branches     2020     2020              
==========================================
+ Hits         7346     7348       +2     
+ Misses        808      807       -1     
+ Partials      467      466       -1     

☔ View full report in Codecov by Harness.
📢 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.

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.

Resolving images with _IMAGES in SingularityCommandLineJob appears to write back to the wrong field

2 participants