Bug 8195 - [autobuilder] Fetch of specific branch means possible required commit isn't present
Summary: [autobuilder] Fetch of specific branch means possible required commit isn't p...
Status: VERIFIED FIXED
Alias: None
Product: AutoBuilder
Classification: Infrastructure
Component: autobuilder (show other bugs)
Version: unspecified
Hardware: All Multiple
: Medium+ major
Target Milestone: 1.9 M3
Assignee: Beth Flanagan
QA Contact: Mihail Stanciu
URL:
Whiteboard:
Depends on:
Blocks: 8249
  Show dependency tree
 
Reported: 2015-08-21 10:38 UTC by Ross Burton
Modified: 2015-09-21 09:23 UTC (History)
5 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ross Burton 2015-08-21 10:38:54 UTC
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)
Comment 1 Ross Burton 2015-08-21 11:03:09 UTC
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).
Comment 2 Saul Wold 2015-08-27 14:40:35 UTC
Richard has already added some code, please verify and close these based on those changes
Comment 4 Mihail Stanciu 2015-09-21 09:23:21 UTC
Verified.