fix(workflow): reuse finished steps across patchworks upgrades - #28
Merged
Conversation
Snakemake's default rerun triggers include code, params and the software environment, so upgrading patchworks re-ran the convert (and prepare) rules — re-doing the expensive OME-ZARR conversion and clobbering an existing result. Pin `rerun-triggers: mtime` in the SLURM profile and add `--rerun-triggers mtime` to the pixi tasks and the documented local commands, so finished steps are reused unless their output is missing. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Re-running after upgrading patchworks re-did the OME-ZARR conversion (and re-ran
prepare, moving the previousstage.zarr), overwriting an existing result. Snakemake's default--rerun-triggersincludescode,paramsandsoftware-env, so a new package version invalidates every step — theimage.zarrmarker can't help because the rule is forced regardless.Fix
Restrict reruns to
mtime(only a missing/stale output triggers a rerun):rerun-triggers: mtimeinprofile/slurm/config.yaml--rerun-triggers mtimein the pixidry/gotasks and the documented local commandsTest
Touched
convert.pyto simulate a code change, then dry-ran:convertre-appears (4 jobs) — reproduces the bug--rerun-triggers mtime→convertskipped (3 jobs: onlyprepare+merge)🤖 Generated with Claude Code