Skip to content

fix: ensure that storage is not actually retrieved with --touch#4212

Merged
johanneskoester merged 2 commits into
mainfrom
fix/touch-remote-retrieve
Jun 1, 2026
Merged

fix: ensure that storage is not actually retrieved with --touch#4212
johanneskoester merged 2 commits into
mainfrom
fix/touch-remote-retrieve

Conversation

@johanneskoester

@johanneskoester johanneskoester commented Jun 1, 2026

Copy link
Copy Markdown
Contributor

QC

  • 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).
  • I, as a human being, have checked each line of code in this pull request

AI-assistance disclosure

I used AI assistance for:

  • Code generation (e.g., when writing an implementation or fixing a bug)
  • Test/benchmark generation
  • Documentation (including examples)
  • Research and understanding

Summary by CodeRabbit

  • Bug Fixes

    • Touch-mode now skips unnecessary storage input retrieval, matching dry-run behavior and improving performance when touching files without executing jobs.
  • Tests

    • Expanded tests to verify that both dry-run and touch executors do not trigger storage retrieval.

@coderabbitai

coderabbitai Bot commented Jun 1, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: da0aba70-e156-45d3-baa7-73c1c08a7265

📥 Commits

Reviewing files that changed from the base of the PR and between 311e41d and e2f61c2.

📒 Files selected for processing (1)
  • tests/tests.py

📝 Walkthrough

Walkthrough

The job scheduler's storage input retrieval step now skips retrieval when running in --touch mode, in addition to the existing skip for --dryrun mode. The gating condition was updated to check for either mode before attempting to retrieve storage inputs for local jobs.

Changes

Touch mode storage input skip

Layer / File(s) Summary
Storage input retrieval gate for touch and dry-run modes
src/snakemake/scheduling/job_scheduler.py
The condition guarding the retrieve_storage_inputs call in JobScheduler.schedule now skips retrieval when either dryrun or touch is set, extending existing dry-run behavior to touch mode.
Parametrized test for no-retrieve in dryrun/touch
tests/tests.py
Replaced the single-case test with test_storage_noretrieve_dryrun_or_touch, parametrized over executors dryrun and touch, patching DAG.retrieve_storage_inputs with an AsyncMock and asserting it is not called during run(...).

🎯 3 (Moderate) | ⏱️ ~20 minutes

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 25.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main fix: preventing storage retrieval when using the --touch option.
Description check ✅ Passed The PR description completes all required template sections with appropriate checkmarks indicating test coverage, documentation status, and human code review.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/touch-remote-retrieve

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@johanneskoester johanneskoester merged commit 2726cae into main Jun 1, 2026
90 checks passed
@johanneskoester johanneskoester deleted the fix/touch-remote-retrieve branch June 1, 2026 16:18
johanneskoester pushed a commit that referenced this pull request Jun 1, 2026
🤖 I have created a release *beep* *boop*
---


##
[9.22.0](v9.21.1...v9.22.0)
(2026-06-01)


### Features

* add semantic helper functions choose_file/choose_folder/choose_tmp and
allow all semantic helper functions to be used when parsing resources
([#3820](#3820))
([d3c2386](d3c2386))
* add temp to default pathvars
([#4108](#4108))
([917fb11](917fb11))
* add workflow info to log
([#4079](#4079))
([e40e15b](e40e15b))
* support python 3.14
([#3739](#3739))
([7e3be0c](7e3be0c))


### Bug Fixes

* Adapt for dataclasses._MISSING_TYPE replaced with sentinel in Python
3.15 ([#4211](#4211))
([b7fb8df](b7fb8df))
* ensure that storage is not actually retrieved with --touch
([#4212](#4212))
([2726cae](2726cae))
* symlink to directory "has older modification time" than target
([#3782](#3782))
([#3784](#3784))
([41903d8](41903d8))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).
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