coreos-assembler icon indicating copy to clipboard operation
coreos-assembler copied to clipboard

cosa fetch breaks if extra-kargs is empty

Open barnscott opened this issue 3 years ago • 0 comments

Bug Report

cosa fetch breaks if extra-kargs is empty. came across issue when testing a custom build.

workaround, is to add any extra-karg, like this one: https://github.com/barnscott/fedora-silverblue-config/blob/testing/image.yaml

Environment

silverblue, cosa via documented pipeline: https://github.com/coreos/coreos-assembler/blob/main/docs/building-fcos.md

What operating system is being used to run coreos-assembler? silverblue

What operating system is being assembled? custom silverblue-like desktop

Is coreos-assembler running in Podman or Docker? podman

If Podman, is coreos-assembler running privileged or unprivileged? privileged

Expected Behavior

should init without errors

Actual Behavior

[coreos-assembler]$ cosa fetch
Traceback (most recent call last):
  File "<string>", line 5, in <module>
  File "/usr/lib/coreos-assembler/cosalib/cmdlib.py", line 348, in flatten_image_yaml_to_file
    flattened = flatten_image_yaml(srcfile)
  File "/usr/lib/coreos-assembler/cosalib/cmdlib.py", line 369, in flatten_image_yaml
    merge_lists(base, srcyaml, 'extra-kargs')
  File "/usr/lib/coreos-assembler/cosalib/cmdlib.py", line 357, in merge_lists
    assert type(y[k]) == list
AssertionError

Reproduction Steps

  1. cosa init https://github.com/barnscott/fedora-silverblue-config
  2. cosa fetch
  3. fails with previous error

Other Information

this workaround suggests that merge_lists function fails to init on empty extra-kargs list ( https://github.com/coreos/coreos-assembler/blob/88efaff63b38542763336e12249b11f53d606776/src/cosalib/cmdlib.py )

  1. cosa init https://github.com/barnscott/fedora-silverblue-config --branch=testing
  2. cosa fetch
  3. works...

barnscott avatar Jun 25 '21 16:06 barnscott