Commit Graph

5697 Commits

Author SHA1 Message Date
Olivier Gayot 9563b543ce
Merge pull request #1527 from ogayot/ssh-import-lp
integration-tests: import SSH keys from LP instead of GH
2023-01-09 17:40:52 +01:00
Olivier Gayot ec80a1cdee integration-tests: import SSH keys from LP instead of GH
As part of our integrations tests, we import mwhudson's public SSH
key(s) from GitHub. At the moment, however, the GitHub API is rate
limiting the number of queries from our CI.

Upon exceeding the rate limit, our HTTP queries are responded with a 403:

┌────────────────────────────────────────────────────────────────────────┐
│  Importing keys failed:                                                │
│                                                                        │
│  2023-01-08 23:43:40,562 ERROR GitHub REST API rate-limited this IP    │
│  address. See https://developer.github.com/v3/#rate-limiting .         │
│  status_code=403 user=mwhudson                                         │
└────────────────────────────────────────────────────────────────────────┘

Currently, upon pushing to GitHub, the CI runs the integrations tests
against 4 different Ubuntu images (focal, jammy, kinetic, lunar).

This ends up doing 4 SSH import queries at roughly the same time ; which
often exceeds the rate limit and makes some of the tests fail.

This patch makes integration tests import SSH keys from Launchpad
instead of GitHub. Maybe a better approach would be to mock the calls to
ssh-import-id in the CI instead.

Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
2023-01-09 09:43:53 +01:00
Didier Roche-Tolomelli f8dbff5224
Merge pull request #1522 from CarlosNihelton/adv-config-wsl-350
[WSL] WslConfigAdvanced only on reconfiguration variant
2023-01-06 15:20:40 +01:00
Olivier Gayot 69264ad7f2
Merge pull request #1525 from ogayot/confirmation-overlay
Add helper to create confirmation dialog and use it for Ubuntu Pro
2023-01-05 10:50:54 +01:00
Olivier Gayot 5c2d4463b6 ubuntu-pro: use confirmation overlay for ubuntu pro
Instead of defining a ContinueAnyway widget specific to Ubuntu Pro, we
now lean on the new ConfirmationOverlay to obtain the same result.

Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
2023-01-05 09:54:51 +01:00
Olivier Gayot 51b6772175 ui: add a helper to open a confirmation dialog and get the response
The new ConfirmationOverlay object along with the
BaseView.ask_confirmation helper can be used to open a confirmation
dialog and get back the decision from the user.

Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
2023-01-05 09:54:51 +01:00
Olivier Gayot 301d9ddcba
Merge pull request #1524 from ogayot/fix-astart-stdin
utils: fix unused stdin parameter in astart_command
2023-01-05 09:52:53 +01:00
Olivier Gayot 108b26d76d utils: fix unused stdin parameter in astart_command
Specifying the value of subprocess.PIPE as the stdin argument of
astart_command did not have any effect. This happened because the
parameter was not forwarded to the subprocess function. The parameter
was effectively unused.

Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
2023-01-03 19:00:16 +01:00
Carlos Nihelton 5319633d78
Makes the wsl_conf imune to None 2022-12-16 13:28:11 +00:00
Carlos Nihelton 4f0b45798b
Answers no longer relevant for wsl_setup
Integration tests on wsl_setup variant should not write wsl.conf.
2022-12-16 13:28:11 +00:00
Carlos Nihelton 3e04dab619
Interactive wsl_setup no longer writes wsl.conf
That variant would only apply configs if in autoinstall.
There are no more screens available related to those settings in
wsl_setup.
Reconfiguration variant is the only one able to write that file.
2022-12-16 13:28:10 +00:00
Carlos Nihelton 0540c521fe
Moves WslConfBase to the reconfiguration workflow 2022-12-16 13:28:10 +00:00
Dan Bungert 59f167c12b
Merge pull request #1486 from dbungert/workflow-lunar
workflow: +lunar
2022-12-15 08:00:27 -07:00
Dan Bungert 4db88f5075 workflow: +lunar 2022-12-15 07:20:44 -07:00
Dan Bungert 1851531c54
Merge pull request #1520 from dbungert/pep632
distutils migration related items
2022-12-15 07:19:52 -07:00
Michael Hudson-Doyle ceff8a6095 snapcraft.yaml: Get all Python dependencies from the archive
Once we do this, there is no reason to use the 'python' plugin, so
switch to the 'nil' plugin with an override-build that calls pip for
each of the subiquity, curtin, and probert parts.
2022-12-15 11:24:10 +13:00
Dan Bungert 78d55da71b setup.py: start migration away from distutils
Follow guidance from PEP 632 and move some of this over to setuputils.
build.build lacks a straightforward answer, use the vendored copy of
distutils found in setuptools but delaying the import until after
setuptools.
2022-12-14 10:32:20 -07:00
Dan Bungert c62b72923f aptdeps: +gettext 2022-12-14 09:19:13 -07:00
Olivier Gayot 6e868ca771
Merge pull request #1519 from ogayot/cancel-update
refresh: remove the cancel update button since it is broken
2022-12-14 12:39:12 +01:00
Olivier Gayot 8f42b8404e refresh: remove the cancel update button since it is broken
Cancelling the installer self refresh does not work. Clicking on the
button simply goes back to the screen asking the user if they want to
update ; but the refresh operation still continues in the background.

