incubator-bloodhound-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Apache Bloodhound" <bloodhound-...@incubator.apache.org>
Subject Re: [Apache Bloodhound] #115: Product-specific settings
Date Mon, 14 Jan 2013 07:16:05 GMT
#115: Product-specific settings
-------------------------+-------------------------------------------------
  Reporter:  olemis      |      Owner:  gjm
      Type:              |     Status:  review
  enhancement            |  Milestone:
  Priority:  major       |    Version:
 Component:              |   Keywords:  multiproduct environment
  multiproduct           |  configuration database bep-0003 db-upgrade
Resolution:              |  model
-------------------------+-------------------------------------------------

Comment (by olemis):

 [attachment:t115_r1431447_product_envs_bep3_p1.diff Attached patch]
 implements a number of enhancements aimed at complying with bep:0003
 specification . This includes :

   - Type checking in product env initializer
   - Test cases for product env attributes copied from Environment
   - Product environments forward attribute access request to parent
 environment
   - sqlparse as dependency in setup.py
   - unittest2 as dependency  in setup.py , needed to run the test suite
   - compatibility with setuptools 'test' command
   - ProductEnvironment attributes : __getattr__ added , env => parent

 ... and then ...

 {{{
 #!sh

 $ /srv/venv/python/trac/0.13/bin/python setup.py test -m tests.env
 running test
 running egg_info
 writing BloodhoundMultiProduct.egg-info/PKG-INFO
 writing top-level names to BloodhoundMultiProduct.egg-info/top_level.txt
 writing dependency_links to BloodhoundMultiProduct.egg-
 info/dependency_links.txt
 writing entry points to BloodhoundMultiProduct.egg-info/entry_points.txt
 writing BloodhoundMultiProduct.egg-info/PKG-INFO
 writing top-level names to BloodhoundMultiProduct.egg-info/top_level.txt
 writing dependency_links to BloodhoundMultiProduct.egg-
 info/dependency_links.txt
 writing entry points to BloodhoundMultiProduct.egg-info/entry_points.txt
 reading manifest file 'BloodhoundMultiProduct.egg-info/SOURCES.txt'
 writing manifest file 'BloodhoundMultiProduct.egg-info/SOURCES.txt'
 running build_ext
 Testing env.get_known_users ... ERROR
 Testing env.get_version ... ok
 test_attr_forward_parent (tests.env.ProductEnvApiTestCase) ... ok
 test_typecheck (tests.env.ProductEnvApiTestCase) ... ok

 ======================================================================
 ERROR: Testing env.get_known_users
 ----------------------------------------------------------------------
 Traceback (most recent call last):
   File "/path/to/bloodhound/trac/trac/tests/env.py", line 30, in
 test_get_known_users
     with self.env.db_transaction as db:
   File "/path/to/bloodhound/bloodhound_multiproduct/multiproduct/env.py",
 line 343, in db_transaction
     raise NotImplementedError
 NotImplementedError

 ----------------------------------------------------------------------
 Ran 4 tests in 7.218s

 FAILED (errors=1)
 }}}

 I also spent some time to build [https://bitbucket.org/olemis/bloodhound-
 mq/src/t115_bep3_product_env/t115/t115_r1431447_product_envs_bep3_p1.diff?at=t115_bep3_product_env
 another patch] rebasing product environments solution against
 `bep_0003_,multiproduct` branch .

 {{{
 #!sh

 $ python setup.py test -m tests.env
 running test
 running egg_info
 writing BloodhoundMultiProduct.egg-info/PKG-INFO
 writing top-level names to BloodhoundMultiProduct.egg-info/top_level.txt
 writing dependency_links to BloodhoundMultiProduct.egg-
 info/dependency_links.txt
 writing entry points to BloodhoundMultiProduct.egg-info/entry_points.txt
 writing BloodhoundMultiProduct.egg-info/PKG-INFO
 writing top-level names to BloodhoundMultiProduct.egg-info/top_level.txt
 writing dependency_links to BloodhoundMultiProduct.egg-
 info/dependency_links.txt
 writing entry points to BloodhoundMultiProduct.egg-info/entry_points.txt
 reading manifest file 'BloodhoundMultiProduct.egg-info/SOURCES.txt'
 writing manifest file 'BloodhoundMultiProduct.egg-info/SOURCES.txt'
 running build_ext
 Testing env.get_known_users ... ERROR
 Testing env.get_version ... ERROR
 test_attr_forward_parent (tests.env.ProductEnvApiTestCase) ... ok
 test_typecheck (tests.env.ProductEnvApiTestCase) ... ERROR

 ======================================================================
 ERROR: Testing env.get_known_users
 ----------------------------------------------------------------------
 Traceback (most recent call last):
   File "/path/to/bloodhound/bloodhound_multiproduct/tests/env.py", line
 133, in setUp
     self._load_product_from_data(self.global_env, self.default_product)
   File "/path/to/bloodhound/bloodhound_multiproduct/tests/env.py", line
 99, in _load_product_from_data
     product.insert()
   File
 "/path/to/bloodhound/bloodhound_multiproduct/multiproduct/model.py", line
 98, in insert
     ','.join(['%s'] * len(cols))), vals)
   File "/path/to/bloodhound/trac/trac/db/util.py", line 139, in
 executemany
     cursor.executemany(query, params)
   File "/path/to/bloodhound/trac/trac/db/util.py", line 85, in executemany
     return self.cursor.executemany(sql_escape_percent(sql), args)
   File "/path/to/bloodhound/trac/trac/db/sqlite_backend.py", line 62, in
 executemany
     args)
   File "/path/to/bloodhound/trac/trac/db/sqlite_backend.py", line 48, in
 _rollback_on_error
     return function(self, *args, **kwargs)
 IntegrityError: column name is not unique

 ======================================================================
 ERROR: Testing env.get_version
 ----------------------------------------------------------------------
 Traceback (most recent call last):
   File "/path/to/bloodhound/bloodhound_multiproduct/tests/env.py", line
 133, in setUp
     self._load_product_from_data(self.global_env, self.default_product)
   File "/path/to/bloodhound/bloodhound_multiproduct/tests/env.py", line
 99, in _load_product_from_data
     product.insert()
   File
 "/path/to/bloodhound/bloodhound_multiproduct/multiproduct/model.py", line
 98, in insert
     ','.join(['%s'] * len(cols))), vals)
   File "/path/to/bloodhound/trac/trac/db/util.py", line 139, in
 executemany
     cursor.executemany(query, params)
   File "/path/to/bloodhound/trac/trac/db/util.py", line 85, in executemany
     return self.cursor.executemany(sql_escape_percent(sql), args)
   File "/path/to/bloodhound/trac/trac/db/sqlite_backend.py", line 62, in
 executemany
     args)
   File "/path/to/bloodhound/trac/trac/db/sqlite_backend.py", line 48, in
 _rollback_on_error
     return function(self, *args, **kwargs)
 IntegrityError: column name is not unique

 ======================================================================
 ERROR: test_typecheck (tests.env.ProductEnvApiTestCase)
 ----------------------------------------------------------------------
 Traceback (most recent call last):
   File "/path/to/bloodhound/bloodhound_multiproduct/tests/env.py", line
 221, in test_typecheck
     self._load_product_from_data(self.env, 'tp2')
   File "/path/to/bloodhound/bloodhound_multiproduct/tests/env.py", line
 99, in _load_product_from_data
     product.insert()
   File
 "/path/to/bloodhound/bloodhound_multiproduct/multiproduct/model.py", line
 98, in insert
     ','.join(['%s'] * len(cols))), vals)
   File "/path/to/bloodhound/trac/trac/db/util.py", line 139, in
 executemany
     cursor.executemany(query, params)
   File "/path/to/bloodhound/trac/trac/db/util.py", line 77, in executemany
     args)
   File "/path/to/bloodhound/trac/trac/db/sqlite_backend.py", line 62, in
 executemany
     args)
   File "/path/to/bloodhound/trac/trac/db/sqlite_backend.py", line 48, in
 _rollback_on_error
     return function(self, *args, **kwargs)
 IntegrityError: column name is not unique

 ----------------------------------------------------------------------
 Ran 4 tests in 7.610s

 FAILED (errors=3)

 }}}

 ... so even if solution works it is not quite ready to be committed in
 that branch .

-- 
Ticket URL: <https://issues.apache.org/bloodhound/ticket/115#comment:7>
Apache Bloodhound <https://issues.apache.org/bloodhound/>
The Apache Bloodhound (incubating) issue tracker

Mime
View raw message