[Cubicweb] Patches for 3.19.6

Christophe de Vienne christophe at unlish.com
Wed Nov 26 22:57:28 CET 2014


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



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

iQEcBAEBAgAGBQJUdkzIAAoJEFATnylB+5mRn5gH/A8NtLGax51Tf+iamjaLEl5T
2qUOq/k0DJi32ko+2Kb6a0wYIAh+N4uXjqOXUDhZrvdvnB8p2r5Bv4pbtwFV7jQw
x4isD8uFwY2p5QFR8GtRHSSYJHEzwSVZoZKma83ZWJNSG7mFZW02Xvxe2jAf7be0
GdiZWgIhD20IzlT4Rfa/jfeDQIVU5+9cojC09zu85Nipanri4b8Ev9ygjJmDxcpi
aXfzQQUfgD++rTk+4Cw0PpA3Qfs9mbdd1PmQ3JxRSdcVHqI9wvYU5mbMPfXSiXI2
Jo7KRLKoXNHvjHpqiyGOZYnKKZNuuOzyo0UUSWUHdAnIcWiqITe6o3++fa/wTCM=
=DmoY
-----END PGP SIGNATURE-----



More information about the Cubicweb mailing list