Since we do not have a simple way to implement refresh cancellation at
the moment, we are just removing the button.

Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
2022-12-13 17:27:21 +01:00
Dan Bungert 0eddccd75a
Merge pull request #1471 from kenvandine/users_group_not_lxd
Ensure the first user is in the users group and not in the lxd group
2022-12-13 08:11:06 -07:00
Carlos Nihelton d330449dbf
Merge pull request #1517 from CarlosNihelton/no-switch-shell-wsl-325
Removes the switch to shell widget
2022-12-12 14:29:14 +00:00
Olivier Gayot e47f667e15
Merge pull request #1324 from ogayot/remove_overlay_no_overlay_ok
ui: avoid crashing when removing overlay that does not exist
2022-12-12 09:09:19 +01:00
Carlos Nihelton 1647a98ce3
Removes the now unused install_running
variable and module.
2022-12-09 11:59:31 +00:00
Carlos Nihelton 6d6e1e7854
Removes the switch to shell widget
From the summary controller when installation is in progress.
The shell is inoperable on WSL due the fake snap environment.
2022-12-09 11:44:08 +00:00
Dan Bungert c7f79b8a41
Merge pull request #1515 from dbungert/lp1999173-fix-delete-raid
filesystem: fix raid deletion
2022-12-08 14:54:02 -07:00
Michael Hudson-Doyle 6e1c42c385
Merge pull request #1514 from mwhudson/remove-aio_loop
Remove Application.aio_loop attribute
2022-12-09 10:53:50 +13:00
Dan Bungert 87f104d8b5 filesystem: do not break on raid removal
This logical partition handler can be moved up to _device, and this is
needed in case we are doing removals of anything that isn't a Disk.
2022-12-08 12:31:10 -07:00
Dan Bungert 1898224c5f examples: machine config for raid1 delete crash
To produce the crash, simply use this machine config in dry run, do
manual partition, and attempt to delete the md device.
2022-12-08 12:30:09 -07:00
Michael Hudson-Doyle 50ac03eacb Remove Application.aio_loop attribute 2022-12-08 12:52:14 +13:00
Michael Hudson-Doyle f0ae0a0bfb
Merge pull request #1512 from mwhudson/remove-_run_scripts
remove --script/--click command line arguments
2022-12-08 12:51:52 +13:00
Olivier Gayot 163e6cfb4a ui: make not_found_ok false by default for overlays and pass it where needed
Attempting to close an overlay that does not exist is pretty much always
a bug in the code. Making not_found_ok true by default will hide obvious
bugs from us ; which is not a good thing. Perhaps more importantly, we
might just remove the wrong overlay.

Instead, we should just pass not_found_ok=True as a workaround when we
know the code is buggy and don't have time to fix the bug cleanly.

This is what happens for SSH keys import. If the import fails, we remove
the loading animation. However for answers-based runs, we do not have a
loading animation so the code bails. Let's add not_found_ok=True in this
context and we can fix the code later.

Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
2022-12-07 10:31:15 +01:00
Olivier Gayot 4025cbf97f ui: avoid crashing when removing overlay that does not exist
BaseView.remove_overlay() would crash with AttributeError if no overlay
was found. We now add a not_found_ok parameter (defaulting to True) that
makes the function silently return if the overlay could not be found.

