Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: issue #1257 (missing logfile failure when using shadow directory) #1258

Merged
merged 5 commits into from Nov 27, 2021

Conversation

jaicher
Copy link
Contributor

@jaicher jaicher commented Nov 12, 2021

Description

  • Test test_shadowed_log that demonstrates the failure case with issue Job failure with shadow directive if log files not created #1257
  • If logfile(s) were not created by job, Snakemake now creates empty logfile(s) in directory they would have been created in (i.e. shadow directory, if it was enabled) instead of its final destination. This allows snakemake.dag.unshadow_output(...) to successfully copy the logfile from the shadow directory to its final destination.

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).

jaicher added 2 commits Nov 12, 2021
This addresses gh snakemake#1257. If the rule did not create a logfile, an empty
one would be created in its final destination. If the shadow directive
was used, however, Snakemake would try to move the nonexistent logfile
from the shadow directory to its final location. This caused the
observed failures. This commit has Snakemake create the empty file where
Snakemake would have expected the program to create it (i.e. in the
shadow directory). This enables the unshadow operation that takes place
later to succeed.
@jaicher jaicher requested a review from johanneskoester as a code owner Nov 12, 2021
@jaicher jaicher changed the title Fix missing logfile when using shadow directory (issue #1257) fix: issue #1257 (missing logfile failure when using shadow directory) Nov 12, 2021
Copy link
Contributor

@johanneskoester johanneskoester left a comment

Thanks a lot, I have slightly modified your fix to also take care of remote files in the right way.

@sonarcloud
Copy link

sonarcloud bot commented Nov 26, 2021

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@johanneskoester johanneskoester merged commit 426d92f into snakemake:main Nov 27, 2021
6 checks passed
@jaicher jaicher deleted the fix-missing-shadowed-logs branch Dec 1, 2021
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.

None yet

2 participants