Repository navigation
install/aleph: skip serializing optional fields if None - #2591
Conversation
This avoids writing out fields with `null` values. See coreos/bootupd#1166. Signed-off-by: Rolv Apneseth <rolv.apneseth@gmail.com>
6437f7a to
c0051ab
Compare
Johan-Liebert1
left a comment
There was a problem hiding this comment.
Personally not a fan of this as ime it ends up being confusing that sometimes we'll have version and sometimes we won't. I think the actual fix should be in bootupd marking version as Option<String>
I don't have a strong opinion, but that is a common pattern with JSON. I only made this PR due to the conversation in coreos/bootupd#1166, since @cgwalters agreed to the "writer" change. This indeed makes no difference to the actual issue in |
|
Also, https://github.com/bootc-dev/bootc/blob/main/crates/lib/src/install/aleph.rs#L23-L24 and https://github.com/bootc-dev/bootc/blob/main/crates/lib/src/install/aleph.rs#L31-L32 can already be skipped while serializing |
|
Not too sure what would cause the CI failure on |
It flakes sometimes, not sure if it's a code race or some sort of infra issue, but I re-ran it and it should hopefully work on retry 🤞 |
|
Thanks @jeckersb |
This avoids writing out fields with
nullvalues. See coreos/bootupd#1166.