<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>8195</bug_id>
          
          <creation_ts>2015-08-21 10:38:54 +0000</creation_ts>
          <short_desc>[autobuilder] Fetch of specific branch means possible required commit isn&apos;t present</short_desc>
          <delta_ts>2015-09-21 09:23:21 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>5</classification_id>
          <classification>Infrastructure</classification>
          <product>AutoBuilder</product>
          <component>autobuilder</component>
          <version>unspecified</version>
          <rep_platform>All</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>VERIFIED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium+</priority>
          <bug_severity>major</bug_severity>
          <target_milestone>1.9 M3</target_milestone>
          
          <blocked>8249</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Ross Burton">ross.burton</reporter>
          <assigned_to name="Beth Flanagan">elizabeth.flanagan</assigned_to>
          <cc>bogdanx.a.voiculescu</cc>
    
    <cc>infras.ab.watcher</cc>
    
    <cc>Infras.watcher</cc>
    
    <cc>richard.purdie</cc>
    
    <cc>sgw</cc>
          
          <qa_contact name="Mihail Stanciu">stanciux.mihail</qa_contact>
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>No (bug/feature does not impact docs)</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>53313</commentid>
    <comment_count>0</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2015-08-21 10:38:54 +0000</bug_when>
    <thetext>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&apos;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&apos;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&apos;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&apos;s a big ask: easier to just grab everything)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>53317</commentid>
    <comment_count>1</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2015-08-21 11:03:09 +0000</bug_when>
    <thetext>Okay, so my plan doesn&apos;t quite work.  From a clean repo fetching all won&apos;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&apos;t get now-unreachable commits so we just need to error out asap (bug 8196).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>53476</commentid>
    <comment_count>2</comment_count>
    <who name="Saul Wold">sgw</who>
    <bug_when>2015-08-27 14:40:35 +0000</bug_when>
    <thetext>Richard has already added some code, please verify and close these based on those changes</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>53881</commentid>
    <comment_count>3</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2015-09-09 13:12:26 +0000</bug_when>
    <thetext>Fix for 8196 http://git.yoctoproject.org/cgit.cgi/yocto-autobuilder/commit/?id=77af111ea86b0423c28371c83d326b8f6b782e39 was merged.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>54357</commentid>
    <comment_count>4</comment_count>
    <who name="Mihail Stanciu">stanciux.mihail</who>
    <bug_when>2015-09-21 09:23:21 +0000</bug_when>
    <thetext>Verified.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>