fix: only modify wrapper URI if imported rule actually uses a wrapper#3790
Conversation
📝 WalkthroughWalkthroughAdded a None guard in apply_modifier to call modifier.modify_wrapper_uri only when self.wrapper is not None. No other logic changes. Changes
Sequence Diagram(s)sequenceDiagram
participant Caller
participant RuleInfo
participant Modifier
Caller->>RuleInfo: apply_modifier(modifier)
alt wrapper is not None
RuleInfo->>Modifier: modify_wrapper_uri(self.wrapper)
Modifier-->>RuleInfo: new_wrapper_uri
RuleInfo-->>Caller: complete
else wrapper is None
Note right of RuleInfo: Skip wrapper modification
RuleInfo-->>Caller: complete
end
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
🧰 Additional context used📓 Path-based instructions (1)**/*.py⚙️ CodeRabbit configuration file
Files:
🧠 Learnings (1)📚 Learning: 2025-09-17T04:03:59.943ZApplied to files:
🧬 Code graph analysis (1)src/snakemake/ruleinfo.py (2)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (45)
🔇 Additional comments (1)
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 |
🤖 I have created a release *beep* *boop* --- ## [9.13.2](v9.13.1...v9.13.2) (2025-10-12) ### Bug Fixes * fix --consider-ancient for input functions (was not applied in those cases) ([#3788](#3788)) ([c28da7c](c28da7c)) * only modify wrapper URI if imported rule actually uses a wrapper ([#3790](#3790)) ([08ef3b4](08ef3b4)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
…snakemake#3790) ### Description <!--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** * Fixed an issue where rules without a wrapper could error during modifier application; the wrapper is now only modified when present. * No behavioral changes for rules that already use a wrapper. * Reduces unexpected failures during pipeline execution and improves error resilience, especially in scenarios with optional wrapper configuration. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
🤖 I have created a release *beep* *boop* --- ## [9.13.2](snakemake/snakemake@v9.13.1...v9.13.2) (2025-10-12) ### Bug Fixes * fix --consider-ancient for input functions (was not applied in those cases) ([snakemake#3788](snakemake#3788)) ([c28da7c](snakemake@c28da7c)) * only modify wrapper URI if imported rule actually uses a wrapper ([snakemake#3790](snakemake#3790)) ([08ef3b4](snakemake@08ef3b4)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
Description
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