<?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>11276</bug_id>
          
          <creation_ts>2017-03-31 12:40:43 +0000</creation_ts>
          <short_desc>CI: oe-selftests must have BUILD_ID set</short_desc>
          <delta_ts>2017-04-04 14:39:03 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>6</classification_id>
          <classification>Yocto Project Subprojects</classification>
          <product>IoT Reference OS Kit</product>
          <component>intel-iot-refkit-tools</component>
          <version>unspecified</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium+</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>2.3 M4</target_milestone>
          
          <blocked>11070</blocked>
    
    <blocked>11071</blocked>
    
    <blocked>11072</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Patrick Ohly">patrick.ohly</reporter>
          <assigned_to name="Olev Kartau">olev.kartau</assigned_to>
          <cc>mikko.ylinen</cc>
    
    <cc>olev.kartau</cc>
          
          
          <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>71960</commentid>
    <comment_count>0</comment_count>
    <who name="Patrick Ohly">patrick.ohly</who>
    <bug_when>2017-03-31 12:40:43 +0000</bug_when>
    <thetext>We are seeing failures in the testing of https://github.com/intel/intel-iot-refkit/pull/97 that look like they are caused by setting BUILD_ID=CI_BUILD_ID only in build.sh, but not the selftest jobs: there&apos;s a delay during selftest that implies that some real image building takes place, and the resulting images after that end up having the wrong filename.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>71991</commentid>
    <comment_count>1</comment_count>
    <who name="Patrick Ohly">patrick.ohly</who>
    <bug_when>2017-04-01 12:46:46 +0000</bug_when>
    <thetext>I&apos;ve added a fix to https://github.com/intel/intel-iot-refkit/pull/97</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>72003</commentid>
    <comment_count>2</comment_count>
    <who name="Olev Kartau">olev.kartau</who>
    <bug_when>2017-04-03 07:06:12 +0000</bug_when>
    <thetext>Yes, makes sense to define same BUILD_ID in all CI scripts,
but it&apos;s somewhat disturbing that CI tester tries to test
something that gets built in pre/post build stages.
Means, it&apos;s probably good that tester failed as it
was clearly trying to test something not built by 
builder script.
Which brings back question, perhaps it is good after all
to have different BUILD_ID used in pre/post scripts,
pointing out overriden builds happening by some side effect,
that we need start investigate.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>72005</commentid>
    <comment_count>3</comment_count>
    <who name="Olev Kartau">olev.kartau</who>
    <bug_when>2017-04-03 07:53:59 +0000</bug_when>
    <thetext>I looked more closely to this job log (refkit CI PR build #539).
Based on logs, images existence and timestamps, it seems that
post-build script wiped images that were built by build script,
then built images again with different BUILD_ID.
This is clearly unwanted chain of events,
which was caught thanks to differently set BUILD_ID,
so I dont support idea of this bug title after all,
as same BUILD_ID would make such hiddne wipe-and-replace possible.
Post-build test must not affect build stage result.

We may want to re-think our publishing flow,
which was created before adding pre/post testing.
We publish all result areas in all paths now,
this serves idea that some results/logs are helpful
even after failed/incomplete build stage.

Current flow:
pre-build,build,post-build,publish

Perhaps publish should happen immediately after build phase, to
make sure we publish what we build.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>72006</commentid>
    <comment_count>4</comment_count>
    <who name="Olev Kartau">olev.kartau</who>
    <bug_when>2017-04-03 08:23:00 +0000</bug_when>
    <thetext>I overlooked idea that post-build test uses BUILD_ID to select built images,
means my analysis was not entirely correct, and we need it set same way.
But this case still points to publishing problem,
as now there are mixed results from both build and post-build-test stages,
which we publish together.
We should not publish artifacts from post-build-test stage in same location.
If these need publishing, another location should be used.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>72014</commentid>
    <comment_count>5</comment_count>
    <who name="Olev Kartau">olev.kartau</who>
    <bug_when>2017-04-03 10:13:13 +0000</bug_when>
    <thetext>PR#100 created, adds BUILD_ID setting, plus restores some cleanroom principles:
- dont keep build/ from after pre-build, 
- publish images right after build phase, so post-build additions dont get out.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>72067</commentid>
    <comment_count>6</comment_count>
    <who name="Mikko Ylinen">mikko.ylinen</who>
    <bug_when>2017-04-04 14:39:03 +0000</bug_when>
    <thetext>PR#100 is merged</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>