You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@bloodhound.apache.org by Apache Bloodhound <bl...@incubator.apache.org> on 2013/03/05 07:52:31 UTC

[Apache Bloodhound] #440: Implement ProductEnvironments as parametric singletons

#440: Implement ProductEnvironments as parametric singletons
--------------------------+---------------
  Reporter:  olemis       |    Owner:
      Type:  enhancement  |   Status:  new
  Priority:  major        |  Version:
Resolution:               |
--------------------------+---------------
 See bep:0003

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

Re: [Apache Bloodhound] #440: Implement ProductEnvironments as parametric singletons

Posted by Apache Bloodhound <bl...@incubator.apache.org>.
#440: Implement ProductEnvironments as parametric singletons
---------------------------+------------------------------------------
  Reporter:  olemis        |      Owner:  olemis
      Type:  enhancement   |     Status:  assigned
  Priority:  major         |  Milestone:  Release 6
 Component:  multiproduct  |    Version:
Resolution:                |   Keywords:  bep-0003 product environment
---------------------------+------------------------------------------

Comment (by olemis):

 Replying to [comment:5 jure]:
 > Replying to [comment:4 jure]:
 > > Replying to [comment:3 jure]:
 > > > After applying the patch there's a number of (additional) failures
 running the test suite:
 >
 > checked again, it's patch related, please review :)

 sure , sorry about that .
 :-/

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

Re: [Apache Bloodhound] #440: Implement ProductEnvironments as parametric singletons

Posted by Apache Bloodhound <bl...@incubator.apache.org>.
#440: Implement ProductEnvironments as parametric singletons
---------------------------+------------------------------------------
  Reporter:  olemis        |      Owner:  jure
      Type:  enhancement   |     Status:  review
  Priority:  major         |  Milestone:  Release 6
 Component:  multiproduct  |    Version:
Resolution:                |   Keywords:  bep-0003 product environment
---------------------------+------------------------------------------
Changes (by olemis):

 * owner:  olemis => jure
 * status:  accepted => review


Comment:

 [attachment:t440_1456016_product_env_singleton.diff Attached patch]
 implements product environments as parametric singletons . It ensures
 consistent cache semantics by extending `lru_cache` . Test cases included
 .

 {{{
 #!sh

 $ hg qapplied
 t440/t440_1456016_product_env_singleton.diff
 $ hg log -r qparent --template="[r{svnrev}] - {desc}\n"
 [r1456016] - Sync merge from trunk

 }}}

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

Re: [Apache Bloodhound] #440: Implement ProductEnvironments as parametric singletons

Posted by Apache Bloodhound <bl...@incubator.apache.org>.
#440: Implement ProductEnvironments as parametric singletons
---------------------------+------------------------------------------
  Reporter:  olemis        |      Owner:  olemis
      Type:  enhancement   |     Status:  assigned
  Priority:  major         |  Milestone:  Release 6
 Component:  multiproduct  |    Version:
Resolution:                |   Keywords:  bep-0003 product environment
---------------------------+------------------------------------------
Changes (by jure):

 * owner:  jure => olemis


Comment:

 Replying to [comment:4 jure]:
 > Replying to [comment:3 jure]:
 > > After applying the patch there's a number of (additional) failures
 running the test suite:

 checked again, it's patch related, please review :)

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

Re: [Apache Bloodhound] #440: Implement ProductEnvironments as parametric singletons

Posted by Apache Bloodhound <bl...@incubator.apache.org>.
#440: Implement ProductEnvironments as parametric singletons
---------------------------+------------------------------------------
  Reporter:  olemis        |      Owner:  olemis
      Type:  enhancement   |     Status:  accepted
  Priority:  major         |  Milestone:  Release 6
 Component:  multiproduct  |    Version:
Resolution:                |   Keywords:  bep-0003 product environment
---------------------------+------------------------------------------
Changes (by olemis):

 * status:  new => accepted
 * owner:   => olemis
 * component:   => multiproduct
 * keywords:   => bep-0003 product environment
 * milestone:   => Release 6


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

Re: [Apache Bloodhound] #440: Implement ProductEnvironments as parametric singletons

Posted by Apache Bloodhound <bl...@incubator.apache.org>.
#440: Implement ProductEnvironments as parametric singletons
---------------------------+------------------------------------------
  Reporter:  olemis        |      Owner:  olemis
      Type:  enhancement   |     Status:  assigned
  Priority:  major         |  Milestone:  Release 6
 Component:  multiproduct  |    Version:
