After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 733458 - Fix two embarassing bugs in prune (via object enumeration)
Fix two embarassing bugs in prune (via object enumeration)
Status: RESOLVED FIXED
Product: ostree
Classification: Infrastructure
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: OSTree maintainer(s)
OSTree maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2014-07-20 16:21 UTC by Colin Walters
Modified: 2014-07-21 11:59 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
core: Do enumerate content objects in archive-z2 repositories (1.22 KB, patch)
2014-07-20 16:22 UTC, Colin Walters
committed Details | Review
core: Do enumerate ff/ objects as well (867 bytes, patch)
2014-07-20 16:22 UTC, Colin Walters
none Details | Review
core: Do enumerate ff/ objects as well (2.01 KB, patch)
2014-07-21 02:16 UTC, Colin Walters
reviewed Details | Review
core: Do enumerate ff/ objects as well (1.72 KB, patch)
2014-07-21 02:40 UTC, Colin Walters
committed Details | Review

Description Colin Walters 2014-07-20 16:21:57 UTC
See attached.
Comment 1 Colin Walters 2014-07-20 16:22:00 UTC
Created attachment 281245 [details] [review]
core: Do enumerate content objects in archive-z2 repositories

Prune has worked fine on bare repositories for some time, but now that
I finally try to delete data on the server side, I notice we weren't
actually enumerating content objects =/

That caused them to not be pruned.
Comment 2 Colin Walters 2014-07-20 16:22:07 UTC
Created attachment 281246 [details] [review]
core: Do enumerate ff/ objects as well

An embarassing off-by-one here.  I noticed we weren't pruning them.
Comment 3 Jasper St. Pierre (not reading bugmail) 2014-07-20 22:35:06 UTC
Is it possible to have testcases for either of these?
Comment 4 Colin Walters 2014-07-21 02:16:13 UTC
Created attachment 281276 [details] [review]
core: Do enumerate ff/ objects as well

Now with test case.  Verified it fails before the change too.
Comment 5 Jasper St. Pierre (not reading bugmail) 2014-07-21 02:28:21 UTC
Review of attachment 281276 [details] [review]:

91-ostree.preset removed? Seems unrelated?

The test case also looks like it's attached to the wrong commit. I don't see it testing 'ff' objects at all, only .filez ones.
Comment 6 Colin Walters 2014-07-21 02:39:25 UTC
(In reply to comment #5)
> Review of attachment 281276 [details] [review]:
> 
> 91-ostree.preset removed? Seems unrelated?
> 
> The test case also looks like it's attached to the wrong commit. I don't see it
> testing 'ff' objects at all, only .filez ones.

It's testing both, because we're asserting that all objects are removed, including ff/ and including .filez.
Comment 7 Colin Walters 2014-07-21 02:40:53 UTC
Created attachment 281279 [details] [review]
core: Do enumerate ff/ objects as well

Updated patch without removing preset file.
Comment 8 Jasper St. Pierre (not reading bugmail) 2014-07-21 11:06:41 UTC
Review of attachment 281279 [details] [review]:

OK.
Comment 9 Colin Walters 2014-07-21 11:59:03 UTC
Attachment 281245 [details] pushed as 1834a71 - core: Do enumerate content objects in archive-z2 repositories
Attachment 281279 [details] pushed as e392820 - core: Do enumerate ff/ objects as well