coreos-assembler
coreos-assembler copied to clipboard
cosa fetch breaks if extra-kargs is empty
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
- cosa init https://github.com/barnscott/fedora-silverblue-config
- cosa fetch
- 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 )
- cosa init https://github.com/barnscott/fedora-silverblue-config --branch=testing
- cosa fetch
- works...