osbuild
osbuild copied to clipboard
pipelines in a result from v2 manifests are not ordered
Pipelines in v2 manifest are stored in an array:
{
"pipelines": [
{
"name": "asdf"
},
{
"name": "ghjk"
},
]
}
Whereas in the result, they are a dictionary:
{
"log": {
"asdf": [
{
"type": "org.osbuild.rpm"
}
],
"ghjk": [
]
}
}
In my opinion, we shouldn't rely on the ordering of keys in the result and just use an array as we do in the manifest. Not all json parsers keep the ordering, for example Go doesn't: https://github.com/golang/go/issues/27179
Thought from more caffeinated Ondřej: If the input if ordered, the output should be also ordered. :)
While I 100% agree with all that and this is just a bug, I think "log" should be completely removed from the results ;)
@ondrejbudai I think it's safe to close this issue. If we ever change the way logs are returned in the manifest, I think that should be done with @achilleas-k idea: https://github.com/osbuild/osbuild/issues/837
Did we change anything about results and logs recently? Isn't this still an issue?
Did we change anything about results and logs recently? Isn't this still an issue?
I don't think we changed anything, so yes it's still an issue, I was too eager to close it. I'm reopening.