Resolution:                |   Keywords:  bep-0003 product environment
---------------------------+------------------------------------------

Comment (by jure):

 t440_r1456016_py26_compat.diff applied in r1456802
 t440_1456016_product_env_singleton.diff applied in r1456865

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

Re: [Apache Bloodhound] #440: Implement ProductEnvironments as parametric singletons

Posted by Apache Bloodhound <bl...@incubator.apache.org>.
#440: Implement ProductEnvironments as parametric singletons
---------------------------+------------------------------------------
  Reporter:  olemis        |      Owner:  jure
      Type:  enhancement   |     Status:  assigned
  Priority:  major         |  Milestone:  Release 6
 Component:  multiproduct  |    Version:
Resolution:                |   Keywords:  bep-0003 product environment
---------------------------+------------------------------------------
Changes (by jure):

 * owner:  olemis => jure


Comment:

 Replying to [comment:3 jure]:
 > After applying the patch there's a number of (additional) failures
 running the test suite:
 >

 heh, turns out test suite is failing prior to this patch, /me
 investigating ...

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

Re: [Apache Bloodhound] #440: Implement ProductEnvironments as parametric singletons

Posted by Apache Bloodhound <bl...@incubator.apache.org>.
#440: Implement ProductEnvironments as parametric singletons
---------------------------+------------------------------------------
  Reporter:  olemis        |      Owner:  olemis
      Type:  enhancement   |     Status:  closed
  Priority:  major         |  Milestone:  Release 6
 Component:  multiproduct  |    Version:
Resolution:  fixed         |   Keywords:  bep-0003 product environment
---------------------------+------------------------------------------
Changes (by jure):

 * status:  assigned => closed
 * resolution:   => fixed


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

Re: [Apache Bloodhound] #440: Implement ProductEnvironments as parametric singletons

Posted by Apache Bloodhound <bl...@incubator.apache.org>.
#440: Implement ProductEnvironments as parametric singletons
---------------------------+------------------------------------------
  Reporter:  olemis        |      Owner:  olemis
      Type:  enhancement   |     Status:  assigned
  Priority:  major         |  Milestone:  Release 6
 Component:  multiproduct  |    Version:
Resolution:                |   Keywords:  bep-0003 product environment
---------------------------+------------------------------------------
Changes (by jure):

 * status:  review => assigned
 * owner:  jure => olemis


Comment:

 After applying the patch there's a number of (additional) failures running
 the test suite:

 {{{
 ======================================================================
 ERROR: test (tests.wiki.formatter.ProductWikiTestCase)
 Test global: links - report link shorthand form
 ----------------------------------------------------------------------
 Traceback (most recent call last):
   File
 "/path/to/bloodhound/bloodhound_multiproduct/tests/wiki/formatter.py",
 line 86, in setUp
     self._env = ProductEnvironment(self.global_env, prefix)
   File
 "/path/to/bloodhound/bloodhound_multiproduct/multiproduct/cache.py", line
 74, in wrapper
     del cache[key], refcount[key]
 KeyError: (<ProductEnvironment u'tp1' at 0x10e8a4f50>, 'tp2')

 ======================================================================
 ERROR: test (tests.wiki.formatter.ProductWikiTestCase)
 Test product: links - milestone: link resolver
 ----------------------------------------------------------------------
 Traceback (most recent call last):
   File
 "/path/to/bloodhound/bloodhound_multiproduct/tests/wiki/formatter.py",
 line 78, in setUp
     self._load_product_from_data(self.env, prefix)
   File "/path/to/bloodhound/bloodhound_multiproduct/tests/env.py", line
 219, in _load_product_from_data
     product.insert()
   File "/path/to/bloodhound/bloodhound_dashboard/bhdashboard/model.py",
 line 159, in insert
     sdata)
 TracError: Product prefix='tp2' already exists {'prefix': 'tp2', 'name':
 'test product 2', 'owner': None, 'description': 'desc for tp2'}

 ======================================================================
 ERROR: test (tests.wiki.formatter.ProductWikiTestCase)
 Test global: links - escaping the above
 ----------------------------------------------------------------------
 Traceback (most recent call last):
   File
 "/path/to/bloodhound/bloodhound_multiproduct/tests/wiki/formatter.py",
 line 69, in setUp
     formatter.WikiTestCase.setUp(self)
   File "/path/to/bloodhound/trac/trac/wiki/tests/formatter.py", line 169,
 in setUp
     wiki.save('joe', 'Entry page', '::1', datetime.now(utc))
   File "/path/to/bloodhound/trac/trac/wiki/model.py", line 144, in save
     self.readonly))
   File
 "/path/to/bloodhound/bloodhound_multiproduct/multiproduct/dbcursor.py",
 line 118, in execute
     return self.connection.execute(query, params=params)
   File "/path/to/bloodhound/trac/trac/db/util.py", line 121, in execute
     cursor.execute(query, params)
   File
 "/path/to/bloodhound/bloodhound_multiproduct/multiproduct/dbcursor.py",
 line 83, in execute
     return super(BloodhoundIterableCursor,
 self).execute(translate_sql(self.env, sql), args=args)
   File "/path/to/bloodhound/trac/trac/db/util.py", line 54, in execute
     r = self.cursor.execute(sql_escape_percent(sql), args)
   File "/path/to/bloodhound/trac/trac/db/sqlite_backend.py", line 78, in
 execute
     result = PyFormatCursor.execute(self, *args)
   File "/path/to/bloodhound/trac/trac/db/sqlite_backend.py", line 56, in
 execute
     args or [])
   File "/path/to/bloodhound/trac/trac/db/sqlite_backend.py", line 48, in
 _rollback_on_error
     return function(self, *args, **kwargs)
 IntegrityError: columns name, version, product are not unique

 }}}

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

