De : Norbert Preining <norb...@preining.info>
À : Pierre-Elliott Bécue <p...@debian.org>
Cc : 1037...@bugs.debian.org
Date : 23 juin 2023 09:05:40
Objet : Re: Bug#1037358: mailman3-web: Upgrade from Debian 11 to Debian 12 
broke mailman/mailman3-web

> Hi PEB,
> 
>> 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.
> 
> Thanks!
> 
>>> - /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.
> 
> Yeah, but the repeated emails from cron with the warning are a bit painful.
> 
> 
>>> - 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.
> 
> Hmm, I guess it was this one
>     @hourly            www-data     [ -f /usr/bin/django-admin ] && flock -n 
> /var/run/mailman3-web/cron.hourly /usr/share/mailman3-web/manage.py runjobs 
> hourly
> 
> Do you have hyperkitty active?
> 
> I faintly remember (now some weeks have passed) that I had to do something
> to get the new table column added:
> 
>     no such column: hyperkitty_mailinglist.archive_rendering_mode
> 
> Maybe that was the source of the error, too? Not sure.
> Sorry for not remembering that now.
> 
> Best regards
> 
> Norbert
> 
> --
> PREINING Norbert                              https://www.preining.info
> Mercari Inc.     +     IFMGA Guide     +     TU Wien     +     TeX Live
> GPG: 0x860CDC13   fp: F7D8 A928 26E3 16A1 9FA0 ACF0 6CAC A448 860C DC13
Hello Norbert,

Ack for the cron ! It will be in a stable pu and it should have been fixed far 
earlier, sorry for that.

For the traceback, yes, I use HyperKitty, I'll do some tests just to make sure 
that I just did not miss it. The first idea that came to me was an unsucessful 
django migration during the upgrade but I think you'd have spotted it.

I'll try to reach out with more ideas soon.

Thanks again for your feedback!

-- 
Pierre-Elliott Bécue

Reply via email to