Skip to content

fix(workflow): reuse finished steps across patchworks upgrades - #28

Merged
lguerard merged 1 commit into
mainfrom
fix/workflow-rerun-triggers
Jun 24, 2026
Merged

fix(workflow): reuse finished steps across patchworks upgrades#28
lguerard merged 1 commit into
mainfrom
fix/workflow-rerun-triggers

Conversation

@lguerard

Copy link
Copy Markdown
Contributor

Problem

Re-running after upgrading patchworks re-did the OME-ZARR conversion (and re-ran prepare, moving the previous stage.zarr), overwriting an existing result. Snakemake's default --rerun-triggers includes code, params and software-env, so a new package version invalidates every step — the image.zarr marker can't help because the rule is forced regardless.

Fix

Restrict reruns to mtime (only a missing/stale output triggers a rerun):

  • rerun-triggers: mtime in profile/slurm/config.yaml
  • --rerun-triggers mtime in the pixi dry/go tasks and the documented local commands

Test

Touched convert.py to simulate a code change, then dry-ran:

  • default triggersconvert re-appears (4 jobs) — reproduces the bug
  • --rerun-triggers mtimeconvert skipped (3 jobs: only prepare+merge)

🤖 Generated with Claude Code

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>
@lguerard
lguerard merged commit 32ae974 into main Jun 24, 2026
2 checks passed
@lguerard
lguerard deleted the fix/workflow-rerun-triggers branch June 24, 2026 14:06
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.

1 participant