fix: fix issues with cyclic dependencies when using the update and before_update flag#3857
Merged
johanneskoester merged 8 commits intomainfrom Dec 8, 2025
Merged
fix: fix issues with cyclic dependencies when using the update and before_update flag#3857johanneskoester merged 8 commits intomainfrom
johanneskoester merged 8 commits intomainfrom
Conversation
Contributor
📝 WalkthroughWalkthroughCycle detection and update-flag handling in Snakemake's DAG were changed: cycles involving files flagged with before_update are ignored in strict ordering checks, and before_update assignments are recorded only after update jobs are determined and only when no update job exists for that file. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20–30 minutes
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Contributor
|
Please format your code with |
johanneskoester
approved these changes
Dec 7, 2025
Contributor
|
Great work with the two testcases. They made it super easy to find the issue and will prevent it in the future. |
johanneskoester
pushed a commit
that referenced
this pull request
Dec 8, 2025
🤖 I have created a release *beep* *boop* --- ## [9.14.3](v9.14.2...v9.14.3) (2025-12-08) ### Bug Fixes * ensure that queue input jobs wait if the queue is still empty upon job creation ([#3866](#3866)) ([555ab6a](555ab6a)) * fix issues with cyclic dependencies when using the update and before_update flag ([#3857](#3857)) ([21cc94e](21cc94e)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
kjohnsen
pushed a commit
to kjohnsen/snakemake
that referenced
this pull request
Dec 15, 2025
…fore_update flag (snakemake#3857) <!--Add a description of your PR here--> ### 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. * [x] 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** * Cycle detection now ignores cases involving before_update flags to avoid false-cycle reports. * Flag precedence corrected so update jobs take precedence over before_update when both apply. * **Tests** * Added tests and fixtures covering cyclic dependency scenarios, including a forced-rerun case, to validate the updated behavior. <sub>✏️ Tip: You can customize this high-level summary in your review settings.</sub> <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Johannes Koester <[email protected]>
kjohnsen
pushed a commit
to kjohnsen/snakemake
that referenced
this pull request
Dec 15, 2025
🤖 I have created a release *beep* *boop* --- ## [9.14.3](snakemake/snakemake@v9.14.2...v9.14.3) (2025-12-08) ### Bug Fixes * ensure that queue input jobs wait if the queue is still empty upon job creation ([snakemake#3866](snakemake#3866)) ([555ab6a](snakemake@555ab6a)) * fix issues with cyclic dependencies when using the update and before_update flag ([snakemake#3857](snakemake#3857)) ([21cc94e](snakemake@21cc94e)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
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.
QC
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).Summary by CodeRabbit
Bug Fixes
Tests
✏️ Tip: You can customize this high-level summary in your review settings.