Git to/of_octets and startup #20
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
As remarked by @dinosaure in #18 (comment), we don't need to check the PACK checksums.
But I wonder whether the "we store the git repo to disk" is the path forward, given that all we need for operation is the tarball.
So, an alternative approach would be to:
If we go this path, I guess since the tarball is much smaller than the git repository, our time from boot to service, would be much smaller.
I guess the question I have in mind is whether a git_kv pull from scratch (without an existing git_kv) is bandwidth-wise much more expensive than if we have a repository already.
An alternative path would be:
What do you think?
what is still unclear to me is whether we should only dump the index.tar.gz or also the git repository?
and if the answer is yes to the latter, should we store it uncompressed? the issue is we'd need a bigger git partition than.
From further discussion, it became clear to me:
A
Git_kv.pull
from scratch is probably less or equal bandwidth-wise because we ask only for the last commit, see:( match t.head with
| None -> Lwt.return (`Depth 1)
| Some head ->
Store.read_exn t.store head >>= fun value ->
let[@warning "-8"] Git.Value.Commit commit = value in
(* TODO(dinosaure): we should handle correctly [tz] and re-calculate the timestamp. *)
let { Git.User.date= (timestamp, _tz); _ } = Store.Value.Commit.author commit in
Lwt.return (`Timestamp timestamp) ) >>= fun deepen ->
If you do a
Git_kv.pull
from an existinggit-kv
, we must take into account diffs between your actual snapshot and what we have onopam-repository
. So we ask few commits to be able to generate the diff. But from scratch, we only ask for the last commit - it's really like agit clone --depth=1 ...
.This may be costly because there is nothing between the server and the unikernel (since the unikernel has nothing), so we can't find common ancestors that could produce a "thin" PACK file (lighter but requiring the unikernel to have Git objects).
Intuitively, this should have little impact on the time needed to check the PACK file. But not a big speed-up.