Project

General

Profile

Actions

Task #7534

open

Update underlying Debian systems from Buster to Bookworm

Added by Jan Mach over 2 years ago. Updated about 1 month ago.

Status:
In Progress
Priority:
Normal
Category:
Development - Tools
Target version:
Start date:
10/28/2021
Due date:
% Done:

20%

Estimated time:
To be discussed:

Description

  1. Update Vagrant development box
  2. Update mentat-alt first and let it running to verify everything is in working order.
  3. Update mentat-hub

Related issues

Related to Mentat - Task #7662: Update system dependeciesIn ProgressRajmund Hruška07/03/2023

Actions
Actions #1

Updated by Jan Mach over 2 years ago

Currently there is no debian/contrib-bullseye64 box, so we should probbly wait a little more (https://app.vagrantup.com/debian/boxes/contrib-bullseye64). Contrib box contains built in drivers for shared folders, whis simplifies provisioning. Because the box is not yet available I conclude the drivers are not yet production ready, so we should not rush it.

Actions #2

Updated by Pavel Kácha over 2 years ago

  • To be discussed deleted (Yes)
Actions #3

Updated by Pavel Kácha over 2 years ago

  • Target version changed from 2.9 to 2.10
Actions #4

Updated by Pavel Kácha about 2 years ago

  • Target version changed from 2.10 to 2.11
Actions #5

Updated by Rajmund Hruška about 1 year ago

Jan Mach wrote in #note-1:

Currently there is no debian/contrib-bullseye64 box, so we should probbly wait a little more (https://app.vagrantup.com/debian/boxes/contrib-bullseye64). Contrib box contains built in drivers for shared folders, whis simplifies provisioning. Because the box is not yet available I conclude the drivers are not yet production ready, so we should not rush it.

bullseye was released about 2 years ago and there is still no contrib box available. We should try to make Vagrant work with bullseye anyway, so we can test it.

Also, we have a new server for mentat-hub, and so the system can be bullseye from the beginning.

Actions #6

Updated by Rajmund Hruška about 1 year ago

  • Target version changed from 2.11 to Future
Actions #7

Updated by Rajmund Hruška 12 months ago

  • Subject changed from Update underlying Debian systems from Buster to Bullseye to Update underlying Debian systems from Buster to Bookworm
Actions #8

Updated by Rajmund Hruška 12 months ago

  • Assignee deleted (Jan Mach)
Actions #9

Updated by Rajmund Hruška 6 months ago

  • Category set to Development - Tools
  • Status changed from New to In Progress
  • Assignee set to Rajmund Hruška
  • Target version changed from Future to 2.12

Rajmund Hruska wrote in #note-5:

Jan Mach wrote in #note-1:

Currently there is no debian/contrib-bullseye64 box, so we should probbly wait a little more (https://app.vagrantup.com/debian/boxes/contrib-bullseye64). Contrib box contains built in drivers for shared folders, whis simplifies provisioning. Because the box is not yet available I conclude the drivers are not yet production ready, so we should not rush it.

bullseye was released about 2 years ago and there is still no contrib box available. We should try to make Vagrant work with bullseye anyway, so we can test it.

Also, we have a new server for mentat-hub, and so the system can be bullseye from the beginning.

On mentat-new we already have Debian 12 (bookworm), but we still currently use Debian 10 in Vagrant and GitLab CI/CD. I tried building the virtual machine using default debian bookworm box (https://app.vagrantup.com/debian/boxes/bookworm64) and it seems to be working more or less fine.

But there is a new warning when executing tests and one of the tests fails.

/var/mentat/venv/lib/python3.11/site-packages/jinja2/environment.py:475: SAWarning: Object of type <EventReportModel> not in session, add operation along 'GroupModel.reports' won't proceed (This warning originated from the Session 'autoflush' process, which was invoked automatically in response to a user-initiated operation.)
  return getattr(obj, attr)

FAIL: test_03_filter_events (mentat.reports.test_event.TestMentatReportsEvent.test_03_filter_events)
Test :py:class:`mentat.reports.event.EventReporter.filter_events` function.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/vagrant/lib/mentat/reports/test_event.py", line 315, in test_03_filter_events
    self.reporter.logger.assert_has_calls([
  File "/usr/lib/python3.11/unittest/mock.py", line 970, in assert_has_calls
    raise AssertionError(
AssertionError: Calls not found.
Expected: [call.debug("Event matched filtering rule '%s' of group %s.", 'FLT1', 'abuse@cesnet.cz'),
 call.debug("Discarding event with ID '%s' from reports.", 'msg01'),
 call.debug('Event matched filtering rules, all sources filtered'),
 call.debug("Event matched filtering rule '%s' of group %s.", 'FLT3', 'abuse@cesnet.cz'),
 call.debug("Discarding event with ID '%s' from reports.", 'msg02'),
 call.debug("Event matched filtering rule '%s' of group %s.", 'FLT2', 'abuse@cesnet.cz'),
 call.debug("Discarding event with ID '%s' from reports.", 'msg02')]
Actual: [call.debug("Event matched filtering rule '%s' of group %s.", 'FLT1', 'abuse@cesnet.cz'),
 call.debug("Discarding event with ID '%s' from reports.", 'msg01'),
 call.debug('Event matched filtering rules, all sources filtered'),
 call.debug("Event matched filtering rule '%s' of group %s.", 'FLT2', 'abuse@cesnet.cz'),
 call.debug("Discarding event with ID '%s' from reports.", 'msg02'),
 call.debug("Event matched filtering rule '%s' of group %s.", 'FLT3', 'abuse@cesnet.cz'),
 call.debug("Discarding event with ID '%s' from reports.", 'msg02')]
Actions #10

Updated by Rajmund Hruška 6 months ago

The SAWarning is related to test_07_render_report_extra of lib/mentat/reports/test_events.py. I solved this by adding the mock report generated by _generate_mock_report to the session. But I don't know why this warning didn't show up in test_06_render_report_summary which also uses the mock report.

The test failed because of a different order of the calls. It seems the filtering rules are in a different order. I couldn't quickly find where exactly it was changed in the upgraded packages, but I think it's not a problem. The reports are working just fine, both summary and extra.

Actions #11

Updated by Rajmund Hruška 6 months ago

  • % Done changed from 0 to 20

The updated Vagrantbox is available in branch hruska-task-#7534-bookworm. Jakub Maloštik, could you please try it out?

Actions #12

Updated by Rajmund Hruška 6 months ago

Also new warnings from pylint:

************* Module hawat.forms
lib/hawat/forms.py:422:19: W1406: The u prefix for strings is no longer necessary in Python >=3.0 (redundant-u-string-prefix)
lib/hawat/forms.py:423:15: W1406: The u prefix for strings is no longer necessary in Python >=3.0 (redundant-u-string-prefix)

Actions #13

Updated by Pavel Kácha 5 months ago

  • Target version changed from 2.12 to 2.13
Actions #14

Updated by Jakub Judiny 5 months ago

  • Related to Task #7662: Update system dependecies added
Actions #15

Updated by Jakub Judiny 3 months ago

Another thing that will have to be dealt with is that pynspect files traversers.py and jpath.py use collections.MutableSequence and collections.Mapping, but these two classes were moved to collections.abc in Python 3.10.

Actions #16

Updated by Rajmund Hruška about 1 month ago

  • Target version changed from 2.13 to 2.13.1
Actions

Also available in: Atom PDF