<?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>9293</bug_id>
          
          <creation_ts>2016-03-17 17:27:38 +0000</creation_ts>
          <short_desc>bitbake: Add support for trigger event on errors like exceptions</short_desc>
          <delta_ts>2016-07-20 19:35: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>2.2</version>
          <rep_platform>x86</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>High</priority>
          <bug_severity>enhancement</bug_severity>
          <target_milestone>2.2 M1</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Aníbal Limón">anibal.limon</reporter>
          <assigned_to name="Aníbal Limón">anibal.limon</assigned_to>
          <cc>benjamin.esquivel</cc>
    
    <cc>infras.ab.watcher</cc>
    
    <cc>Infras.watcher</cc>
    
    <cc>jose.perez.carranza</cc>
    
    <cc>joshuagloe</cc>
    
    <cc>pidge</cc>
    
    <cc>poky.bs.watcher</cc>
    
    <cc>poky.watcher</cc>
          
          <qa_contact name="Libertad">libertad.gonzalez.de.la.cruz</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>60109</commentid>
    <comment_count>0</comment_count>
    <who name="Aníbal Limón">anibal.limon</who>
    <bug_when>2016-03-17 17:27:38 +0000</bug_when>
    <thetext>We need a mechanism for trigger events in error scenarios like exceptions, currently we have bb.build.TaskFailed event when tasks fails.

It could be done adding event trigger when call bb.error().

The performance needs to be evaluated to don&apos;t slow build times.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>60492</commentid>
    <comment_count>1</comment_count>
    <who name="Joshua Lock">joshuagloe</who>
    <bug_when>2016-03-29 15:59:58 +0000</bug_when>
    <thetext>Is it truly necessary to integrate this into the core of bitbake? Perhaps we would be better served by providing a wrapper which catches the non-zero exit codes and performs error reporting.

This way we make the feature (and any negative impact) opt-in and furthermore don&apos;t complicate the core bitbake code base unnecessarily.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>60493</commentid>
    <comment_count>2</comment_count>
    <who name="Aníbal Limón">anibal.limon</who>
    <bug_when>2016-03-29 16:09:30 +0000</bug_when>
    <thetext>(In reply to comment #1)
&gt; Is it truly necessary to integrate this into the core of bitbake? Perhaps we
&gt; would be better served by providing a wrapper which catches the non-zero
&gt; exit codes and performs error reporting.
&gt; 
&gt; This way we make the feature (and any negative impact) opt-in and
&gt; furthermore don&apos;t complicate the core bitbake code base unnecessarily.

This bug was filed by me for enable support for send generic errors to error-report web, currently the error-report class looks into task errors triggered by TaskFailed event.

Certainly we should take into account the performance metrics and the complexity of the implementation. I&apos;ll try to implement this approach but if it becomes too difficult to implement/maintain/performance then i&apos;ll change the implementation to review the retcode and if error parse output/logs but this requires another changes in the AB infrastructure also to get rid/move to script error-report class.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>62521</commentid>
    <comment_count>3</comment_count>
    <who name="Aníbal Limón">anibal.limon</who>
    <bug_when>2016-05-30 16:01:41 +0000</bug_when>
    <thetext>We decided that is better to have a process to monitor stdout of bitbake process and looks for exception/errors instead of modify bitbake code base for do it.

The current implementation is at level of Autobuilder and is almost finish, see [1].

[1] http://git.yoctoproject.org/cgit/cgit.cgi/yocto-autobuilder/log/?h=contrib/alimon/devel</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>63235</commentid>
    <comment_count>4</comment_count>
    <who name="Aníbal Limón">anibal.limon</who>
    <bug_when>2016-06-21 23:12:16 +0000</bug_when>
    <thetext>This support was implemented inside of Yocto Autobuilder that&apos;s the reason for move to Autobuilder and now is on review at,

https://lists.yoctoproject.org/pipermail/yocto/2016-June/030742.html

Beth ack&apos;ed the first part of changes so only need to review the v2.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>63402</commentid>
    <comment_count>5</comment_count>
    <who name="Aníbal Limón">anibal.limon</who>
    <bug_when>2016-06-28 14:56:03 +0000</bug_when>
    <thetext>The patches are integrated at,

http://git.yoctoproject.org/cgit/cgit.cgi/yocto-autobuilder/commit/?id=beafae04c9633e4330be588ab0490927f701127a

http://git.yoctoproject.org/cgit/cgit.cgi/yocto-autobuilder/commit/?id=57beefdf33491730155e1a2184895cc82ef95c0a

http://git.yoctoproject.org/cgit/cgit.cgi/yocto-autobuilder/commit/?id=e1e7c3b86720786ae4f60da008f68d4cf5d58559

The remaining work is the deployment into the AB cluster.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>64249</commentid>
    <comment_count>6</comment_count>
    <who name="Libertad">libertad.gonzalez.de.la.cruz</who>
    <bug_when>2016-07-20 19:35:21 +0000</bug_when>
    <thetext>From the nightly autobuilder you can see that in 

https://autobuilder.yoctoproject.org/main/builders/nightly-oe-selftest/builds/602

the error report is collected and sent.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>