Scenario: 1) I push a branch to ross/mut 2) Start autobuilder nightly on ross/mut 3) Autobuilder master fetches ross/mut, resolves name to SHA 1234. 4) Time passes. I discover a problem with the branch, remove a commit, force-push to ross/mut *mid build*. 5) New builder starts, fetches just ross/mut and resets to 1234. However, in the new ross/mut 1234 doesn't exist anymore so the reset fails At this point the autobuilder then claims to be building ross/mut but is simply building whatever was in the previous clone. In the case of https://autobuilder.yoctoproject.org/main/builders/nightly-deb/builds/436/ it was a previous MUT which we noticed because of the particular way the sanity tests failed later... but if it were master we'd think that ross/mut built fine when it actually build master. Instead of fetching just ross/mut the fetch should grab all of the poky-contrib repo so unless there's been a garbage collect, even force-pushed branches will still work as the old SHA will still be present. (git 2.5 with specific server side flags enabled will let you fetch a specific SHA, but that's a big ask: easier to just grab everything)
Okay, so my plan doesn't quite work. From a clean repo fetching all won't fetch the now unreachable reference. Assuming it existed at some point in the past it will work. Unless someone has a better idea we can't get now-unreachable commits so we just need to error out asap (bug 8196).
Richard has already added some code, please verify and close these based on those changes
Fix for 8196 http://git.yoctoproject.org/cgit.cgi/yocto-autobuilder/commit/?id=77af111ea86b0423c28371c83d326b8f6b782e39 was merged.
Verified.