GNOME Bugzilla – Bug 765701
Mirror static deltas
Last modified: 2018-08-17 19:00:12 UTC
We have 2 repos, say dev and production, to keep real users from seeing development trees. If we create a static delta in the dev repo and test that it works, we'd like to pull that exact delta to the production repo instead of recreating it there after pulling the updated refs. Unless I'm missing something, it seems like the current pull code only takes a delta and generates the objects from it. Is there a way to mirror a delta from one repo to another? I suppose we could copy the appropriate delta directories, but it would be nice to have this supported directly in ostree.
We should indeed support mirroring deltas. I'm a bit uncertain as to whether it should become the default or not. I suspect it'd help some users (who really want a full mirror) but break others (who e.g. are just trying to pull an individual commit). It sounds like what you want is to potentially mirror a subset of the deltas, not all of them right?
Hm, from my reading of the current pull code, we'll actually try to execute static deltas if we happen to have a previous ref, and likely assert, since we don't support executing deltas to archive-z2. Will investigate.
Yeah, this is a bit trickier than I originally thought. A couple thoughts without thinking too much about it. Subset of deltas is probably what we want. One way to handle it would be to include any delta where the destination ref is in the pull set. I don't think it should be the default, but maybe a separate flag. Another possibility would be to add a separate API where the from and to refs could be specified. Or maybe extend the pull options variant to take an array of from/to tuples.
I started working on this a while ago but haven't had time to get back to it. WIP code in https://github.com/dbnicholson/ostree/commits/mirror-deltas. I hadn't even got to compiling it yet but had started to figure out what it would look like.
OSTree has moved to Github a while ago. Furthermore, GNOME Bugzilla will be shut down and replaced by gitlab.gnome.org. If the problem reported in this Bugzilla ticket is still valid, please report it to https://github.com/ostreedev/ostree/issues instead. Thank you! Closing this report as WONTFIX as part of Bugzilla Housekeeping.