<?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>13138</bug_id>
          
          <creation_ts>2019-01-14 11:51:05 +0000</creation_ts>
          <short_desc>srtool_update throws exception</short_desc>
          <delta_ts>2019-01-22 21:11:34 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>6</classification_id>
          <classification>Yocto Project Subprojects</classification>
          <product>Security Response Tool</product>
          <component>General</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.7 M2</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Ross Burton">ross.burton</reporter>
          <assigned_to name="David Reyna">david.reyna</assigned_to>
          
          
          
          <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>82774</commentid>
    <comment_count>0</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2019-01-14 11:51:05 +0000</bug_when>
    <thetext>I&apos;ve just started srtool with current master so the migrations have all happened, but srtool_update fails:

$ ./bin/common/srtool_update.py  -u
BEGINNING UPDATING DATASOURCES... this MAY take a long time
time_now = 2019-01-14 11:48:53
Traceback (most recent call last):
  File &quot;./bin/common/srtool_update.py&quot;, line 265, in &lt;module&gt;
    main(sys.argv[1:])
  File &quot;./bin/common/srtool_update.py&quot;, line 242, in main
    run_updates(args.force,name_filter,args.is_trial)
  File &quot;./bin/common/srtool_update.py&quot;, line 137, in run_updates
    if ORM.DATASOURCE_MINUTELY == update_frequency:
AttributeError: type object &apos;ORM&apos; has no attribute &apos;DATASOURCE_MINUTELY&apos;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>82776</commentid>
    <comment_count>1</comment_count>
    <who name="David Reyna">david.reyna</who>
    <bug_when>2019-01-14 11:58:38 +0000</bug_when>
    <thetext>Workaround:

  bin/common/srtool_common.py --generate-schema-header

The root cause is that I added new ORM defines in a recent commit, but they are not seen yet in your headers.

I will fix this data source so that it updates the headers each time you restart the application, so that this will not happen in the future.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>82777</commentid>
    <comment_count>2</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2019-01-14 12:01:44 +0000</bug_when>
    <thetext>Confirmed, thanks</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>82794</commentid>
    <comment_count>3</comment_count>
    <who name="David Reyna">david.reyna</who>
    <bug_when>2019-01-14 23:50:02 +0000</bug_when>
    <thetext>commit 959cc8196aab2231b7f6f05c7e0151f8de46ea48

Set the schema generator to always update on startup.

To apply:

  $ ./stop.sh
  $ git pull
  $ ./start.sh</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>