Commit 2d01f8c
authored
fix: only trigger script with CODE label (#3707)
This PR is inspired by #3706, resolves issues #3456 and #3474, and
addresses the concern raised in
#3148 (comment)
In brief, commit e502312 made changes so that the modification time
(mtime) of script and notebook files no longer triggers a rerun of the
workflow, later, commit e8a0b83 reversed this, making mtime changes
always trigger reruns -- even when RerunTrigger.CODE is not specified in
`--rerun-triggers`.
This created an undesirable situation: legitimate and common scenarios
(e.g., copying scripts or pulling them from a Git repository) could
unnecessarily trigger reruns — as reported in #3474.
To make the behavior more intuitive, the
`outputs_older_than_script_or_notebook` condition should take precedence
over metadata checks. However, this condition should still be governed
by the presence of `RerunTrigger.CODE`.
### QC
<!-- Make sure that you can tick the boxes below. -->
* [x] The PR contains a test case for the changes or the changes are
already covered by an existing test case.
* [ ] The documentation (`docs/`) is updated to reflect the changes or
this is not necessary (e.g. if the change does neither modify the
language nor the behavior or functionalities of Snakemake).
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **Bug Fixes**
* Code-change reruns now only run when the CODE rerun trigger is
enabled; code-change detection correctly accumulates signals from
multiple sources to avoid missed or spurious reruns.
* **Tests**
* Added an MTIME-triggered rerun test validating that outputs retain
timestamps when only input mtimes change.
* **Chores**
* Fixed a test import path and broadened connectivity error handling to
include timeouts.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->1 parent 8cb7d8c commit 2d01f8c
3 files changed
+32
-12
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1452 | 1452 | | |
1453 | 1453 | | |
1454 | 1454 | | |
1455 | | - | |
1456 | | - | |
1457 | | - | |
1458 | | - | |
1459 | | - | |
1460 | | - | |
1461 | | - | |
1462 | | - | |
1463 | | - | |
| 1455 | + | |
| 1456 | + | |
| 1457 | + | |
| 1458 | + | |
| 1459 | + | |
| 1460 | + | |
| 1461 | + | |
| 1462 | + | |
| 1463 | + | |
1464 | 1464 | | |
1465 | 1465 | | |
1466 | 1466 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
| 16 | + | |
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| |||
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
53 | | - | |
| 53 | + | |
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
498 | 498 | | |
499 | 499 | | |
500 | 500 | | |
501 | | - | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
502 | 522 | | |
503 | 523 | | |
504 | 524 | | |
| |||
0 commit comments