"make check" fails on examples/imsm in some environments

Bug #1936248 reported by Dan Bungert
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
subiquity
New
Undecided
Unassigned

Bug Description

Currently, CI is passing and reporting no issues.
However, starting with merge commit c31e2a06, `make check` fails to `python3 scripts/validate-yaml.py .subiquity/subiquity-curtin-install.conf` for me.

Interestingly, I can run-in-lxd locally and it still fails

I've generated example config files and a log of the run-in-lxd for the 5 image targets.

Revision history for this message
Dan Bungert (dbungert) wrote :
Revision history for this message
Dan Bungert (dbungert) wrote :
Revision history for this message
Dan Bungert (dbungert) wrote :
Revision history for this message
Dan Bungert (dbungert) wrote :

Note the logs are slightly modified code for debugging purposes, but vanilla main / the imsm merge commit fail also

diff --git a/scripts/runtests.sh b/scripts/runtests.sh
index 6fd8e88a..2f4909f5 100755
--- a/scripts/runtests.sh
+++ b/scripts/runtests.sh
@@ -4,6 +4,7 @@ set -eux
 testschema=.subiquity/test-autoinstall-schema.json

 validate () {
+ cat .subiquity/subiquity-curtin-install.conf
     python3 scripts/validate-yaml.py .subiquity/subiquity-curtin-install.conf
     if [ ! -e .subiquity/subiquity-client-debug.log ] || [ ! -e .subiquity/subiquity-server-debug.log ]; then
         echo "log file not created"
@@ -28,6 +29,9 @@ tty=$(tty) || tty=/dev/console

 export SUBIQUITY_REPLAY_TIMESCALE=100
 for answers in examples/answers*.yaml; do
+ if [ "$answers" != "examples/answers-imsm.yaml" ] ; then
+ continue
+ fi
     clean
     config=$(sed -n 's/^#machine-config: \(.*\)/\1/p' $answers || true)
     if [ -z "$config" ]; then
diff --git a/scripts/validate-yaml.py b/scripts/validate-yaml.py
index 9b53566b..f83de5fc 100644
--- a/scripts/validate-yaml.py
+++ b/scripts/validate-yaml.py
@@ -19,7 +19,9 @@ class StorageChecker:
         assert action['device'] in self.actions
         assert 'ptable' in self.actions[action['device']]
         if action.get('flag') in ('boot', 'bios_grub', 'prep'):
- assert self.actions[action['device']]['type'] == 'disk'
+ action_of_device = self.actions[action['device']]
+ assert action_of_device['type'] == 'disk', \
+ f'{action_of_device}["type"] != "disk"'

     def _check_format(self, action):
         assert 'volume' in action

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.