labgrid icon indicating copy to clipboard operation
labgrid copied to clipboard

Add support for removing remote files when no longer needed

Open JoshuaWatt opened this issue 2 years ago • 2 comments

Description Files controlled with ManagedFile can sometimes be quite large and consume a large amount of space on the exporter, potentially causing it to run out and fail tests. In these cases, it is preferred to transfer the files every time they are needed instead of keeping them around in the cache.

This adds a new cleanup API to ManagedFile to allow the remote file to be cleaned up manually when no longer required. The FlashScriptDriver has been extended to support this new API as well

Checklist

  • [x] Documentation for the feature
  • [x] Tests for the feature
  • [x] The arguments and description in doc/configuration.rst have been updated
  • [ ] Add a section on how to use the feature to doc/usage.rst
  • [ ] Add a section on how to use the feature to doc/development.rst
  • [x] PR has been tested
  • [ ] Man pages have been regenerated

JoshuaWatt avatar Apr 05 '23 14:04 JoshuaWatt

Codecov Report

Patch coverage: 92.0% and no project coverage change.

Comparison is base (95f309d) 63.2% compared to head (e92b985) 63.2%.

Additional details and impacted files
@@          Coverage Diff           @@
##           master   #1126   +/-   ##
======================================
  Coverage    63.2%   63.2%           
======================================
  Files         152     152           
  Lines       11429   11449   +20     
======================================
+ Hits         7225    7243   +18     
- Misses       4204    4206    +2     
Impacted Files Coverage Δ
labgrid/util/managedfile.py 82.9% <88.2%> (+1.1%) :arrow_up:
labgrid/driver/flashscriptdriver.py 94.4% <100.0%> (+0.5%) :arrow_up:

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

codecov[bot] avatar Apr 05 '23 14:04 codecov[bot]

Could you explain why the tmpfiles.d suggestion in the "attention box" in the exporter docs does not work for you?

Bastian-Krause avatar Apr 13 '23 09:04 Bastian-Krause