nf-test icon indicating copy to clipboard operation
nf-test copied to clipboard

Caching of setup fixtures' results

Open Midnighter opened this issue 1 year ago • 2 comments

I recently worked on a test that involved using a setup step to untar a rather large database (~8 GB), see here. These tests were causing the GitHub runners to fail because they ran out of space. So that's when I discovered that files for an identical setup step are staged and results generated individually. Leading to more than 24 GB space being used.

In pytest, there is a concept of fixture scope, which can be per function, module, or the entire test session. Results of fixtures are cached and reused accordingly. I think, that'd be a fantastic feature for nf-test as well.

Midnighter avatar May 07 '24 22:05 Midnighter

Thanks, great idea! I will look into this in the next few weeks 👍

lukfor avatar May 09 '24 21:05 lukfor

This would be awesome, having the same issue as with @Midnighter !

I actually had assumed that the global setup meant that the output would be reused across each test, and only learnt today that that wasn't the case - so it would make more sense 'intuitively' to me too :)

jfy133 avatar Aug 29 '24 11:08 jfy133