Skip to content

Conversation

Meulengracht
Copy link
Member

@Meulengracht Meulengracht commented Apr 10, 2025

Description

Introduce two new tests, one specifically for Ubuntu Core 20 that verifies the possibility of remodeling to Ubuntu Core 22, and one identical one for Ubuntu Core 22 that remodels to 24.

The tests are implemented with the assumption that the Ubuntu Core images used by certifications use the official models sourced from either cdimage (which use models from https://github.com/canonical/models) or they are built by certifications themself from the mentioned models.

There are currently a lot of limitations on how remodel works, which means that the models must match brand / model if done offline or the device must have a serial assertion (as offline remodels cannot be done from model to a new model, only upgrades and we do not have official models for that currently).

If we end in a situation where the remodeling has to be done offline, we must discuss how we solve this for certification testing. Because if things don't line up currently, then we simply cannot test remodelling in certifications without either a new set of models specifically for this, or we have to lax some of the requirements for remodeling (i.e. implement/support some missing cases).

It's important to be aware of the fact that these test cause the device to reboot multiple times.

Resolved issues

I don't know if there is a issue for covering this specific area of testing.

Documentation

Depending on the test-plan they get added to, we may have to update the coverage in https://certification.canonical.com/docs/programmes/iot/ ?

Tests

These tests have been tested in qemu for amd64 platform and on a Raspberry Pi4 for pi-arm64 platform, by installing my own custom checkbox frontend containing the two added tests, then run with the following commands:

checkbox-remodel.checkbox-cli run com.canonical.qa.remodel::remodel-20-to-22

and

checkbox-remodel.checkbox-cli run com.canonical.qa.remodel::remodel-22-to-24

The python script was tested before it was tested in a snapped checkbox context by running it from the users home directory with the parameters in the tests.

Copy link
Collaborator

@Hook25 Hook25 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, I would change a few of the following points (see review) but the two biggest one I didnt note everywhere are:

  • we package the base provider for all platforms, we validate it on all platforms so we can't use non-python 3.5 apis. This includes fstrings as our CI is screaming. You will have to change that.
  • run doesn't check if the command didnt blow up, use check_call instead (else you will get a failing command followed by a bunch of also failing command, making the log unreadable)

@Meulengracht Meulengracht marked this pull request as ready for review May 7, 2025 07:17
Copy link
Contributor

github-actions bot commented Aug 7, 2025

This PR is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in a week.

@github-actions github-actions bot added the Stale label Aug 7, 2025
Copy link
Contributor

This PR was closed because of inactivity. Feel free to re-open this once you want to work on it again!

@github-actions github-actions bot closed this Aug 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants