-
Notifications
You must be signed in to change notification settings - Fork 628
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
Clean up option fail when using AWS Batch (and likely other clouds) #3645
Comments
We're running into high S3 storage costs due to our inability to smartly delete files when a workflow completes successfully. It's introducing overhead on Tower admins because we need to manually delete files when buckets get too large. Could we see this feature bumped in priority? Ideally with a timeline. Thanks! |
The problem is pretty straightforward, in ScriptRunner: protected shutdown() {
session.destroy()
session.cleanup()
Global.cleanUp()
log.debug "> Execution complete -- Goodbye"
} Session destroy() is called before cleanup(). But the Session destroy() shuts down the plugin manager, which breaks the cleanup. On the other hand, destroy() also shuts down the publish dir executor, which includes waiting for any ongoing publish tasks to finish. So we can't just switch the two calls because then the task directories might be deleted before they are done publishing. What I propose is to put the cleanup() code in destroy() so that it is called after the publishing but before the plugin manager shutdown. I will draft a PR. |
@bentsherman Thanks for tackling this! |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Bug report
Nextflow fails to perform the pipeline work directory cleanup when using AWS Batch and other cloud providers
The following error is reported
Complete log file is attached
nextflow.log
The text was updated successfully, but these errors were encountered: