Open madwort opened 1 month ago
This PR makes the test reliably fail: https://github.com/opensafely-core/job-runner/pull/749
following @inglesp pointing at this line, I think the issue is that get_obsolete_files()
does for existing in list_outputs_from_action()
which seems like it should look up the outputs from the previous job, but actually gets the outputs from the current job - and therefore I think will always return []
. The test passes because we sort on created_at
& in 98% of test runs that is equal so the array is “unsorted” and we unintentionally get the previous job.
I haven't yet looked into whether this means that any outputs that should have been removed from a workspace are still in place.
@evansd flagged up an intermittent error on a CI run in this slack thread.
@inglesp could reproduce ~2% of the time, and spotted that freezing time would make the test reliably pass.