subiquity:test-snap

Last commit made on 2024-03-22
Get this branch:
git clone -b test-snap https://git.launchpad.net/subiquity

Branch merges

Branch information

Name:
test-snap
Repository:
lp:subiquity

Recent commits

4150e56... by Chris Peterson

autoinstall: enforce top-level keys

Subiquity currently ignores invalid top-level keys, but this has likely
been a major source of confusion of autoinstall capabilities.

In future versions, the following autoinstall config will throw an
AutoinstallValidationError:

    version: 2
    interactive-sections:
        - identity
    literally-anything: lmao

This patch adds warnings for version 1 and will begin to throw
an AutoinstallValidationError on these instances in version 2 once
it has been enabled.

3eb7059... by Chris Peterson

progress: show log-like reporting events

Allows for warning and error type events to be printed to the progress
view.

ed8971f... by Chris Peterson

server: Create an interface for server event listeners

0eb05d3... by Chris Peterson

client: support log-like events in non-interactive installs

This changes the journal listener callback in the non-interactive
scenario to support all types of events, not just start and finish
events.

This also modifies the journal listener in the non-interactive scenario
to not seek all the way to the newest entry. In non-interactive installs,
the server can get pretty far into the installation by the time the client
can connect, so any important warnings/errors that the server reports
before then wouldn't be printed to the console by the client otherwise.

980411a... by Chris Peterson

reporting: add new logging type events

Adds new reporting type events "INFO", "WARNING", and "ERROR" to be
used for context logging. These can be invoked with the new `.info`,
`.warning`, and `.error` methods on the context object accordingly.
Useful for things like warning/errors on autoinstall configuartions.

c25e28e... by Chris Peterson

server: refactor _maybe_push_to_journal

e0f02a7... by Chris Peterson

server: add tests for publishing journal events

Currently there is a lot of state used to determine which events get
published to the journal. This is a baseline before changing behavor.

50dacee... by Olivier Gayot

Merge pull request #1942 from ogayot/warnings-capture

logging: capture warnings emitted using warnings.warn()

cc15d64... by Olivier Gayot

Merge pull request #1943 from ogayot/curl-timeout

tests: terminate curl processes on timeout

612a8bb... by Olivier Gayot

tests: terminate curl processes on timeout

When ensuring that the system-setup process can only be connected to
on the loopback interface, we spawn a bunch of `curl --interface ...`
processes. If the connection times out (which is the expectation in most
scenarios), the curl processes ended up not being terminated. Not only
this is small waste of resources, this is also causing errors on noble:

Exception ignored in: <function BaseSubprocessTransport.__del__ at 0x745692661300>
Traceback (most recent call last):
  File "/usr/lib/python3.12/asyncio/base_subprocess.py", line 126, in __del__
    self.close()
  File "/usr/lib/python3.12/asyncio/base_subprocess.py", line 104, in close
    proto.pipe.close()
  File "/usr/lib/python3.12/asyncio/unix_events.py", line 568, in close
    self._close(None)
  File "/usr/lib/python3.12/asyncio/unix_events.py", line 592, in _close
    self._loop.call_soon(self._call_connection_lost, exc)
  File "/usr/lib/python3.12/asyncio/base_events.py", line 793, in call_soon
    self._check_closed()
  File "/usr/lib/python3.12/asyncio/base_events.py", line 540, in _check_closed
    raise RuntimeError('Event loop is closed')
RuntimeError: Event loop is closed

Fixed by terminating the curl processes (and waiting for them to
terminate) before exiting the script.

Signed-off-by: Olivier Gayot <email address hidden>