phac-nml / irida-next

IRIDA Next
https://phac-nml.github.io/irida-next/
Apache License 2.0
8 stars 2 forks source link

[DFCT0010103] Fix blob deletion bug and allow cron job configuration #658

Closed JeffreyThiessen closed 23 hours ago

JeffreyThiessen commented 6 days ago

What does this PR do and why?

  1. Fixes a bug where when a WorkflowExecution in the new state is canceled by the user, nil would be passed into the blob service delete_prefixed, resulting in an rm * effect deleting all the blobs.

Now new runs that are canceled will not schedule a cleanup job or a cancelation job (which included a cleanup step). Additionally a safety check has been added to the cleanup job such that nil and "" cannot be passed into the function.

  1. We want to be able to enable and disable the automatic cron cleanup jobs.

Adds ENV variable ENABLE_CRON, when "true" cron jobs will run, when "false" cron jobs will not run. Default is "true"

Adds ENV variable CRON_CLEANUP_AFTER_DAYS. This determines how many days old an attachment or sample must be before it is cleaned by the cron jobs. Default is 7 days

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other pull requests.

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

PR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

github-actions[bot] commented 1 day ago

Simplecov Report

Covered Threshold
92.51% 90%