[Pkg-mailman-hackers] Bug#1037358: mailman3-web: Upgrade from Debian 11 to Debian 12 broke mailman/mailman3-web

Pierre-Elliott Bécue peb at debian.org
Thu Jun 22 23:26:03 BST 2023


Hey Norbert,

Thanks for the feedback!

Norbert Preining <norbert at preining.info> wrote on 12/06/2023 at 06:32:02+0200:

> Package: mailman3-web
> Version: 0+20200530-2.1
> Severity: important
>
> Dear Maintainer,
>
> With the upgrade from Debian 11 to Debian 12 a lot of problems popped up
> around mailman/web:
>
> - /etc/mailman/mailman-web.py needs updates:
>
> # Updates require this, should already be in Debian's package, but isn't
> # See https://gitlab.com/mailman/hyperkitty/-/issues/401
> DEFAULT_AUTO_FIELD = 'django.db.models.AutoField'
> # /usr/lib/python3/dist-packages/django_q/conf.py contains
> # conf.py:    TIMEOUT = conf.get("timeout", None)
> # conf.py:    RETRY = conf.get("retry", 60)
> # which is broken
> Q_CLUSTER = {
>     'timeout': 300,
>     'save_limit': 100,
>     'orm': 'default',
>     'retry': 360,
> }
>
> since these values are not taken into the Debian packages, although they
> are necessary

Indeed, when I fixed the 3.10 testing issues, I failed to have the
config for mailman3-web fixed.

I'll add these and send a stable-pu.

> - /etc/cron.d/mailman3 contains a call to gatenews which triggers errors
>   and probalby should not be called in the cron script

Right, it still is in my todolist, which is a shame as it's trivial to
fix. I guess the reason I never dropped it is that it's harmless as the
script refuses to run.

> - even with the above changes, the hourly run job fails (that is actually
>   a serious bug!)
>
> /usr/lib/python3/dist-packages/whoosh/codec/whoosh3.py:1116: SyntaxWarning: "is" with a literal. Did you mean "=="?
>   elif fixedsize is 0:
> [ERROR/MainProcess] Failed indexing 1 - 1 (retry 5/5): no such column: hyperkitty_mailinglist.archive_rendering_mode (pid 4974): no such column:
> hyperkitty_mailinglist.archive_rendering_mode
> Traceback (most recent call last):
>   File "/usr/lib/python3/dist-packages/django/db/models/fields/related_descriptors.py", line 173, in __get__
>     rel_obj = self.field.get_cached_value(instance)
>               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>   File "/usr/lib/python3/dist-packages/django/db/models/fields/mixins.py", line 15, in get_cached_value
>     return instance._state.fields_cache[cache_name]
>            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^
> KeyError: 'mailinglist'
>
> During handling of the above exception, another exception occurred:
>
> Traceback (most recent call last):
>   File "/usr/lib/python3/dist-packages/django/db/backends/utils.py", line 84, in _execute
>     return self.cursor.execute(sql, params)
>            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>   File "/usr/lib/python3/dist-packages/django/db/backends/sqlite3/base.py", line 423, in execute
>     return Database.Cursor.execute(self, query, params)
>            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> sqlite3.OperationalError: no such column: hyperkitty_mailinglist.archive_rendering_mode
>
> The above exception was the direct cause of the following exception:
>
> Traceback (most recent call last):
>   File "/usr/lib/python3/dist-packages/haystack/management/commands/update_index.py", line 119, in do_update
>     backend.update(index, current_qs, commit=commit)
>   File "/usr/lib/python3/dist-packages/haystack/backends/whoosh_backend.py", line 258, in update
>     doc = index.full_prepare(obj)
>           ^^^^^^^^^^^^^^^^^^^^^^^
>   File "/usr/lib/python3/dist-packages/haystack/indexes.py", line 235, in full_prepare
>     self.prepared_data = self.prepare(obj)
>                          ^^^^^^^^^^^^^^^^^
>   File "/usr/lib/python3/dist-packages/haystack/indexes.py", line 226, in prepare
>     self.prepared_data[field.index_fieldname] = field.prepare(obj)
>                                                 ^^^^^^^^^^^^^^^^^^
>   File "/usr/lib/python3/dist-packages/haystack/fields.py", line 236, in prepare
>     return self.convert(super().prepare(obj))
>                         ^^^^^^^^^^^^^^^^^^^^
>   File "/usr/lib/python3/dist-packages/haystack/fields.py", line 105, in prepare
>     values = self.resolve_attributes_lookup(current_objects, attrs)
>              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>   File "/usr/lib/python3/dist-packages/haystack/fields.py", line 125, in resolve_attributes_lookup
>     if not hasattr(current_object, attributes[0]):
>            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>   File "/usr/lib/python3/dist-packages/django/db/models/fields/related_descriptors.py", line 187, in __get__
>     rel_obj = self.get_object(instance)
>               ^^^^^^^^^^^^^^^^^^^^^^^^^
>   File "/usr/lib/python3/dist-packages/django/db/models/fields/related_descriptors.py", line 154, in get_object
>     return qs.get(self.field.get_reverse_related_filter(instance))
>            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>   File "/usr/lib/python3/dist-packages/django/db/models/query.py", line 431, in get
>     num = len(clone)
>           ^^^^^^^^^^
>   File "/usr/lib/python3/dist-packages/django/db/models/query.py", line 262, in __len__
>     self._fetch_all()
>   File "/usr/lib/python3/dist-packages/django/db/models/query.py", line 1324, in _fetch_all
>     self._result_cache = list(self._iterable_class(self))
>                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>   File "/usr/lib/python3/dist-packages/django/db/models/query.py", line 51, in __iter__
>     results = compiler.execute_sql(chunked_fetch=self.chunked_fetch, chunk_size=self.chunk_size)
>               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>   File "/usr/lib/python3/dist-packages/django/db/models/sql/compiler.py", line 1175, in execute_sql
>     cursor.execute(sql, params)
>   File "/usr/lib/python3/dist-packages/django/db/backends/utils.py", line 66, in execute
>     return self._execute_with_wrappers(sql, params, many=False, executor=self._execute)
>            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>   File "/usr/lib/python3/dist-packages/django/db/backends/utils.py", line 75, in _execute_with_wrappers
>     return executor(sql, params, many, context)
>            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>   File "/usr/lib/python3/dist-packages/django/db/backends/utils.py", line 79, in _execute
>     with self.db.wrap_database_errors:
>   File "/usr/lib/python3/dist-packages/django/db/utils.py", line 90, in __exit__
>     raise dj_exc_value.with_traceback(traceback) from exc_value
>   File "/usr/lib/python3/dist-packages/django/db/backends/utils.py", line 84, in _execute
>     return self.cursor.execute(sql, params)
>            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>   File "/usr/lib/python3/dist-packages/django/db/backends/sqlite3/base.py", line 423, in execute
>     return Database.Cursor.execute(self, query, params)
>            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> django.db.utils.OperationalError: no such column: hyperkitty_mailinglist.archive_rendering_mode

Erm, this one is weird, I did not meet it. What cron are you referring
to?

The hourly tasks cron for mailman3 web runs smoothly here.

Cheers,
-- 
PEB
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 853 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/pkg-mailman-hackers/attachments/20230623/dc6f2720/attachment.sig>


More information about the Pkg-mailman-hackers mailing list