Skip to content

fix: --docker_remove_entrypoints runs the new tags - #542

Merged
vjaganat90 merged 1 commit into
PolusAI:masterfrom
vjaganat90:fix/docker-remove-entrypoints
Oct 21, 2026
Merged

vjaganat90 merged 1 commit into
PolusAI:masterfrom
vjaganat90:fix/docker-remove-entrypoints

Conversation

@vjaganat90

@vjaganat90 vjaganat90 commented Oct 20, 2026 •

Copy link
Copy Markdown
Member

Stacked on #541 (feat/authored-cwl-names). Merge that first; this PR's own changes are the commits above it.

What

  • --docker_remove_entrypoints (and docker_remove_entrypoints in Workflow.run()) now runs the -noentrypoint images it builds. run_setup.prepare renamed the images after writing the CWL, and the runner read the file on disk, so the run used the original images. The CWL is now written again after the rename.
  • Every DockerRequirement the run uses is renamed: under hints as well as requirements (most mm-workflows tools put the image under hints), and in each tool embedded in an inlined document (Workflow.run(), --cwl_inline_runtag), at any depth.
  • An image from a registry with a port (localhost:5000/img:tag) no longer breaks the tag split.

Why demian found the stale write in the #541 review (#541 (comment)). The flag did nothing for most tools on master too.

Stacked on #541.

@darkclad darkclad left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 5565a8ff on top of #541's head cb00cfe9.

The second write in run_setup.prepare fixes the stale write: both new end-to-end tests (test_the_cli_runs_the_noentrypoint_tags, test_run_with_docker_remove_entrypoints_writes_the_noentrypoint_tags) fail with that line removed and pass with it. The rename now covers hints and embedded tools at any depth, which matches what the pre-flight pulls (preflight._declared reads both sections). The registry-port split is right for localhost:5000/img and localhost:5000/a/img:1. On Windows, test_plugins.py and test_python_api_workflow.py give the same 17 cwltool-missing failures at head and base; the 8 new tests pass.

One blocker inline: the hint rename now reaches digest-pinned images and gives them an invalid reference.

Comment thread src/sophios/plugins.py
The tag is read from the last path segment only, so a registry port is not a tag.
"""
path, _, name = image.rpartition('/')
repo, _, tag = name.partition(':')

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A digest-pinned image now gets a broken reference. polusai/openfold-tool@sha256:84e1bb34... (the hints image of mm-workflows non_ci/cwl/openfold.cwl) becomes polusai/openfold-tool@sha256:84e1bb34...-noentrypoint, which Docker refuses as an invalid reference. remove_entrypoints builds nothing for it either, since an image pulled by digest has no RepoTags. On master that hint was left alone, so the tool ran with the flag; at this head the run fails. Returning image unchanged when it contains @, with a case for it next to the hint test, would keep it running.

@vjaganat90 vjaganat90 Oct 20, 2026 •

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're right. A digest-pinned image has no tag and remove_entrypoints builds no variant for it, so appending -noentrypoint gave an invalid reference. _noentrypoint_tag now returns the image unchanged when it contains @. I added a test next to the hint test that covers a digest-pinned image under both requirements and hints.

Fixed in f4aceca.

@vjaganat90

vjaganat90 commented Oct 20, 2026 •

Copy link
Copy Markdown
Member Author

Thanks for the review. The one blocker, digest-pinned images getting an invalid reference, is fixed. Such images are now left unchanged, with a test for both requirements and hints.

Fixed in f4aceca.

@vjaganat90
vjaganat90 force-pushed the fix/docker-remove-entrypoints branch from b9a1770 to f51cf6d Compare October 20, 2026 19:22

@darkclad darkclad left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. f51cf6d6 fixes the digest blocker: _noentrypoint_tag returns an image containing @ unchanged, so polusai/openfold-tool@sha256:... keeps a valid reference under requirements and hints, and test_a_digest_pinned_image_keeps_its_reference covers both sections. Against the previous round the rebase onto #541's 875a0be2 changes nothing else in the commit. On Windows the 10 --docker_remove_entrypoints tests pass, and test_plugins.py and test_python_api_workflow.py show only the same 17 cwltool-missing failures as base.

@vjaganat90
vjaganat90 force-pushed the fix/docker-remove-entrypoints branch 2 times, most recently from f4aceca to 6fc9173 Compare October 21, 2026 14:49
The run read the CWL written before the images were renamed, so we write it
again after the rename. Every DockerRequirement is renamed now: under hints
too, and in tools embedded in an inlined document; a registry port is no tag.
@vjaganat90
vjaganat90 force-pushed the fix/docker-remove-entrypoints branch from 6fc9173 to fa3217c Compare October 21, 2026 15:28
@vjaganat90
vjaganat90 merged commit cdb9837 into PolusAI:master Oct 21, 2026
3 checks passed
@vjaganat90
vjaganat90 deleted the fix/docker-remove-entrypoints branch October 21, 2026 15:40
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.

2 participants