cubicweb issueshttps://forge.extranet.logilab.fr/cubicweb/cubicweb/-/issues2023-03-28T14:58:54Zhttps://forge.extranet.logilab.fr/cubicweb/cubicweb/-/issues/204CW_BASE_URL ending on /cms leads to files in /data to not be found2023-03-28T14:58:54ZCarine DenglerCW_BASE_URL ending on /cms leads to files in /data to not be foundShort description:
CW_BASE_URL https://k8s-cms-base-url.francearchives.demo.logilab.fr/cms leads to files in /data to not be found while https://k8s-cms-base-url[k8s-cms-base-url.francearchives.demo.logilab.fr works fine
Version: 3.28
...Short description:
CW_BASE_URL https://k8s-cms-base-url.francearchives.demo.logilab.fr/cms leads to files in /data to not be found while https://k8s-cms-base-url[k8s-cms-base-url.francearchives.demo.logilab.fr works fine
Version: 3.28
Long description:
Changing CW_BASE_URL from https://k8s-cms-base-url.francearchives.demo.logilab.fr to https://k8s-cms-base-url.francearchives.demo.logilab.fr/cms leads to 404 errors on any files in /data, while the application itself works fine. This behavior has been observed in our Kubernetes deployment (its unclear whether our prod or preprod deployments are showing this behavior as well, since these files are served directly by nginx).
The following behavior is observed for a given URL
https://k8s-cms-base-url.francearchives.demo.logilab.fr/cms/data/846f3564704e5cf0325b6b3fea7a6866/css/bootstrap.min.css/ (how it is send by the application) -> not found error by application
https://k8s-cms-base-url.francearchives.demo.logilab.fr/cms/data/846f3564704e5cf0325b6b3fea7a6866/css/bootstrap.min.css (no slash) -> not found error by application
https://k8s-cms-base-url.francearchives.demo.logilab.fr/data/846f3564704e5cf0325b6b3fea7a6866/css/bootstrap.min.css/ (no /cms)
-> not found error by web server
https://k8s-cms-base-url.francearchives.demo.logilab.fr/data/846f3564704e5cf0325b6b3fea7a6866/css/bootstrap.min.css (no slash, no /cms) -> file found \o/
[Network logs](/uploads/66ec60aeb55f213e7bed8181df583e75/k8s-cms-base-url.francearchives.demo.logilab.fr_Archive__21-01-15_17-47-25_.har)
[CubicWeb logs](/uploads/854a1233107bcb3a9769fd37fd13d44d/cubicweb.log)
It's not urgent, since we will probably serve our /data files by nginx in this case as well, but I would be greatly interested in finding out what the problem is.https://forge.extranet.logilab.fr/cubicweb/cubicweb/-/issues/126[UX] Get better debugging information on a "psycopg2.errors.InsufficientPrivi...2023-03-28T14:56:43ZLaurent Peuch[UX] Get better debugging information on a "psycopg2.errors.InsufficientPrivilege: permission denied for table cw_cwproperty"One of our users (Carine) ended up having this wonderful useless error:
```
/usr/lib/python3/dist-packages/paste/request.py:33: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is depr...One of our users (Carine) ended up having this wonderful useless error:
```
/usr/lib/python3/dist-packages/paste/request.py:33: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated, and in 3.8 it will stop working
from collections import MutableMapping as DictMixin
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/logilab/common/decorators.py", line 94, in __call__
return _cache[args]
KeyError: (False,)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/bin/cubicweb-ctl", line 11, in <module>
load_entry_point('cubicweb==3.28.2', 'console_scripts', 'cubicweb-ctl')()
File "/usr/lib/python3/dist-packages/cubicweb/cwctl.py", line 830, in run
CWCTL.run(args)
File "/usr/lib/python3/dist-packages/logilab/common/clcommands.py", line 136, in run
sys.exit(command.main_run(args, rcfile))
File "/usr/lib/python3/dist-packages/logilab/common/clcommands.py", line 265, in main_run
self.run(args)
File "/usr/lib/python3/dist-packages/cubicweb/web/webctl.py", line 147, in run
self.generate_static_dir(config, dest)
File "/usr/lib/python3/dist-packages/cubicweb/web/webctl.py", line 88, in generate_static_dir
for datadir in self._datadirs(config, repo=repo):
File "/usr/lib/python3/dist-packages/cubicweb/web/webctl.py", line 110, in _datadirs
repo = config.repository()
File "/usr/lib/python3/dist-packages/cubicweb/cwconfig.py", line 981, in repository
repo.bootstrap()
File "/usr/lib/python3/dist-packages/cubicweb/server/repository.py", line 406, in bootstrap
config.init_cubes(self.get_cubes())
File "/usr/lib/python3/dist-packages/cubicweb/server/repository.py", line 672, in get_cubes
or self.config.mode == 'test'))
File "/usr/lib/python3/dist-packages/logilab/common/decorators.py", line 69, in wrapped
return self.__call__(*args, **kwargs)
File "/usr/lib/python3/dist-packages/logilab/common/decorators.py", line 96, in __call__
_cache[args] = __me.callable(self, *args)
File "/usr/lib/python3/dist-packages/cubicweb/server/repository.py", line 697, in get_versions
'P pkey ~="system.version.%"', build_descr=False):
File "/usr/lib/python3/dist-packages/cubicweb/server/session.py", line 153, in check_open
return func(cnx, *args, **kwargs)
File "/usr/lib/python3/dist-packages/cubicweb/server/session.py", line 666, in execute
rset = self._execute(self, rql, kwargs, build_descr)
File "/usr/lib/python3/dist-packages/cubicweb/statsd_logger.py", line 135, in __call__
return self.callable(*args, **kw)
File "/usr/lib/python3/dist-packages/cubicweb/server/querier.py", line 564, in execute
results = plan.execute()
File "/usr/lib/python3/dist-packages/cubicweb/server/querier.py", line 181, in execute
result = step.execute()
File "/usr/lib/python3/dist-packages/cubicweb/server/ssplanner.py", line 375, in execute
rql_query_tracing_token=self.rql_query_tracing_token)
File "/usr/lib/python3/dist-packages/cubicweb/server/sources/native.py", line 529, in syntax_tree_search
cursor = cnx.system_sql(sql, args, rql_query_tracing_token=rql_query_tracing_token)
File "/usr/lib/python3/dist-packages/cubicweb/server/session.py", line 153, in check_open
return func(cnx, *args, **kwargs)
File "/usr/lib/python3/dist-packages/cubicweb/server/session.py", line 795, in system_sql
rql_query_tracing_token=rql_query_tracing_token)
File "/usr/lib/python3/dist-packages/cubicweb/statsd_logger.py", line 135, in __call__
return self.callable(*args, **kw)
File "/usr/lib/python3/dist-packages/cubicweb/server/sources/native.py", line 706, in doexec
cursor.execute(str(query), args)
psycopg2.errors.InsufficientPrivilege: permission denied for table cw_cwproperty
bootstrapping instance
```
The problem turned out she had created a db with a superuser, gave GRANTs to the user of CW but postgresql still wasn't happy.
The real problem here is: this error suck and doesn't give any information on how to solve that at all, thus she lost quite some time and the people doing support to and as the general principle tells: if debugging is hard it's that you don't have the correct informations. Conclusion: we need to display those information.
A quick analysis suggest that we need to show:
* the user doing the connection and if it's a superuser
* the user owning the database and if it's a superuser
* all the GRANTs on this database of the connecting user
Step to proceed:
* find an easy way to reproduce this problem
* the current user is easy to get
* idk how to check if a user is a superuser
* find how to check who has created a database https://stackoverflow.com/questions/17165254/get-db-owners-name-in-postgresql
* same, is it a superuser?
* how to get all GRANTs?
* how to check that we have this specific exception
Exploration of solutions:
* https://stackoverflow.com/questions/17165254/get-db-owners-name-in-postgresql
* the tables pg_catalog and pg_catalog.pg_database seems very interesting
* `select rolcreatedb from pg_authid where rolname = 'your user name'` https://stackoverflow.com/questions/12956743/postgres-how-to-check-if-user-has-createdb-permissions
* `has_database_privilege(user, database, privilege)` also https://www.postgresql.org/docs/8.3/functions-info.html see https://stackoverflow.com/questions/12956743/postgres-how-to-check-if-user-has-createdb-permissionshttps://forge.extranet.logilab.fr/cubicweb/cubicweb/-/issues/368Construct images with newest debian stable2022-05-17T12:21:17ZCarine DenglerConstruct images with newest debian stableThe newest debian stable release is now bullseye.The newest debian stable release is now bullseye.https://forge.extranet.logilab.fr/cubicweb/cubicweb/-/issues/530fix py3-misc tests2022-04-26T12:08:49ZFrançois Ferryfix py3-misc testshttps://forge.extranet.logilab.fr/cubicweb/cubicweb/-/issues/515Markdown doesn't support tables2022-02-08T13:23:24ZOlivier CAYROLMarkdown doesn't support tablesWhen writing a textual content in Markdown, the tables are not converted in HTML for a proper rendering.
**How to replicate the bug?**
Create an entity with a RichString content, choose the Markdown format and type:
```text
Hello
Thi...When writing a textual content in Markdown, the tables are not converted in HTML for a proper rendering.
**How to replicate the bug?**
Create an entity with a RichString content, choose the Markdown format and type:
```text
Hello
This | is
---- | ------
a | table
```
**Potential solutions**
@schabot points that the conversion is implemented here:
https://forge.extranet.logilab.fr/cubicweb/cubicweb/-/blob/branch/default/cubicweb/ext/markdown.py#L20
and that we might want to enable the table extension:
https://python-markdown.github.io/extensions/tables/Simon ChabotSimon Chabothttps://forge.extranet.logilab.fr/cubicweb/cubicweb/-/issues/391cannot serialize to jsonld as of 3.31.4 ; rdflib_jsonld 0.6.2 is an empty shell2021-10-05T13:31:52ZSimon Chabotcannot serialize to jsonld as of 3.31.4 ; rdflib_jsonld 0.6.2 is an empty shellAs of 3.31.4 a dependency to rdflib-jsonld >= 0.6.2 has been set, waiting for rdflib >= 6.0.0 to be integrated into cubicweb. But this version of rdflib-jsonld is an empty shell, an provide nothing at all: cf https://github.com/RDFLib/rd...As of 3.31.4 a dependency to rdflib-jsonld >= 0.6.2 has been set, waiting for rdflib >= 6.0.0 to be integrated into cubicweb. But this version of rdflib-jsonld is an empty shell, an provide nothing at all: cf https://github.com/RDFLib/rdflib-jsonld/commit/02e447be4d62a14029181b34ecb354ac3c9e6697
We should fix rdflib-jsonld to a lower version waiting for rdflib >= 6.0.0 to be integrated, and re-do all the releases (on 3.31, 3.32, 3.33 and default…)https://forge.extranet.logilab.fr/cubicweb/cubicweb/-/issues/109requêtes avec TODAY donnent différent résultats s'ils sont exécutés sur une b...2021-07-08T11:27:53ZCarine Denglerrequêtes avec TODAY donnent différent résultats s'ils sont exécutés sur une base sqlite ou postgres**description**:
utiliser des comparaisons avec TODAY résulte en des résultats différents si c'est une base sqlite (comme p.ex. utilisé pour les tests unitaires) ou une base postgres
**comportement attendu**:
résultats sur base sqlit...**description**:
utiliser des comparaisons avec TODAY résulte en des résultats différents si c'est une base sqlite (comme p.ex. utilisé pour les tests unitaires) ou une base postgres
**comportement attendu**:
résultats sur base sqlite et base postgres devraient être les mêmes
**comportement réel**:
sur une base pour les tests unitaires sqlite
```
cnx.execute("Any D WHERE X is Email, X in_state S, S name 'published', X date >= (TODAY - 1), X da
te D")
<resultset "Any D WHERE X is Email, X in_state S, S name 'published', X date >= (TODAY - 1), X date D" (
4 rows):
[datetime.datetime(2020, 11, 19, 17, 9, 6, 283248)] (('Datetime',))
[datetime.datetime(2020, 11, 19, 17, 9, 6, 283248)] (('Datetime',))
[datetime.datetime(2020, 11, 16, 17, 9, 6, 283248)] (('Datetime',))
[datetime.datetime(2020, 11, 9, 17, 9, 6, 283248)] (('Datetime',))>
```
les deux derniers ne devraient pas se trouver dans les résultats
sur une base postgres
```
print(rql("Any D WHERE X is Email, X in_state S, S name 'published', X date >= (TODAY - 1), X da
...: te D").rows)
[[datetime.datetime(2020, 11, 18, 12, 28, 16)], [datetime.datetime(2020, 11, 18, 12, 28, 18)], [datetime.datetime(2020, 11, 18, 12, 28, 37)], [datetime.datetime(2020, 11, 18, 12, 28, 50)], [datetime.datetime(2020, 11, 18, 12, 28, 54)], [datetime.datetime(2020, 11, 18, 12, 29, 5)], [datetime.datetime(2020, 11, 18, 12, 29, 9)], [datetime.datetime(2020, 11, 18, 12, 28, 42)], [datetime.datetime(2020, 11, 19, 12, 35, 5)], [datetime.datetime(2020, 11, 19, 12, 35, 21)], [datetime.datetime(2020, 11, 19, 12, 35, 33)], [datetime.datetime(2020, 11, 19, 12, 35, 42)], [datetime.datetime(2020, 11, 19, 12, 36, 4)], [datetime.datetime(2020, 11, 19, 12, 36, 10)], [datetime.datetime(2020, 11, 19, 12, 36, 15)], [datetime.datetime(2020, 11, 19, 0, 0)], [datetime.datetime(2020, 11, 19, 0, 0)], [datetime.datetime(2020, 11, 19, 0, 0)]]
```v3.30Simon ChabotSimon Chabothttps://forge.extranet.logilab.fr/cubicweb/cubicweb/-/issues/206ci: the ci is broken, it fails to generate the documentation on pages2021-03-16T15:57:57ZSimon Chabotci: the ci is broken, it fails to generate the documentation on pages```bash
$ tox -e doc
doc create: /builds/cubicweb/cubicweb/.tox/doc
ERROR: cowardly refusing to delete `envdir` (it does not look like a virtualenv): /builds/cubicweb/cubicweb/.tox/doc
``````bash
$ tox -e doc
doc create: /builds/cubicweb/cubicweb/.tox/doc
ERROR: cowardly refusing to delete `envdir` (it does not look like a virtualenv): /builds/cubicweb/cubicweb/.tox/doc
```v3.30https://forge.extranet.logilab.fr/cubicweb/cubicweb/-/issues/110[cw3.28] Erreur sur la création d'une Card dans postcreate2021-02-16T13:54:52ZKatia Saurfelt[cw3.28] Erreur sur la création d'une Card dans postcreateLa création d'une Card dans postcreate provoque l'erreur suivante (le responsable
pourrait bien être cubicweb_card.hooks.CardAddedView) :
```
[hooks/notification] ERROR Notification failed logilab.common.registry.ObjectNotFound: recip...La création d'une Card dans postcreate provoque l'erreur suivante (le responsable
pourrait bien être cubicweb_card.hooks.CardAddedView) :
```
[hooks/notification] ERROR Notification failed logilab.common.registry.ObjectNotFound: recipients_finder
2020-11-06 10:49:01 - (cubicweb.session) ERROR: Notification failed
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/logilab/common/registry.py", line 273, in __getitem__
return super(Registry, self).__getitem__(name)
KeyError: 'recipients_finder'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/cubicweb/hooks/notification.py", line 72, in postcommit_event
view.render_and_send(**viewargs)
File "/usr/lib/python3/dist-packages/cubicweb/sobjects/notification.py", line 85, in render_and_send
for msg, recipients in self.render_emails(**kwargs):
File "/usr/lib/python3/dist-packages/cubicweb/sobjects/notification.py", line 94, in render_emails
recipients = self.recipients()
File "/usr/lib/python3/dist-packages/cubicweb/sobjects/notification.py", line 155, in recipients
row=self.cw_row or 0, col=self.cw_col or 0)
File "/usr/lib/python3/dist-packages/logilab/common/registry.py", line 379, in select
obj = self._select_best(self[__oid], *args, **kwargs)
File "/usr/lib/python3/dist-packages/logilab/common/registry.py", line 277, in __getitem__
raise exc
File "/usr/lib/python3/dist-packages/logilab/common/registry.py", line 273, in __getitem__
return super(Registry, self).__getitem__(name)
logilab.common.registry.ObjectNotFound: recipients_fin
```https://forge.extranet.logilab.fr/cubicweb/cubicweb/-/issues/191Include pyramid as direct deps in cubicweb by default2021-01-21T08:29:02ZNoé GaumontInclude pyramid as direct deps in cubicweb by defaultIn fresh virtual env, the de facto install commands is `pip install cubicweb[pyramid]`.
It might be a good idea to include pyramid by default.
Likely, it might a good idea to add `psycopg2-binary` in a new extra require `postgres`.In fresh virtual env, the de facto install commands is `pip install cubicweb[pyramid]`.
It might be a good idea to include pyramid by default.
Likely, it might a good idea to add `psycopg2-binary` in a new extra require `postgres`.https://forge.extranet.logilab.fr/cubicweb/cubicweb/-/issues/96used-versions dashboards gitlab pages are broken after project move2021-01-05T15:36:13ZLaurent Peuchused-versions dashboards gitlab pages are broken after project moveIt went like that:
- create the project in open-source by mistake during heptapod outrage
- added gitlab pages
- moved the project to cubicweb group
- pages doesn't work anymore and aren't correctly migrated
We've tried rerunning the p...It went like that:
- create the project in open-source by mistake during heptapod outrage
- added gitlab pages
- moved the project to cubicweb group
- pages doesn't work anymore and aren't correctly migrated
We've tried rerunning the pipeline and push new commit, that doesn't fix it.
We either need to ping sysadmins or try other things before likedashboards, logigraph and automated-upgrades pipelinehttps://forge.extranet.logilab.fr/cubicweb/cubicweb/-/issues/98re-organise the mr.html dashboard2020-12-16T22:43:09ZLaurent Peuchre-organise the mr.html dashboardFor now this dashboard, like the other ones, isn't activable, it just display the current state in an alphabetical order, therefor when you read if you need to parse it mentally to find useful information, we want to change that.
Here i...For now this dashboard, like the other ones, isn't activable, it just display the current state in an alphabetical order, therefor when you read if you need to parse it mentally to find useful information, we want to change that.
Here is a list of things that we can change and/or experiment with to see if that improves things:
- completely change the sort order by showing:
- To Publish
- unassigned MR
- oldest updated MR
- To Review
- ...dashboards, logigraph and automated-upgrades pipelineLaurent PeuchLaurent Peuchhttps://forge.extranet.logilab.fr/cubicweb/cubicweb/-/issues/108make used-version.html dashboard clearer2020-12-16T22:43:01ZLaurent Peuchmake used-version.html dashboard clearerIndicate:
- how py3 compatibility is detected
- python3 columns sucks
- indicate what colors means
- maybe remove yellow?
- explain the general dashboardIndicate:
- how py3 compatibility is detected
- python3 columns sucks
- indicate what colors means
- maybe remove yellow?
- explain the general dashboarddashboards, logigraph and automated-upgrades pipelineLaurent PeuchLaurent Peuchhttps://forge.extranet.logilab.fr/cubicweb/cubicweb/-/issues/121Backporter le fix py3-from-forge pour la 3.282020-12-16T21:27:39ZFabien Amargerfabien.amarger@logilab.frBackporter le fix py3-from-forge pour la 3.28v3.30Laurent PeuchLaurent Peuchhttps://forge.extranet.logilab.fr/cubicweb/cubicweb/-/issues/113markdown - convert links without [link](http...)2020-12-04T14:31:55ZArthur Lutzmarkdown - convert links without [link](http...)Most markdown viewers convert simple links to clicable links, not the one in cubicweb, it would be nice to have that.
We often copy/paste content from hackmd to cubicweb apps and when we publish the links aren't clicable which requires...Most markdown viewers convert simple links to clicable links, not the one in cubicweb, it would be nice to have that.
We often copy/paste content from hackmd to cubicweb apps and when we publish the links aren't clicable which requires the content to be modified.v3.29 - documentation focusLaurent PeuchLaurent Peuchhttps://forge.extranet.logilab.fr/cubicweb/cubicweb/-/issues/111release a 3.28.1 with reintroduced MatchIsETypePredicate and cubicweb.pyramid...2020-11-27T16:14:30ZLaurent Peuchrelease a 3.28.1 with reintroduced MatchIsETypePredicate and cubicweb.pyramid.cw_resourcesHello,
MatchIsETypePredicate and cubicweb.pyramid.cw_resources have been removed from CW (why?) but we have several cubes that still needs it. After discussion we have decided to release a 3.28.2 bringing them back.
Here are 2 changese...Hello,
MatchIsETypePredicate and cubicweb.pyramid.cw_resources have been removed from CW (why?) but we have several cubes that still needs it. After discussion we have decided to release a 3.28.2 bringing them back.
Here are 2 changesets on jsonschema showing how they are still needed:
- https://forge.extranet.logilab.fr/cubicweb/cubes/jsonschema/-/merge_requests/1/diffs?commit_id=5d016a68511fe1dc97c654bd3231f8bfee727c98
- https://forge.extranet.logilab.fr/cubicweb/cubes/jsonschema/-/merge_requests/1/diffs?commit_id=47fbf7c3f66f4f4d62ec5a61072d17f84ae0e934
@schabot I think you have discussed that with @ksaurfelt, right?
Katia would need ASAP, deadline would be next week (23-29 October)
Do we think we can do it?