git ssb


0+

Dominic / patchbay-cel



forked from Dominic / patchbay

I wanted to try out your fulltext search plugin but I'm having trouble cloning your repo:

%BmRb1FrGg9yIxUq2tS5E2nQ+EmxWNVAvuvUjk/CqeJw=.sha256
Openarj opened this issue on 1/13/2017, 2:26:13 PM

I wanted to try out your fulltext search plugin but I'm having trouble cloning your repo:

git clone ssb://%Hq+YIFBq9MM1Idy4+IB05MHcVaRgNyG4UJARn8C/2ck=.sha256 patchbay-cel Cloning into 'patchbay-cel'... Receiving objects: 100% (3471/3471), 2.27 MiB | 0 bytes/s, done. Resolving deltas: 100% (1392/1392), done. fatal: did not receive expected object 968dba2f62d9e537fe3cd9013e6faa8f753e38a2
fatal: index-pack failed

%2Uw5+bv3eL80jDkH/YJAnZLkgv1Fc7XAD4tHGIAU+oM=.sha256 cryptix · 1/13/2017, 3:41:47 PM

uh.. yea.. that's a bug in git-ssb right now..

try this env var workaround: export GITSSB_OLD_PACKS=1 should help with clone, fetch and other porcelain friends.

%V52NKrWR8Xp2EiT8V/UQ0MhbSmmjjy62k30u7gemRiU=.sha256 cel · 1/13/2017, 6:19:43 PM

patchbay repo is currently in a bad state for fetching from without that env var. it is because of a bug which i fixed in ssb-git-repo v2.5.1, but i still have to fix the patchbay repo manually. i was thinking of making a command like git ssb fix <commitid> that you could paste the "expected object" id into to fix a repo that this happens to. it may need other clients to update as well though to respect the fix though

%VKPmZcwwofZ2orGXcbdSKR31p4/SI/nW2ge6x756C2o=.sha256 arj · 1/13/2017, 7:17:57 PM

If you can detect the error in later versions and give suggestion as to fix it manually I don't think its that big of a problem.

%RzxRQBDmyb5Pcr8lv2ye9S+088g+lBCcNqFMpGP/UfQ=.sha256 arj · 1/13/2017, 7:42:49 PM

After checkout of the repo (thanks @cryptix) I'm getting this error when running lite client: export declared but not returnedsbot_fulltext_search in:sbot.js. Did you forget to commit something?

%IAeYTYlFV5yjwv3uypPwuH+pya9t/zeWJSrdt8/XMRc=.sha256 arj · 1/18/2017, 8:40:20 PM

@cel?

%AT7JmZ9C8Fbok0t0ISm9Ul2ajSyBb4ju8jkSXxs8unc=.sha256 cel · 1/18/2017, 9:45:01 PM

@arj looks like i did the merge wrong. i'll reply here when i've fixed that

%qHA+wgEXmZq8snAJHu8tKnM9pF6dzSf8oRRMoQ0MPrs=.sha256 cel · 1/19/2017, 3:57:09 AM

@arj I pushed a fix for sbot_fulltext_search: %BiNwKFp...

I also got the patchbay git-ssb repo back into a good state, by including the missing branch message id in a push syncing changes from github: %xpZC9sy.... I didn't yet add a high-level way to do this type of fix, but if the issue reoccurs then I may revisit that. Anyway, it should work now to fetch from the repo without that env var. cc @cryptix @mixmix @Dominic_temp @ev

%KR6Ps6noKC+vN7xwjHu+9LL7lsHzC10rdHS+9LPDamI=.sha256 cryptix · 1/19/2017, 12:34:18 PM

thanks @cel! can you jott down the commands to construct the fixer message?

%oCU7qHMfK8cK0Hs9ENPYcxufGs8z8vrIdS7c0/w87do=.sha256 cel · 1/19/2017, 9:57:48 PM

@cryptix here is how to do it:

  1. copy the missing object id from the error message.
  2. find the missing root message. this is the git-update message that included the missing object.
    • run sbot links --rel repo --values --dest <repo_msg_id>. pipe it to less or to a file.
    • in the links, find the message containing the missing object id. the object id should be at some object_ids[i] or commits[i].sha1 in the content of the message. this message is the missing root message. note that if the repo is a fork, the message may be for the upstream repo, so search for links that repo too. (you can find the upstream of a repo using sbot get <repo_msg_id>).
  3. find any message that links to the missing root message with the property repoBranch.
  4. repeat the previous step recursively, to get the heads of the set of messages that link back to the missing root message with repoBranch. you can optionally ignore messages that you don't want to include in the repo's history, e.g. messages that a later force-push made unnecesary. in a simple case, the only head will be the missing root message.
  5. construct a command to push to the repo and update the master branch (or whichever branch you want to include the missing messages). set the environmental variable GITSSB_EXTRA_UPDATE to the heads from the previous step, comma-separated. set env var DRY_RUN=1 to make the push not actually publish. run the push command with those env vars, and redirect stderr to a json file to capture what it would publish. the command may look like: GITSSB_EXTRA_REPO_BRANCHES=%RWMtRKCH9joz6JSQZKckVm95Zzd17j0OeXM9m4jV62g=.sha256,%p+WdKgvzLAvfYXqZ1f4sAaqF3JZyH6gD7MqHFvIHFUs=.sha256 DRY_RUN=1 git push origin master 2>update.json. Note that you have to actually push new content to the branch. The "extra repo branches" tell git-ssb to include those message ids as dependencies for the new message.

My apologies for the complexity of this.

%gOI9YQk6E4caRzrSk6M0vPM9A0LRTrjTKVk6LbNzI1I=.sha256 cel · 1/19/2017, 10:14:58 PM

Also forgot to add:

The thing about GITSSB_EXTRA_UPDATE is to write the update to a file and then attempt to clone the repo as if the update had been published.

cel mentioned this issue in ssb-git-repo@2.7.0 changes git-ssb's packfile generation algorithm to prevent error "did not receive expected object" bug ( %3sJWH6alu5nQ1MJ

Built with git-ssb-web