Closed Joshua-Anderson closed 7 years ago
@kmala, @arschles and @jeroenvisser101 are potential reviewers of this pull request based on my analysis of git blame
information. Thanks @Joshua-Anderson!
@@ master #445 diff @@
==========================================
Files 29 29
Lines 1199 1219 +20
Methods 0 0
Messages 0 0
Branches 0 0
==========================================
Hits 685 685
- Misses 476 496 +20
Partials 38 38
Powered by Codecov. Last update 5233911...bd97e3e
Rebased this, anything else needed to get this merged?
I think we just need a core maintainer to manually test this doesn't break backwards compatibility and it's good to go. 👍
I tested this change on top of Workflow v2.10.0 with S3 and an existing buildpack app, and also with multiple apps with multiple revisions to ensure it doesn't delete too much. Works as advertised--I kept checking the bucket contents as well.
Cleaner deleting cache home/walkup-zirconia/cache for app walkup-zirconia
Cleaner deleting slug /home/walkup-zirconia:git-e91bdc46 for app walkup-zirconia
Cleaner deleting cache home/jangly-tailbone/cache for app jangly-tailbone
Cleaner deleting slug /home/jangly-tailbone:git-11241b3a for app jangly-tailbone
Cleaner deleting slug /home/jangly-tailbone:git-d57c638a for app jangly-tailbone
Thanks a ton @Joshua-Anderson!
The cleaner now deletes slug and cache files from object storage as well as locally. I didn't write any tests I'm not sure the best way to attempt to mock the object store driver and the cleaner function is untested.
I'm happy to write tests if you have pointers to ways to go about mocking the storage driver.
Fixes #214