[Cubicweb] Patches for 3.19.6

Christophe de Vienne christophe at unlish.com
Wed Nov 26 23:15:05 CET 2014


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi again,

I fixed 2 patches, leaving the PG-version related one for tomorrow:

- - http://www.cubicweb.org/patch/4452259 - fixed

- - http://www.cubicweb.org/patch/4601337 - made a NFS friendly version:
  the db_cache is now per handler class, and not handler instance.

- - http://www.cubicweb.org/patch/4451240 - will have a look tomorrow if
  I find some time.

Cheers,

Christophe

Le 26/11/2014 22:57, Christophe de Vienne a écrit :
> 
> 
> Le 26/11/2014 21:38, David Douard a écrit :
>> On 11/26/2014 07:22 PM, Christophe de Vienne wrote:
>>> Hi,
> 
>> Hi Christophe,
> 
>> I've been considering these patches for inclusion in 3.19.6, but
> 
>>> I see that cw 3.19.6 is almost ready in the repository.
>>> 
>>> Could the following patches be included ?
>>> 
>>> - http://www.cubicweb.org/patch/4451240
>> aka "[devtools][pg] Cleanup connections before dropping the db." 
>> make unittest_postgres fail here:
> 
>> ERROR:  column pg_stat_activity.pid does not exist at character
>> 29 STATEMENT:  SELECT pg_terminate_backend(pg_stat_activity.pid)
>> FROM pg_stat_activity WHERE pg_stat_activity.datname = 'tmpdb'
>> AND pg_stat_activity.pid <> pg_backend_pid();
> 
> 
> Ahem, PG version. sorry.
> 
> 
>>> - http://www.cubicweb.org/patch/4452259
> 
>> looks painless but being on the top of the former. However, I've 
>> grafted it and I get:
> 
>> ERROR: test_attr_weight (unittest_postgres.PostgresFTITC) 
>> ----------------------------------------------------------------------
>
>> 
> 
> Traceback (most recent call last)
>> File 
>> "/home/david/hg/grshells/grshell-jpl/logilab/common/testlib.py", 
>> line 515, in quiet_run func(*args, **kwargs) File 
>> "/home/david/hg/grshells/grshell-jpl/cubicweb/devtools/testlib.py",
>>
>> 
line 580, in setUp self._init_repo() File
>> "/home/david/hg/grshells/grshell-jpl/cubicweb/devtools/testlib.py",
>>
>> 
line 421, in _init_repo db_handler.build_db_cache(self.test_db_id,
>> self.pre_setup_database) File 
>> "/home/david/hg/grshells/grshell-jpl/cubicweb/devtools/__init__.py",
>>
>> 
line 502, in build_db_cache self.backup_database(test_db_id) File
>> "/home/david/hg/grshells/grshell-jpl/cubicweb/devtools/__init__.py",
>>
>> 
line 345, in backup_database backup_data =
>> self._backup_database(db_id) File 
>> "/home/david/hg/grshells/grshell-jpl/cubicweb/devtools/__init__.py",
>>
>> 
line 677, in _backup_database self._repo.turn_repo_off()
>> AttributeError: 'NoneType' object has no attribute
>> 'turn_repo_off'
> 
> My bad. I forgot to port back my monkey-patch. Pushing a new
> version tonight.
> 
> 
>>> - http://www.cubicweb.org/patch/4601337
> 
>> I wanted to have a closer look a this later patch, since it
>> looks to me quite a big hammer for the poor dev that do always
>> run tests (who said on NFS?)... In fact, I need a bit more of
>> context here, since I've never seen the error described in the
>> ticket.
> 
> Ok I understand.
> 
> There an alternate way to solve this issue, but it needs more
> work.
> 
> Basically, the db_cache_key needs to include the driver name
> (easy) and the population of _db_cache has to be done once for each
> handler class, and not only once like today (more of a pain).
> 
> That said it should be possible the have a _db_cache per handler 
> class, I have to try that: if it works it will be simple and
> efficient.
> 
> 
>> I was about to publish the 3.19.6, so for the 2 former patches,
>> if you can provide me new versions that do not kill my tests,
>> I'll integrate them...
> 
>> Cheers,
> 
>> David
> 
> 
> 
>>> Thanks,
>>> 
>>> Christophe _______________________________________________ 
>>> Cubicweb mailing list Cubicweb at lists.cubicweb.org 
>>> http://lists.cubicweb.org/mailman/listinfo/cubicweb
>>> 
> 
> 
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iQEcBAEBAgAGBQJUdlDpAAoJEFATnylB+5mRIhsIAInkdEzRrcu/dMYFtnl/CunU
lSq0Piiq7zYZM9G/Q3xonlvI9hv59lSAzpms52zh7pw5F5OFL0wfJqRCLdlxlrP3
TY//Jg7Q1Qh6oDvKjCDOzQ2IA9u75VzGIE6KUXVFgdbAIQBLdIWI3gZ8evIt7Z6H
+U/StqN5NnpIuEVdwbOXzwwBEvbWfRKwvLX/51Znxca8p1JCbHl+UREfW4WBZmTE
O5I64ocxg0vcPr9rrrjoCz5Az3A3lBfnHLaj3fxGJ4j0IFLYCZBVg3BzKEaUXSb1
82i1+zaRO+czlKRpnJ3sRh1QVvDzu8y90pC6HFHgZEdUlun9CHGt9vQAQxz6ASo=
=fH37
-----END PGP SIGNATURE-----



More information about the Cubicweb mailing list