Passing not_found_ok=False and catching OverlayNotFoundError can be
helpful in some scenarios to do something different if no overlay was
found.

Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
2022-12-07 10:31:05 +01:00
Olivier Gayot 0bee338420
Merge pull request #1507 from ogayot/mixed-sources-description
mixed-catalog: rework description and name of entries
2022-12-07 09:45:00 +01:00
Michael Hudson-Doyle 06d7f04032 remove --script/--click command line arguments
I implemented these a long time ago to help working on parts of the ui
by allowing a way to script moving past some screens. I haven't used
them in ages, it's pretty bad code and probably a fragmentary answers
file is a better solution to the same problem. What do you think?
2022-12-07 14:56:00 +13:00
Michael Hudson-Doyle b510afbc65
Merge pull request #1510 from mwhudson/broadcast-confirmation
document InstallerChannels and add INSTALL_CONFIRMED event
2022-12-07 14:41:42 +13:00
Michael Hudson-Doyle 09defa104b
Merge pull request #1511 from mwhudson/spinner-no-loop
rewrite Spinner to not require a loop parameter
2022-12-07 14:41:21 +13:00
Michael Hudson-Doyle 7aab0b5de4 rewrite Spinner to not require a loop parameter 2022-12-07 14:19:27 +13:00
Michael Hudson-Doyle 491cb9191f document InstallerChannels and add INSTALL_CONFIRMED event 2022-12-07 14:07:41 +13:00
Dan Bungert 0e846cd88c
Merge pull request #1509 from dbungert/journald-no-loop-pass
journald: stop passing a loop
2022-12-06 18:02:11 -07:00
Dan Bungert 83b2561919 journald: stop passing a loop
Per python 3.10 changelog[1], passing a loop around is no longer
considered a good idea.  Remove the loop argument and request the
running loop.

[1]: https://docs.python.org/3/whatsnew/3.10.html#removed
2022-12-06 16:58:21 -07:00
Dan Bungert 1cf75adb7f
Merge pull request #1508 from dbungert/integrity-journald
integrity: use journald integration
2022-12-06 16:27:58 -07:00
Dan Bungert 8eeb9c1589 integrity: better wait on the done event 2022-12-06 16:01:05 -07:00
Dan Bungert 8405b0c247 journald: extend matchers
* allow key=value matchers
* add journald_get_first_match to simplify fetching a single event
2022-12-06 15:58:13 -07:00
Dan Bungert 53246511a6
Merge pull request #1506 from dbungert/casper-md5check-log
integrity: add md5 check integration
2022-12-06 14:19:35 -07:00
Dan Bungert cd8667d6a1 integrity: add md5 check integration
* log the results of the md5 check
* if a failure and a crash occurs, mention that in the crash dialog
2022-12-06 14:08:51 -07:00
Olivier Gayot c7750c7fda mixed-catalog: rework description and name of entries
Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
2022-12-06 15:08:00 +01:00
Olivier Gayot 14b1e261ba
Merge pull request #1505 from ogayot/LP1998376
Drivers: make sure we suggest non-GPGPU drivers to the desktop installer
2022-12-06 15:03:31 +01:00
Michael Hudson-Doyle 6ea2eeb11e
Merge pull request #1502 from mwhudson/tpm-autoinstall
Support for autoinstalling a core boot classic system
2022-12-06 10:04:01 +13:00
Olivier Gayot 66c82b3227 drivers: query again list of drivers if the source variant changes
The list of drivers suggested to the user may vary based on whether we
are installing a server or desktop image / source.

In the current implementation of the drivers controller, the value of
the source variant (e.g., server or desktop) is read early in the
initializer.

This is a problem because it happens before the client gets the
opportunity to tell us if we are installing a server or a desktop image.

If the source variant ever changes, we want to query again the list of
drivers to suggest.

Upon configuring the source, the drivers controller will query (again)
the list of drivers.

Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
2022-12-05 11:29:07 +01:00