Re: [Apache Bloodhound] #440: Implement ProductEnvironments as parametric singletons

Posted by Apache Bloodhound <bl...@incubator.apache.org>.
#440: Implement ProductEnvironments as parametric singletons
---------------------------+------------------------------------------
  Reporter:  olemis        |      Owner:  olemis
      Type:  enhancement   |     Status:  assigned
  Priority:  major         |  Milestone:  Release 6
 Component:  multiproduct  |    Version:
Resolution:                |   Keywords:  bep-0003 product environment
---------------------------+------------------------------------------

Comment (by olemis):

 Patch refreshed and submitted . See
 [http://code.activestate.com/recipes/498245-lru-and-lfu-cache-
 decorators/?c=15148#c9 this comment] . Added
 [attachment:t440_r1456016_py26_compat.diff another patch] for python<2.7
 compatibility . Please , at least as long as we support 2.6 , let's all
 test the code with that version .

 As a result

 {{{
 #!sh

 $ python setup.py test -m tests

 [...]

 ======================================================================
 FAIL: Test Another arbitrary protocol Link
 ----------------------------------------------------------------------
 Traceback (most recent call last):
   File
 "/media/b-500gb/projects/_hg/bloodhound_main/trac/trac/wiki/tests/formatter.py",
 line 209, in test
     % (msg, self.file, self.line, self.title, formatter.flavor))
 AssertionError: u'<p>\n<a class="ext-link"
 href="svn+ssh://secureserver.org"><span class="icon"> [truncated]... !=
 u'<p>\n<a class="ext-link" href="svn+ssh://secureserver.org"><span
 class="icon"> [truncated]...
   <p>
   <a class="ext-link" href="svn+ssh://secureserver.org"><span
 class="icon"></span>svn+ssh://secureserver.org</a>
   <a class="ext-link" href="svn+ssh://secureserver.org"><span
 class="icon"></span>SVN link</a>
 - <a class="ext-link" href="rfc-2396.compatible://link"><span
 class="icon"></span>rfc-2396.compatible://link</a>
 + <a class="missing product">rfc-2396</a>.compatible://link
   <a class="ext-link" href="rfc-2396.compatible://link"><span
 class="icon"></span>RFC 2396</a>
 - <a class="ext-link" href="rfc-2396+under_score://link"><span
 class="icon"></span>rfc-2396+under_score://link</a>
 + <a class="missing product">rfc-2396</a>+under_score://link
   <a class="ext-link" href="rfc-2396+under_score://link"><span
 class="icon"></span>underscore</a>
   unsafe://scheme is not rendered
   </p>


 /pah/to/bloodhound/trac/trac/wiki/tests/wiki-tests.txt:474: "Another
 arbitrary protocol Link" (default flavor)

 ----------------------------------------------------------------------

 ----------------------------------------------------------------------
 Ran 1122 tests in 521.232s

 FAILED (failures=1)

 }}}

 [comment:2 Patch order] updated accordingly .

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