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.
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.
What does this PR do and why?
WorkflowExecution
in thenew
state is canceled by the user,nil
would be passed into the blob servicedelete_prefixed
, resulting in anrm *
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.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 is7
daysScreenshots 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.