Skip to content

Don't clobber do_not_cache setting when completing a lease

Jeremiah Bonney requested to merge jbonney/fix-uncacheable-actions into master

Before raising this MR, consider whether the following are required, and complete if so:

  • Unit tests
  • Metrics
  • Documentation update(s)

If not required, please explain in brief why not.

Description

When completing a lease the do_not_cache field on the job is currently being set to True if the Lease status is non-zero and set to False otherwise. This clobbers any previous setting, meaning that all actions are cached even if do_not_cache is set when submitting the execution. This PR addresses this by not overwriting do-not-cache if it's already set to `True'.

Validation

Still working on a test for this, but Added tests for this behavior as well as an additional one for job deduplication which I didn't see accounted for anywhere. You can also verify by submitting an execution with do_not_cache set does get cached with the current behavior, but doesn't after this change.

Edited by Jeremiah Bonney

Merge request reports

Loading