show 23966 results
Revision (40)branchauthordescriptioncreation date
#f22be300dee1 [rql] Introduces the new security model for RQL statementsdefaultLaurent Wouters <lwouters@cenotelie.fr>[rql] Introduces the new security model for RQL statements This changes introduces the definition of a security model an its evaluation for RQL statements. This change enables the production of a security model that can be built and put in cache and then evaluated multiple time for differnt users with different arguments for the corresponding statement. In this new model, security checks are injected in rewritten RQL queries and the injected nodes can be selectively activated upon SQL generation depending on the current security evaluation for the current user.2018/04/20 18:17 UTC
#a6f0758c32df [rqlrewrite] Introduce scaffolding for annotable query argumentsdefaultLaurent Wouters <lwouters@cenotelie.fr>[rqlrewrite] Introduce scaffolding for annotable query arguments This change introduces the ability to annotate query arguments so that the type identification of an argument can be cached.2018/04/20 17:35 UTC
#8f7ab3004b8f [database/exception] include the query information in database error for better debugingdefaultLaurent Peuch <cortex@worlddomination.be>[database/exception] include the query information in database error for better debuging This will change an exception from something like : psycopg2.IntegrityError: null value in column "asource" violates not-null constraint DETAIL: Failing row contains (341471, CWRType, null, null). To: psycopg2.IntegrityError: when doing the query 'INSERT INTO entities ( eid, type ) VALUES ( %(eid)s, %(type)s )' with the args '{'type': u'CWRType', 'eid': 341471}' got the error 'null value in column "asource" violates not-null constraint DETAIL: Failing row contains (341471, CWRType, null, null).' Tested with sqlite3 and postgresql.2019/05/21 10:51 UTC
#0d5b9482f40d Better peformance for EmailAddress permissionsdefaultPhilippe Pepiot <philippe.pepiot@logilab.fr>Better peformance for EmailAddress permissions Following previous changeset, use EXISTS() in case of expression returning multiple rows. closes #2162019/05/10 15:39 UTC
#c71e5bbead3d Fix performance issue on RQLExpressions using EXISTS()defaultPhilippe Pepiot <philippe.pepiot@logilab.fr>Fix performance issue on RQLExpressions using EXISTS() This backout the changeset dfcc3f7 which introduced wrapping all {E,R}RQLExpression where clause with EXISTS(). It appear to have very bad performance on PostgreSQL on queries already using EXISTS(), in this case rql was generating a query with double EXISTS(), leading to a very bad query plan: =# create table t as select * from generate_series(1, 1000000) as id; SELECT 1000000 =# create unique index on t(id); CREATE INDEX For the RQLExpression "EXISTS(X identity X)" the generated sql was: Any X WHERE EXISTS(EXISTS(X identity X)), X eid %(eid)s, which is equivalent to: =# explain analyze select id from t where exists(select 1 where exists(select 1 from t as x where t.id = x.id) and t.id = 42); QUERY PLAN ----------------------------------------------------------------------------------------------------------------------------------------- Seq Scan on t (cost=0.00..8469425.00 rows=500000 width=4) (actual time=0.277..1426.342 rows=1 loops=1) Filter: (SubPlan 2) Rows Removed by Filter: 999999 SubPlan 2 -> Result (cost=8.45..8.46 rows=1 width=0) (actual time=0.001..0.001 rows=0 loops=1000000) One-Time Filter: ($1 AND (t.id = 42)) InitPlan 1 (returns $1) -> Index Only Scan using t_id_idx on t x (cost=0.42..8.44 rows=1 width=0) (actual time=0.001..0.001 rows=1 loops=1000000) Index Cond: (id = t.id) Heap Fetches: 1000000 Planning Time: 0.190 ms Execution Time: 1426.384 ms The planner wasn't able to optimise this (bad written) query, it produce a full table read (Seq Scan). With a single EXISTS, the query perform much better: Any X WHERE EXISTS(X identity X), X eid %(eid)s, which is equivalent to: =# explain analyze select id from t where exists(select 1 from t as x where t.id = x.id) and t.id = 42; QUERY PLAN ------------------------------------------------------------------------------------------------------------------------- Nested Loop Semi Join (cost=0.85..16.90 rows=1 width=4) (actual time=0.093..0.095 rows=1 loops=1) -> Index Only Scan using t_id_idx on t (cost=0.42..8.44 rows=1 width=4) (actual time=0.081..0.082 rows=1 loops=1) Index Cond: (id = 42) Heap Fetches: 1 -> Index Only Scan using t_id_idx on t x (cost=0.42..8.44 rows=1 width=4) (actual time=0.008..0.008 rows=1 loops=1) Index Cond: (id = 42) Heap Fetches: 1 Planning Time: 0.383 ms Execution Time: 0.136 ms An alternative patch would be to insert the EXISTS only if the original query doesn't already contains a EXISTS. But I think it's better to drop the magic here and let user control what they really want in their expressions. I added a note to the 3.27 changelog for this. Also add some tests to RQLExpressionTC with EXISTS().2021/01/27 17:16 UTC
#c1992b98a992 [views] Make JsonMixIn.wdata method usable with non-web connectionsdefaultDavid Douard <david.douard@logilab.fr>[views] Make JsonMixIn.wdata method usable with non-web connections2016/11/02 10:17 UTC
#3a70e0c51c64 [migration/fix] the asource column might still be prevent at this pointdefaultLaurent Peuch <cortex@worlddomination.be>[migration/fix] the asource column might still be prevent at this point When doing a migration from a very old project to the latest CW (3.26) this part of the migration failed because 'entities.asource' wasn't removed yet thus breaking this part of the migration. Removing it fix it but ... it might not be the prettiest fix.2019/05/09 18:58 UTC
#6007d9c0a933 [pyramid/misc] remove now useless warning about missing pyramid.inidefaultLaurent Peuch <cortex@worlddomination.be>[pyramid/misc] remove now useless warning about missing pyramid.ini2019/05/15 12:07 UTC
#3fc5a08db936 [WIP] try to wrap database error into a custom exceptiondefaultLaurent Peuch <cortex@worlddomination.be>[WIP] try to wrap database error into a custom exception2019/05/21 10:30 UTC
#c0d0c6474318 ci: force test3.27Noe Gaumont <ngaumont@logilab.fr>ci: force test2021/01/27 14:33 UTC
#c57f8c97dd4b ci: backport gitlab-ci3.27Noe Gaumont <ngaumont@logilab.fr>ci: backport gitlab-ci2021/01/27 14:25 UTC
#722d6ea4d885 tests: mark test_qunit js test and statsd test as potential failure3.27Laurent Peuch <cortex@worlddomination.be>tests: mark test_qunit js test and statsd test as potential failure Note: (nspanti) `hg graft -r a590ec1fd8ea`.2020/06/09 16:16 UTC
#8e59f9bef80c [database/exception] include the query information in database error for better debugingdefaultLaurent Peuch <cortex@worlddomination.be>[database/exception] include the query information in database error for better debuging This will change an exception from something like : psycopg2.IntegrityError: null value in column "asource" violates not-null constraint DETAIL: Failing row contains (341471, CWRType, null, null). To: psycopg2.IntegrityError: when doing the query 'INSERT INTO entities ( eid, type ) VALUES ( %(eid)s, %(type)s )' with the args '{'type': u'CWRType', 'eid': 341471}' got the error 'null value in column "asource" violates not-null constraint DETAIL: Failing row contains (341471, CWRType, null, null).' Tested with sqlite3 and postgresql.2019/05/21 10:51 UTC
#67de0c9a883a [utils] Add the possibility to add elements in the head of an UStringIO listdefaultGuillaume Vandevelde <gvandevelde@logilab.fr>[utils] Add the possibility to add elements in the head of an UStringIO list This allows to place scripts on the front of the html head tag if needed2020/02/07 17:53 UTC
#6f3f65423c3b [pyramid] add a simple pyramid configuration to create static views for assets from cubesdefaultDavid Douard <david.douard@logilab.fr>[pyramid] add a simple pyramid configuration to create static views for assets from cubes2018/08/02 17:55 UTC
#c5cb00dbdaa6 [testlib/fix] erronus combination of bytes and strdefaultLaurent Peuch <cortex@worlddomination.be>[testlib/fix] erronus combination of bytes and str2019/11/28 02:23 UTC
#ef0787d6b03b fix(py3): we still have some unicode() arrounddefaultLaurent Peuch <cortex@worlddomination.be>fix(py3): we still have some unicode() arround2021/01/27 15:38 UTC
#549dcb8ad7ec [misc] add function for deleting entities faster (not released)defaultPhilippe Pepiot <philippe.pepiot@logilab.fr>[misc] add function for deleting entities faster (not released) Delete entities faster using a minimal set of delete sql statements and without executing hooks. Benchmarks on some cases show that it's about 2x faster. This has not been exhaustively tested but to avoid loosing this work put it in cubicweb/misc/scripts (not installed by python package).2017/03/30 12:01 UTC
#8a161b520b25 refactor: remove useless folderdefaultDavid Douard <david.douard@logilab.fr>refactor: remove useless folder cubicweb-ctl is in the setup.py entrypoint2016/11/14 17:30 UTC
#0669e8661439 [rqlrewrite/schema] Avoid parsing computed relations for each query3.24Arthur Lutz <arthur.lutz@logilab.fr>[rqlrewrite/schema] Avoid parsing computed relations for each query The RQLRelationRewriter is instanciated for each RQL query, it should avoid parsing computed relations formula by using a cache, which seems rightly located on the instance's schema. This brings a *huge* performance boost to some pages on application with a few computed relations (x4 observed on a client app). Kudos to Adrien, David and Sylvain. Closes #170598282017/03/01 18:07 UTC
#7c7d58cc5c1f [cwctl] do only clean static data dir content (closes #17069762)3.24David Douard <david.douard@logilab.fr>[cwctl] do only clean static data dir content (closes #17069762) deleting the directory itself is useless and may be a problem in automated deployment environments (user may not have permissions to delete or create that directory).2017/04/04 11:41 UTC
#e3779004e987 [cwctl] upgrade: do delete the static data dir if verbosity is 0 (closes #17069749)3.24David Douard <david.douard@logilab.fr>[cwctl] upgrade: do delete the static data dir if verbosity is 0 (closes #17069749)2017/04/04 10:50 UTC
#bce3a2f4bc69 [PROTOTYPE] display all created/called view/form during a requestdefaultLaurent Peuch <cortex@worlddomination.be>[PROTOTYPE] display all created/called view/form during a request Closes #172197292019/07/24 16:11 UTC
#25611c5925a9 [debug_toolbar] add a uicfg content paneldefaultLaurent Peuch <cortex@worlddomination.be>[debug_toolbar] add a uicfg content panel2021/01/27 11:20 UTC
#d9292ce0698f [debug_toolbar] add a uicfg declarations paneldefaultLaurent Peuch <cortex@worlddomination.be>[debug_toolbar] add a uicfg declarations panel2021/01/27 11:20 UTC
#25b42cbd8c13 [debug/DBG_UICFG] add syntaxe highlightdefaultLaurent Peuch <cortex@worlddomination.be>[debug/DBG_UICFG] add syntaxe highlight2021/01/27 11:20 UTC
#6874f361aa1b [debug/dbglevel] add new dbglevel flag DBG_UICFGdefaultLaurent Peuch <cortex@worlddomination.be>[debug/dbglevel] add new dbglevel flag DBG_UICFG2021/01/27 11:20 UTC
#f316e4df5745 [debug] add mechanism to collect uicfg declarationsdefaultLaurent Peuch <cortex@worlddomination.be>[debug] add mechanism to collect uicfg declarations2021/01/27 11:20 UTC
#59ee6c2deee6 [WIP] [debug-toolbar] add a rendering panel to the debug toolbardefaultLaurent Peuch <cortex@worlddomination.be>[WIP] [debug-toolbar] add a rendering panel to the debug toolbar2019/09/01 04:00 UTC
#03b8919de73d [WIP] [massive store] allow stores not to drop constraintsdefaultAdrien Di Mascio <Adrien.DiMascio@logilab.fr>[WIP] [massive store] allow stores not to drop constraints Provide a PGHelper alternative class that doesn't drop constraints nor indexes TODO: drop=False won't actually work since we insert into cw_<etype> table before inserting in the ``entities`` table and therefore it will violate foreign key constraints2016/10/13 15:39 UTC
#760efef45de6 [server/migractions] simplify the Migration Handler entry pointdefaultAurelien Campeas <aurelien.campeas@logilab.fr>[server/migractions] simplify the Migration Handler entry point There is no need to entertain numerous ways to create a migration handler. We move .set_cnx to cwctl.admincnx, which given a repository, will return an admin cnx. Moreover, we use the repoapi.get_repository to get repositories. Related to #3933480.2014/07/09 14:26 UTC
#cea48cc49bb8 ci: force test3.27Noe Gaumont <ngaumont@logilab.fr>ci: force test2021/01/27 14:33 UTC
#b78885397de8 ci: backport gitlab-ci3.27Noe Gaumont <ngaumont@logilab.fr>ci: backport gitlab-ci2021/01/27 14:25 UTC
#008e08732ff1 [rql2sql/test] add test for wrong transformationdefaultJulien Cristau <julien.cristau@logilab.fr>[rql2sql/test] add test for wrong transformation Related to #101814702016/01/21 17:08 UTC
#d799daab4c9f WIP try to handle constraint violations involving more than one columndefaultJulien Cristau <julien.cristau@logilab.fr>WIP try to handle constraint violations involving more than one column Related to #106733482016/02/11 18:09 UTC
#91ccaecc3c75 [rql2sql/test] add test for wrong transformationdefaultJulien Cristau <julien.cristau@logilab.fr>[rql2sql/test] add test for wrong transformation Related to #101814702016/01/21 17:08 UTC
#0c12f4accf71 WIP try to handle constraint violations involving more than one columndefaultJulien Cristau <julien.cristau@logilab.fr>WIP try to handle constraint violations involving more than one column Related to #106733482016/02/11 18:09 UTC
#1ff4fd41b2a5 [debug] add DBG_TRANSACTIONS flag and hide transactions debug by defaultdefaultLaurent Peuch <cortex@worlddomination.be>[debug] add DBG_TRANSACTIONS flag and hide transactions debug by default CW debug output log is very verbose and most information is not always useful in all situation. This new flag is an attempt to make logs more useful by default while not preventing from adding this additional information when needed.2019/07/24 15:40 UTC
#a4d465a3e77d fix(ci): manually remove the .tox/doc directorydefaultSimon Chabot <simon.chabot@logilab.fr>fix(ci): manually remove the .tox/doc directory closes #2062021/01/27 08:31 UTC
#d0192478371c Silent yams warning (first rdef selection from an ambiguous rtype)defaultFlorent Cayré <florent.cayre@logilab.fr>Silent yams warning (first rdef selection from an ambiguous rtype)2016/01/05 12:28 UTC
show 23966 results