Repository navigation
fix: --docker_remove_entrypoints runs the new tags - #542
Conversation
67741f2 to
5565a8f
Compare
darkclad
left a comment
There was a problem hiding this comment.
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.
| 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(':') |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
|
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 Fixed in f4aceca. |
b9a1770 to
f51cf6d
Compare
darkclad
left a comment
There was a problem hiding this comment.
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.
f4aceca to
6fc9173
Compare
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.
6fc9173 to
fa3217c
Compare
Stacked on #541 (
feat/authored-cwl-names). Merge that first; this PR's own changes are the commits above it.What
--docker_remove_entrypoints(anddocker_remove_entrypointsinWorkflow.run()) now runs the-noentrypointimages it builds.run_setup.preparerenamed 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.DockerRequirementthe run uses is renamed: underhintsas well asrequirements(most mm-workflows tools put the image underhints), and in each tool embedded in an inlined document (Workflow.run(),--cwl_inline_runtag), at any depth.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.